diff options
| author | lcnr <rust@lcnr.de> | 2024-12-06 14:46:28 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-12-18 16:05:44 +0100 |
| commit | 085d93181093c1daf9ef595cd08d73633062e635 (patch) | |
| tree | 6b518f7043c32ba08e2819dc4000dbce9b2c9efb /compiler/rustc_trait_selection/src/errors | |
| parent | 3378a5e084fa51c2e7f5c3f53b87e8ad89f1c517 (diff) | |
| download | rust-085d93181093c1daf9ef595cd08d73633062e635.tar.gz rust-085d93181093c1daf9ef595cd08d73633062e635.zip | |
introduce `LateParamRegionKind`
Diffstat (limited to 'compiler/rustc_trait_selection/src/errors')
| -rw-r--r-- | compiler/rustc_trait_selection/src/errors/note_and_explain.rs | 8 |
1 files changed, 4 insertions, 4 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 1ce5e6ba917..b752dbf3093 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,14 @@ impl<'a> DescriptionCtx<'a> { } } ty::ReLateParam(ref fr) => { - if !fr.bound_region.is_named() + if !fr.kind.is_named() && 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.bound_region { - ty::BoundRegionKind::Named(_, name) => { + match fr.kind { + ty::LateParamRegionKind::Named(_, name) => { let span = if let Some(param) = tcx .hir() .get_generics(scope) @@ -62,7 +62,7 @@ impl<'a> DescriptionCtx<'a> { (Some(span), "as_defined", name.to_string()) } } - ty::BoundRegionKind::Anon => { + ty::LateParamRegionKind::Anon(_) => { let span = Some(tcx.def_span(scope)); (span, "defined_here", String::new()) } |
