Skip to content

Commit e81e09a

Browse files
committed
change to a struct variant
1 parent 9cdefd7 commit e81e09a

File tree

27 files changed

+68
-57
lines changed

27 files changed

+68
-57
lines changed

compiler/rustc_hir/src/def.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ pub enum Res<Id = hir::HirId> {
313313
/// which already works on stable while causing the `const_evaluatable_unchecked` future compat lint.
314314
///
315315
/// FIXME(generic_const_exprs): Remove this bodge once that feature is stable.
316-
SelfTy(
316+
SelfTy {
317317
/// Optionally, the trait associated with this `Self` type.
318-
Option<DefId>,
319-
/// Optionally, the impl associated with this `Self` type.
320-
Option<(DefId, bool)>,
321-
),
318+
trait_: Option<DefId>,
319+
/// Optionally, the impl or adt associated with this `Self` type.
320+
alias_to: Option<(DefId, bool)>,
321+
},
322322
/// A tool attribute module; e.g., the `rustfmt` in `#[rustfmt::skip]`.
323323
///
324324
/// **Belongs to the type namespace.**
@@ -550,7 +550,7 @@ impl<Id> Res<Id> {
550550

551551
Res::Local(..)
552552
| Res::PrimTy(..)
553-
| Res::SelfTy(..)
553+
| Res::SelfTy { .. }
554554
| Res::SelfCtor(..)
555555
| Res::ToolMod
556556
| Res::NonMacroAttr(..)
@@ -573,7 +573,7 @@ impl<Id> Res<Id> {
573573
Res::SelfCtor(..) => "self constructor",
574574
Res::PrimTy(..) => "builtin type",
575575
Res::Local(..) => "local variable",
576-
Res::SelfTy(..) => "self type",
576+
Res::SelfTy { .. } => "self type",
577577
Res::ToolMod => "tool module",
578578
Res::NonMacroAttr(attr_kind) => attr_kind.descr(),
579579
Res::Err => "unresolved item",
@@ -596,7 +596,7 @@ impl<Id> Res<Id> {
596596
Res::SelfCtor(id) => Res::SelfCtor(id),
597597
Res::PrimTy(id) => Res::PrimTy(id),
598598
Res::Local(id) => Res::Local(map(id)),
599-
Res::SelfTy(a, b) => Res::SelfTy(a, b),
599+
Res::SelfTy { trait_, alias_to } => Res::SelfTy { trait_, alias_to },
600600
Res::ToolMod => Res::ToolMod,
601601
Res::NonMacroAttr(attr_kind) => Res::NonMacroAttr(attr_kind),
602602
Res::Err => Res::Err,
@@ -620,7 +620,7 @@ impl<Id> Res<Id> {
620620
pub fn ns(&self) -> Option<Namespace> {
621621
match self {
622622
Res::Def(kind, ..) => kind.ns(),
623-
Res::PrimTy(..) | Res::SelfTy(..) | Res::ToolMod => Some(Namespace::TypeNS),
623+
Res::PrimTy(..) | Res::SelfTy { .. } | Res::ToolMod => Some(Namespace::TypeNS),
624624
Res::SelfCtor(..) | Res::Local(..) => Some(Namespace::ValueNS),
625625
Res::NonMacroAttr(..) => Some(Namespace::MacroNS),
626626
Res::Err => None,

compiler/rustc_hir/src/hir.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,8 @@ impl<'hir> WhereBoundPredicate<'hir> {
640640
_ => return false,
641641
};
642642
match path.res {
643-
Res::Def(DefKind::TyParam, def_id) | Res::SelfTy(Some(def_id), None) => {
644-
def_id == param_def_id
645-
}
643+
Res::Def(DefKind::TyParam, def_id)
644+
| Res::SelfTy { trait_: Some(def_id), alias_to: None } => def_id == param_def_id,
646645
_ => false,
647646
}
648647
}

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ impl<'tcx> Visitor<'tcx> for TypeParamSpanVisitor<'tcx> {
203203
.map(|res| {
204204
matches!(
205205
res,
206-
Res::SelfTy(_, _) | Res::Def(hir::def::DefKind::TyParam, _)
206+
Res::SelfTy { trait_: _, alias_to: _ }
207+
| Res::Def(hir::def::DefKind::TyParam, _)
207208
)
208209
})
209210
.unwrap_or(false) =>

compiler/rustc_lint/src/internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn is_ty_or_ty_ctxt(cx: &LateContext<'_>, ty: &Ty<'_>) -> Option<String> {
202202
}
203203
}
204204
// Only lint on `&Ty` and `&TyCtxt` if it is used outside of a trait.
205-
Res::SelfTy(None, Some((did, _))) => {
205+
Res::SelfTy { trait_: None, alias_to: Some((did, _)) } => {
206206
if let ty::Adt(adt, substs) = cx.tcx.type_of(did).kind() {
207207
if let Some(name @ (sym::Ty | sym::TyCtxt)) =
208208
cx.tcx.get_diagnostic_name(adt.did)

compiler/rustc_lint/src/pass_by_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn path_for_pass_by_value(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Option<Stri
5454
let path_segment = path.segments.last().unwrap();
5555
return Some(format!("{}{}", name, gen_args(cx, path_segment)));
5656
}
57-
Res::SelfTy(None, Some((did, _))) => {
57+
Res::SelfTy { trait_: None, alias_to: Some((did, _)) } => {
5858
if let ty::Adt(adt, substs) = cx.tcx.type_of(did).kind() {
5959
if cx.tcx.has_attr(adt.did, sym::rustc_pass_by_value) {
6060
return Some(cx.tcx.def_path_str_with_substs(adt.did, substs));

compiler/rustc_middle/src/ty/adt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ impl<'tcx> AdtDef {
395395
| Res::Def(DefKind::Union, _)
396396
| Res::Def(DefKind::TyAlias, _)
397397
| Res::Def(DefKind::AssocTy, _)
398-
| Res::SelfTy(..)
398+
| Res::SelfTy { .. }
399399
| Res::SelfCtor(..) => self.non_enum_variant(),
400400
_ => bug!("unexpected res {:?} in variant_of_res", res),
401401
}

compiler/rustc_mir_build/src/thir/pattern/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
417417
| DefKind::AssocTy,
418418
_,
419419
)
420-
| Res::SelfTy(..)
420+
| Res::SelfTy { .. }
421421
| Res::SelfCtor(..) => PatKind::Leaf { subpatterns },
422422
_ => {
423423
let pattern_error = match res {

compiler/rustc_passes/src/dead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
104104
self.check_def_id(variant_id);
105105
}
106106
}
107-
Res::SelfTy(t, i) => {
107+
Res::SelfTy { trait_: t, alias_to: i } => {
108108
if let Some(t) = t {
109109
self.check_def_id(t);
110110
}

compiler/rustc_privacy/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ struct ObsoleteCheckTypeForPrivatenessVisitor<'a, 'b, 'tcx> {
13501350
impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
13511351
fn path_is_private_type(&self, path: &hir::Path<'_>) -> bool {
13521352
let did = match path.res {
1353-
Res::PrimTy(..) | Res::SelfTy(..) | Res::Err => return false,
1353+
Res::PrimTy(..) | Res::SelfTy { .. } | Res::Err => return false,
13541354
res => res.def_id(),
13551355
};
13561356

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
991991
_,
992992
)
993993
| Res::Local(..)
994-
| Res::SelfTy(..)
994+
| Res::SelfTy { .. }
995995
| Res::SelfCtor(..)
996996
| Res::Err => bug!("unexpected resolution: {:?}", res),
997997
}

compiler/rustc_resolve/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl<'a> Resolver<'a> {
123123

124124
let sm = self.session.source_map();
125125
match outer_res {
126-
Res::SelfTy(maybe_trait_defid, maybe_impl_defid) => {
126+
Res::SelfTy { trait_: maybe_trait_defid, alias_to: maybe_impl_defid } => {
127127
if let Some(impl_span) =
128128
maybe_impl_defid.and_then(|(def_id, _)| self.opt_span(def_id))
129129
{

compiler/rustc_resolve/src/late.rs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl<'a> PathSource<'a> {
289289
| DefKind::ForeignTy,
290290
_,
291291
) | Res::PrimTy(..)
292-
| Res::SelfTy(..)
292+
| Res::SelfTy { .. }
293293
),
294294
PathSource::Trait(AliasPossibility::No) => matches!(res, Res::Def(DefKind::Trait, _)),
295295
PathSource::Trait(AliasPossibility::Maybe) => {
@@ -326,7 +326,7 @@ impl<'a> PathSource<'a> {
326326
| DefKind::TyAlias
327327
| DefKind::AssocTy,
328328
_,
329-
) | Res::SelfTy(..)
329+
) | Res::SelfTy { .. }
330330
),
331331
PathSource::TraitItem(ns) => match res {
332332
Res::Def(DefKind::AssocConst | DefKind::AssocFn, _) if ns == ValueNS => true,
@@ -911,9 +911,12 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
911911
self.with_current_self_item(item, |this| {
912912
this.with_generic_param_rib(generics, ItemRibKind(HasGenericParams::Yes), |this| {
913913
let item_def_id = this.r.local_def_id(item.id).to_def_id();
914-
this.with_self_rib(Res::SelfTy(None, Some((item_def_id, false))), |this| {
915-
visit::walk_item(this, item);
916-
});
914+
this.with_self_rib(
915+
Res::SelfTy { trait_: None, alias_to: Some((item_def_id, false)) },
916+
|this| {
917+
visit::walk_item(this, item);
918+
},
919+
);
917920
});
918921
});
919922
}
@@ -999,8 +1002,8 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
9991002
self.compute_num_lifetime_params(item.id, generics);
10001003
// Create a new rib for the trait-wide type parameters.
10011004
self.with_generic_param_rib(generics, ItemRibKind(HasGenericParams::Yes), |this| {
1002-
let local_def_id = this.r.local_def_id(item.id).to_def_id();
1003-
this.with_self_rib(Res::SelfTy(Some(local_def_id), None), |this| {
1005+
let def = this.r.local_def_id(item.id).to_def_id();
1006+
this.with_self_rib(Res::SelfTy { trait_: Some(def), alias_to: None }, |this| {
10041007
this.visit_generics(generics);
10051008
walk_list!(this, visit_param_bound, bounds);
10061009

@@ -1051,8 +1054,8 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
10511054
self.compute_num_lifetime_params(item.id, generics);
10521055
// Create a new rib for the trait-wide type parameters.
10531056
self.with_generic_param_rib(generics, ItemRibKind(HasGenericParams::Yes), |this| {
1054-
let local_def_id = this.r.local_def_id(item.id).to_def_id();
1055-
this.with_self_rib(Res::SelfTy(Some(local_def_id), None), |this| {
1057+
let def = this.r.local_def_id(item.id).to_def_id();
1058+
this.with_self_rib(Res::SelfTy { trait_: Some(def), alias_to: None }, |this| {
10561059
this.visit_generics(generics);
10571060
walk_list!(this, visit_param_bound, bounds);
10581061
});
@@ -1296,7 +1299,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
12961299
// If applicable, create a rib for the type parameters.
12971300
self.with_generic_param_rib(generics, ItemRibKind(HasGenericParams::Yes), |this| {
12981301
// Dummy self type for better errors if `Self` is used in the trait path.
1299-
this.with_self_rib(Res::SelfTy(None, None), |this| {
1302+
this.with_self_rib(Res::SelfTy { trait_: None, alias_to: None }, |this| {
13001303
// Resolve the trait reference, if necessary.
13011304
this.with_optional_trait_ref(opt_trait_reference.as_ref(), |this, trait_id| {
13021305
let item_def_id = this.r.local_def_id(item_id);
@@ -1307,7 +1310,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
13071310
}
13081311

13091312
let item_def_id = item_def_id.to_def_id();
1310-
this.with_self_rib(Res::SelfTy(trait_id, Some((item_def_id, false))), |this| {
1313+
let res =
1314+
Res::SelfTy { trait_: trait_id, alias_to: Some((item_def_id, false)) };
1315+
this.with_self_rib(res, |this| {
13111316
if let Some(trait_ref) = opt_trait_reference.as_ref() {
13121317
// Resolve type arguments in the trait path.
13131318
visit::walk_trait_ref(this, trait_ref);

compiler/rustc_resolve/src/late/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
11891189
Applicability::HasPlaceholders,
11901190
);
11911191
}
1192-
(Res::SelfTy(..), _) if ns == ValueNS => {
1192+
(Res::SelfTy { .. }, _) if ns == ValueNS => {
11931193
err.span_label(span, fallback_label);
11941194
err.note("can't use `Self` as a constructor, you must use the implemented struct");
11951195
}

compiler/rustc_resolve/src/late/lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2793,7 +2793,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
27932793
// Look for `self: &'a Self` - also desugared from `&'a self`,
27942794
// and if that matches, use it for elision and return early.
27952795
fn is_self_ty(&self, res: Res) -> bool {
2796-
if let Res::SelfTy(..) = res {
2796+
if let Res::SelfTy { .. } = res {
27972797
return true;
27982798
}
27992799

compiler/rustc_resolve/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,7 +2784,7 @@ impl<'a> Resolver<'a> {
27842784
return Res::Err;
27852785
}
27862786
}
2787-
Res::Def(DefKind::TyParam, _) | Res::SelfTy(..) => {
2787+
Res::Def(DefKind::TyParam, _) | Res::SelfTy { .. } => {
27882788
for rib in ribs {
27892789
let has_generic_params: HasGenericParams = match rib.kind {
27902790
NormalRibKind
@@ -2804,8 +2804,8 @@ impl<'a> Resolver<'a> {
28042804
// HACK(min_const_generics): If we encounter `Self` in an anonymous constant
28052805
// we can't easily tell if it's generic at this stage, so we instead remember
28062806
// this and then enforce the self type to be concrete later on.
2807-
if let Res::SelfTy(trait_def, Some((impl_def, _))) = res {
2808-
res = Res::SelfTy(trait_def, Some((impl_def, true)));
2807+
if let Res::SelfTy { trait_, alias_to: Some((def, _)) } = res {
2808+
res = Res::SelfTy { trait_, alias_to: Some((def, true)) }
28092809
} else {
28102810
if record_used {
28112811
self.report_error(

compiler/rustc_save_analysis/src/dump_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ impl<'tcx> DumpVisitor<'tcx> {
921921
| HirDefKind::AssocTy,
922922
_,
923923
)
924-
| Res::SelfTy(..) => {
924+
| Res::SelfTy { .. } => {
925925
self.dump_path_segment_ref(id, &hir::PathSegment::from_ident(ident));
926926
}
927927
def => {

compiler/rustc_save_analysis/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ impl<'tcx> SaveContext<'tcx> {
749749
_,
750750
)
751751
| Res::PrimTy(..)
752-
| Res::SelfTy(..)
752+
| Res::SelfTy { .. }
753753
| Res::ToolMod
754754
| Res::NonMacroAttr(..)
755755
| Res::SelfCtor(..)
@@ -814,7 +814,7 @@ impl<'tcx> SaveContext<'tcx> {
814814

815815
fn lookup_def_id(&self, ref_id: hir::HirId) -> Option<DefId> {
816816
match self.get_path_res(ref_id) {
817-
Res::PrimTy(_) | Res::SelfTy(..) | Res::Err => None,
817+
Res::PrimTy(_) | Res::SelfTy { .. } | Res::Err => None,
818818
def => def.opt_def_id(),
819819
}
820820
}

compiler/rustc_save_analysis/src/sig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ impl<'hir> Sig for hir::Path<'hir> {
573573
let res = scx.get_path_res(id.ok_or("Missing id for Path")?);
574574

575575
let (name, start, end) = match res {
576-
Res::PrimTy(..) | Res::SelfTy(..) | Res::Err => {
576+
Res::PrimTy(..) | Res::SelfTy { .. } | Res::Err => {
577577
return Ok(Signature { text: path_to_string(self), defs: vec![], refs: vec![] });
578578
}
579579
Res::Def(DefKind::AssocConst | DefKind::Variant | DefKind::Ctor(..), _) => {

compiler/rustc_typeck/src/astconv/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
18051805
// Find the type of the associated item, and the trait where the associated
18061806
// item is declared.
18071807
let bound = match (&qself_ty.kind(), qself_res) {
1808-
(_, Res::SelfTy(Some(_), Some((impl_def_id, _)))) => {
1808+
(_, Res::SelfTy { trait_: Some(_), alias_to: Some((impl_def_id, _)) }) => {
18091809
// `Self` in an impl of a trait -- we have a concrete self type and a
18101810
// trait reference.
18111811
let trait_ref = match tcx.impl_trait_ref(impl_def_id) {
@@ -1826,7 +1826,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
18261826
}
18271827
(
18281828
&ty::Param(_),
1829-
Res::SelfTy(Some(param_did), None) | Res::Def(DefKind::TyParam, param_did),
1829+
Res::SelfTy { trait_: Some(param_did), alias_to: None }
1830+
| Res::Def(DefKind::TyParam, param_did),
18301831
) => self.find_bound_for_assoc_item(param_did.expect_local(), assoc_ident, span)?,
18311832
_ => {
18321833
if variant_resolution.is_some() {
@@ -2270,13 +2271,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
22702271
let index = generics.param_def_id_to_index[&def_id];
22712272
tcx.mk_ty_param(index, tcx.hir().name(hir_id))
22722273
}
2273-
Res::SelfTy(Some(_), None) => {
2274+
Res::SelfTy { trait_: Some(_), alias_to: None } => {
22742275
// `Self` in trait or type alias.
22752276
assert_eq!(opt_self_ty, None);
22762277
self.prohibit_generics(path.segments);
22772278
tcx.types.self_param
22782279
}
2279-
Res::SelfTy(_, Some((def_id, forbid_generic))) => {
2280+
Res::SelfTy { trait_: _, alias_to: Some((def_id, forbid_generic)) } => {
22802281
// `Self` in impl (we know the concrete type).
22812282
assert_eq!(opt_self_ty, None);
22822283
self.prohibit_generics(path.segments);

compiler/rustc_typeck/src/check/check.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,12 @@ pub(super) fn check_opaque_for_inheriting_lifetimes<'tcx>(
522522
fn visit_ty(&mut self, arg: &'tcx hir::Ty<'tcx>) {
523523
match arg.kind {
524524
hir::TyKind::Path(hir::QPath::Resolved(None, path)) => match &path.segments {
525-
[PathSegment { res: Some(Res::SelfTy(_, impl_ref)), .. }] => {
525+
[
526+
PathSegment {
527+
res: Some(Res::SelfTy { trait_: _, alias_to: impl_ref }),
528+
..
529+
},
530+
] => {
526531
let impl_ty_name =
527532
impl_ref.map(|(def_id, _)| self.tcx.def_path_str(def_id));
528533
self.selftys.push((path.span, impl_ty_name));

compiler/rustc_typeck/src/check/fn_ctxt/checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
578578
_ => bug!("unexpected type: {:?}", ty),
579579
},
580580
Res::Def(DefKind::Struct | DefKind::Union | DefKind::TyAlias | DefKind::AssocTy, _)
581-
| Res::SelfTy(..) => match ty.kind() {
581+
| Res::SelfTy { .. } => match ty.kind() {
582582
ty::Adt(adt, substs) if !adt.is_enum() => {
583583
Some((adt.non_enum_variant(), adt.did, substs))
584584
}

compiler/rustc_typeck/src/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
562562
Res::Def(DefKind::Ctor(CtorOf::Struct, ..), _)
563563
| Res::Def(DefKind::Struct | DefKind::Union | DefKind::TyAlias | DefKind::AssocTy, _)
564564
| Res::SelfCtor(..)
565-
| Res::SelfTy(..) => {
565+
| Res::SelfTy { .. } => {
566566
// Structs and Unions have only have one variant.
567567
Ok(VariantIdx::new(0))
568568
}

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ impl Path {
19721972
/// Checks if this is a `T::Name` path for an associated type.
19731973
crate fn is_assoc_ty(&self) -> bool {
19741974
match self.res {
1975-
Res::SelfTy(..) if self.segments.len() != 1 => true,
1975+
Res::SelfTy { .. } if self.segments.len() != 1 => true,
19761976
Res::Def(DefKind::TyParam, _) if self.segments.len() != 1 => true,
19771977
Res::Def(DefKind::AssocTy, _) => true,
19781978
_ => false,

0 commit comments

Comments
 (0)