]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/effect.rs
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / librustc / middle / effect.rs
index ab33c3843aae5d6c0a9a1db6fe8b3726dfc19888..d2b8ed8c2970770250d35fe78699d06d548d4316 100644 (file)
@@ -12,7 +12,6 @@
 //! `unsafe`.
 use self::RootUnsafeContext::*;
 
-use dep_graph::DepNode;
 use ty::{self, Ty, TyCtxt};
 use ty::MethodCall;
 use lint;
@@ -44,8 +43,8 @@ enum RootUnsafeContext {
 
 fn type_is_unsafe_function(ty: Ty) -> bool {
     match ty.sty {
-        ty::TyFnDef(.., ref f) |
-        ty::TyFnPtr(ref f) => f.unsafety == hir::Unsafety::Unsafe,
+        ty::TyFnDef(.., f) |
+        ty::TyFnPtr(f) => f.unsafety() == hir::Unsafety::Unsafe,
         _ => false,
     }
 }
@@ -241,8 +240,6 @@ fn visit_pat(&mut self, pat: &'tcx hir::Pat) {
 }
 
 pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
-    let _task = tcx.dep_graph.in_task(DepNode::EffectCheck);
-
     let mut visitor = EffectCheckVisitor {
         tcx: tcx,
         tables: &ty::TypeckTables::empty(),