Remove uses of &mut CmResolver by LorrensP-2158466 · Pull Request #148187 · rust-lang/rust (original) (raw)
[RUSTC-TIMING] jiff test:false 8.028
error: lifetime may not live long enough
--> compiler/rustc_resolve/src/ident.rs:437:28
|
42 | impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
| --- ---- lifetime `'tcx` defined here
| |
| lifetime `'ra` defined here
...
437 | let break_result = self.visit_scopes(
| ____________________________^
438 | | scope_set,
439 | | parent_scope,
440 | | orig_ident.span.ctxt(),
... |
748 | | },
749 | | );
| |_________^ argument requires that `'ra` must outlive `'tcx`
|
= help: consider adding the following bound: `'ra: 'tcx`
= note: requirement occurs because of the type `RefOrMut<'_, Resolver<'_, '_>>`, which makes the generic argument `Resolver<'_, '_>` invariant
= note: the struct `RefOrMut<'a, T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
error: lifetime may not live long enough
--> compiler/rustc_resolve/src/imports.rs:876:9
|
302 | impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
| --- ---- lifetime `'tcx` defined here
| |
| lifetime `'ra` defined here
...
876 | / self.per_ns_cm(|mut this, ns| {
877 | | if !type_ns_only || ns == TypeNS {
878 | | if bindings[ns].get() != PendingBinding::Pending {
879 | | return;
... |
934 | | });
| |__________^ argument requires that `'ra` must outlive `'tcx`
|
= help: consider adding the following bound: `'ra: 'tcx`
= note: requirement occurs because of the type `RefOrMut<'_, Resolver<'_, '_>>`, which makes the generic argument `Resolver<'_, '_>` invariant
= note: the struct `RefOrMut<'a, T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
[RUSTC-TIMING] rustc_resolve test:false 2.729
error: could not compile `rustc_resolve` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...