1
Fork 0

Hide InlineConst's generic arg during print

The generic arg is for type inference only and shouldn't be exposed
to users.
This commit is contained in:
Gary Guo 2022-04-29 15:27:05 +01:00
parent ea5fa17998
commit bf4d7fa43f

View file

@ -136,6 +136,10 @@ pub trait Printer<'tcx>: Sized {
match key.disambiguated_data.data {
// Closures' own generics are only captures, don't print them.
DefPathData::ClosureExpr => {}
// This covers both `DefKind::AnonConst` and `DefKind::InlineConst`.
// Anon consts doesn't have their own generics, and inline consts' own
// generics are their inferred types, so don't print them.
DefPathData::AnonConst => {}
// If we have any generic arguments to print, we do that
// on top of the same path, but without its own generics.