introduce LateParamRegionKind
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user