]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_middle/ty/util.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / librustc_middle / ty / util.rs
index db78fa535cf42f01131cb691e6fd01afa0e093ef..5c5fe9dbd7abfaf7bbe9ad4c70502d04bb8e855f 100644 (file)
@@ -585,7 +585,7 @@ struct OpaqueTypeExpander<'tcx> {
     found_recursion: bool,
     /// Whether or not to check for recursive opaque types.
     /// This is `true` when we're explicitly checking for opaque type
-    /// recursion, and 'false' otherwise to avoid unecessary work.
+    /// recursion, and 'false' otherwise to avoid unnecessary work.
     check_recursion: bool,
     tcx: TyCtxt<'tcx>,
 }
@@ -879,7 +879,7 @@ fn are_inner_types_recursive<'tcx>(
                         let span = match field
                             .did
                             .as_local()
-                            .map(|id| tcx.hir().as_local_hir_id(id))
+                            .map(|id| tcx.hir().local_def_id_to_hir_id(id))
                             .and_then(|id| tcx.hir().find(id))
                         {
                             Some(hir::Node::Field(field)) => field.ty.span,
@@ -1143,7 +1143,7 @@ pub fn needs_drop_components(
     }
 }
 
-#[derive(Copy, Clone, Debug, HashStable, RustcEncodable, RustcDecodable)]
+#[derive(Copy, Clone, Debug, HashStable, TyEncodable, TyDecodable)]
 pub struct AlwaysRequiresDrop;
 
 /// Normalizes all opaque types in the given value, replacing them