Skip to content

Commit 7552bd6

Browse files
Use ast::Mutability
1 parent 5e048da commit 7552bd6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_passes/check_const.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use rustc::hir;
1414
use rustc::session::Session;
1515
use rustc::ty::TyCtxt;
1616
use rustc::ty::query::Providers;
17+
use syntax::ast::Mutability;
1718
use syntax::span_err;
1819
use syntax_pos::Span;
1920

@@ -35,8 +36,8 @@ impl ConstKind {
3536
let owner = hir_map.body_owner(body.id());
3637
let const_kind = match hir_map.body_owner_kind(owner) {
3738
hir::BodyOwnerKind::Const => Self::Const,
38-
hir::BodyOwnerKind::Static(hir::Mutability::MutMutable) => Self::StaticMut,
39-
hir::BodyOwnerKind::Static(hir::Mutability::MutImmutable) => Self::Static,
39+
hir::BodyOwnerKind::Static(Mutability::Mutable) => Self::StaticMut,
40+
hir::BodyOwnerKind::Static(Mutability::Immutable) => Self::Static,
4041

4142
hir::BodyOwnerKind::Fn if is_const_fn(owner) => Self::ConstFn,
4243
hir::BodyOwnerKind::Fn | hir::BodyOwnerKind::Closure => return None,

0 commit comments

Comments
 (0)