Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2faef12

Browse files
committedApr 16, 2021
Auto merge of #84241 - Dylan-DPC:rollup-jk9nt6k, r=Dylan-DPC
Rollup of 4 pull requests Successful merges: - #83337 (rustdoc: Hide item contents, not items) - #83944 (Fix a couple resolve bugs from binder refactor) - #84145 (Address comments for vecdeque_binary_search #78021) - #84172 (Compiler error messages: reduce assertiveness of message E0384) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 3833636 + c7c59d7 commit 2faef12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+526
-194
lines changed
 

‎compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
16811681
if decl.can_be_made_mutable() {
16821682
err.span_suggestion(
16831683
decl.source_info.span,
1684-
"make this binding mutable",
1684+
"consider making this binding mutable",
16851685
format!("mut {}", name),
16861686
Applicability::MachineApplicable,
16871687
);

‎compiler/rustc_resolve/src/late/lifetimes.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2719,6 +2719,13 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
27192719
Some(next) => next,
27202720
None => break None,
27212721
};
2722+
// See issue #83753. If someone writes an associated type on a non-trait, just treat it as
2723+
// there being no supertrait HRTBs.
2724+
match tcx.def_kind(def_id) {
2725+
DefKind::Trait | DefKind::TraitAlias | DefKind::Impl => {}
2726+
_ => break None,
2727+
}
2728+
27222729
if trait_defines_associated_type_named(def_id) {
27232730
break Some(bound_vars.into_iter().collect());
27242731
}
@@ -2764,7 +2771,14 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
27642771
| Scope::TraitRefBoundary { ref s, .. } => {
27652772
scope = *s;
27662773
}
2767-
Scope::Root => bug!("In fn_like_elision without appropriate scope above"),
2774+
Scope::Root => {
2775+
// See issue #83907. Just bail out from looking inside.
2776+
self.tcx.sess.delay_span_bug(
2777+
rustc_span::DUMMY_SP,
2778+
"In fn_like_elision without appropriate scope above",
2779+
);
2780+
return;
2781+
}
27682782
}
27692783
};
27702784
// While not strictly necessary, we gather anon lifetimes *before* actually

0 commit comments

Comments
 (0)
Please sign in to comment.