use rustc::middle::const_qualif::ConstQualif;
use rustc::lint::builtin::CONST_ERR;
-use rustc_front::hir;
+use rustc_front::hir::{self, PatKind};
use syntax::ast;
use syntax::codemap::Span;
use syntax::feature_gate::UnstableFeatures;
fn visit_pat(&mut self, p: &hir::Pat) {
match p.node {
- hir::PatLit(ref lit) => {
+ PatKind::Lit(ref lit) => {
self.global_expr(Mode::Const, &lit);
}
- hir::PatRange(ref start, ref end) => {
+ PatKind::Range(ref start, ref end) => {
self.global_expr(Mode::Const, &start);
self.global_expr(Mode::Const, &end);
hir::ExprAgain(_) |
hir::ExprRet(_) |
- // Miscellaneous expressions that could be implemented.
- hir::ExprRange(..) |
-
// Expressions with side-effects.
hir::ExprAssign(..) |
hir::ExprAssignOp(..) |
match v.tcx.tables.borrow().adjustments.get(&e.id) {
None |
Some(&ty::adjustment::AdjustReifyFnPointer) |
- Some(&ty::adjustment::AdjustUnsafeFnPointer) => {}
+ Some(&ty::adjustment::AdjustUnsafeFnPointer) |
+ Some(&ty::adjustment::AdjustMutToConstPointer) => {}
Some(&ty::adjustment::AdjustDerefRef(
ty::adjustment::AutoDerefRef { autoderefs, .. }