Rollup merge of #100940 - TaKO8Ki:do-not-suggest-adding-bound-to-opaque-type, r=fee1-dead
Do not suggest adding a bound to a opaque type fixes #100442
This commit is contained in:
commit
75b1b69171
3 changed files with 29 additions and 0 deletions
|
@ -281,6 +281,9 @@ impl<'tcx> BorrowExplanation<'tcx> {
|
|||
span: Span,
|
||||
region_name: &RegionName,
|
||||
) {
|
||||
if !span.is_desugaring(DesugaringKind::OpaqueTy) {
|
||||
return;
|
||||
}
|
||||
if let ConstraintCategory::OpaqueType = category {
|
||||
let suggestable_name =
|
||||
if region_name.was_named() { region_name.name } else { kw::UnderscoreLifetime };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue