]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/astconv/mod.rs
Rollup merge of #87769 - m-ou-se:alloc-features-cleanup, r=yaahc,dtolnay
[rust.git] / compiler / rustc_typeck / src / astconv / mod.rs
index e492fd44185ca992dd06b021eecac69627c1ad5d..da751f2075399cef877e49ae73c661a34c2a03a6 100644 (file)
@@ -1319,7 +1319,7 @@ fn conv_object_ty_poly_trait_ref(
             );
             first_trait.label_with_exp_info(&mut err, "first non-auto trait", "first use");
             err.help(&format!(
-                "consider creating a new trait with all of these as super-traits and using that \
+                "consider creating a new trait with all of these as supertraits and using that \
                  trait here instead: `trait NewTrait: {} {{}}`",
                 regular_traits
                     .iter()
@@ -1916,9 +1916,7 @@ fn qpath_to_ty(
 
         debug!("qpath_to_ty: trait_def_id={:?}", trait_def_id);
 
-        let self_ty = if let Some(ty) = opt_self_ty {
-            ty
-        } else {
+        let Some(self_ty) = opt_self_ty else {
             let path_str = tcx.def_path_str(trait_def_id);
 
             let def_id = self.item_def_id();