+++ b/compiler/rustc_hir/src/lang_items.rs
@@ -310,6 +310,8 @@
- Try, kw::Try, try_trait, Target::Trait;
+ Try, sym::Try, try_trait, Target::Trait;
+ SliceLen, sym::slice_len_fn, slice_len_fn, Target::Method(MethodKind::Inherent);
+
// Language items from AST lowering
- TryFromError, sym::from_error, from_error_fn, Target::Method(MethodKind::Trait { body: false });
- TryFromOk, sym::from_ok, from_ok_fn, Target::Method(MethodKind::Trait { body: false });
+ TryTraitFromResidual, sym::from_residual, from_residual_fn, Target::Method(MethodKind::Trait { body: false });
+ TryTraitFromOutput, sym::from_output, from_output_fn, Target::Method(MethodKind::Trait { body: false });
--- /dev/null
+++ b/compiler/rustc_mir/src/transform/lower_slice_len.rs
@@ -0,0 +1,100 @@
pub mod match_branches;
pub mod multiple_return_terminators;
pub mod no_landing_pads;
-@@ -480,6 +481,7 @@
+@@ -479,6 +480,7 @@
// to them. We run some optimizations before that, because they may be harder to do on the state
// machine than on MIR with async primitives.
let optimizations_with_generators: &[&dyn MirPass<'tcx>] = &[
&simplify::SimplifyCfg::new("after-uninhabited-enum-branching"),
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
-@@ -675,6 +675,7 @@
+@@ -680,6 +680,7 @@
lateout,
lazy_normalization_consts,
le,
let_chains,
lhs,
lib,
-@@ -1129,6 +1130,7 @@
+@@ -1146,6 +1147,7 @@
skip,
slice,
slice_alloc,