diff options
| author | Michael Goulet <michael@errs.io> | 2025-04-11 04:17:19 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-04 18:14:22 +0000 |
| commit | 42c9bfd2b96f2e6cd0e4e6fab21c2d5499883089 (patch) | |
| tree | 7ce9fcacfe304104d232cb1a1091c1131e465a44 /compiler/rustc_trait_selection/src/errors | |
| parent | 0c4fa2690de945f062668acfc36b3f8cfbd013e2 (diff) | |
| download | rust-42c9bfd2b96f2e6cd0e4e6fab21c2d5499883089.tar.gz rust-42c9bfd2b96f2e6cd0e4e6fab21c2d5499883089.zip | |
Remove Symbol for Named LateParam/Bound variants
Diffstat (limited to 'compiler/rustc_trait_selection/src/errors')
| -rw-r--r-- | compiler/rustc_trait_selection/src/errors/note_and_explain.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/errors/note_and_explain.rs b/compiler/rustc_trait_selection/src/errors/note_and_explain.rs index ec3c1ba4a45..0a1cdb16f5a 100644 --- a/compiler/rustc_trait_selection/src/errors/note_and_explain.rs +++ b/compiler/rustc_trait_selection/src/errors/note_and_explain.rs @@ -39,14 +39,15 @@ impl<'a> DescriptionCtx<'a> { } } ty::ReLateParam(ref fr) => { - if !fr.kind.is_named() + if !fr.kind.is_named(tcx) && let Some((ty, _)) = find_anon_type(tcx, generic_param_scope, region) { (Some(ty.span), "defined_here", String::new()) } else { let scope = fr.scope.expect_local(); match fr.kind { - ty::LateParamRegionKind::Named(_, name) => { + ty::LateParamRegionKind::Named(def_id) => { + let name = tcx.item_name(def_id); let span = if let Some(param) = tcx .hir_get_generics(scope) .and_then(|generics| generics.get_named(name)) |
