]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/check.rs
Rollup merge of #105724 - notriddle:notriddle/scrape-example-src-line-numbers, r...
[rust.git] / compiler / rustc_hir_typeck / src / check.rs
index 0c9a350c295f4227866c20eb5e4ae887b027ed7d..32f86b8042c11c39d36baa268dc8cb40d1c1a1c3 100644 (file)
@@ -1,7 +1,7 @@
 use crate::coercion::CoerceMany;
 use crate::gather_locals::GatherLocalsVisitor;
 use crate::FnCtxt;
-use crate::{GeneratorTypes, UnsafetyState};
+use crate::GeneratorTypes;
 use rustc_hir as hir;
 use rustc_hir::def::DefKind;
 use rustc_hir::intravisit::Visitor;
@@ -30,7 +30,6 @@ pub(super) fn check_fn<'a, 'tcx>(
     can_be_generator: Option<hir::Movability>,
 ) -> Option<GeneratorTypes<'tcx>> {
     let fn_id = fcx.tcx.hir().local_def_id_to_hir_id(fn_def_id);
-    fcx.ps.set(UnsafetyState::function(fn_sig.unsafety, fn_id));
 
     let tcx = fcx.tcx;
     let hir = tcx.hir();