Skip to content

Commit bf4d7fa

Browse files
committed
Hide InlineConst's generic arg during print
The generic arg is for type inference only and shouldn't be exposed to users.
1 parent ea5fa17 commit bf4d7fa

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_middle/src/ty/print

1 file changed

+4
-0
lines changed

Diff for: compiler/rustc_middle/src/ty/print/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ pub trait Printer<'tcx>: Sized {
136136
match key.disambiguated_data.data {
137137
// Closures' own generics are only captures, don't print them.
138138
DefPathData::ClosureExpr => {}
139+
// This covers both `DefKind::AnonConst` and `DefKind::InlineConst`.
140+
// Anon consts doesn't have their own generics, and inline consts' own
141+
// generics are their inferred types, so don't print them.
142+
DefPathData::AnonConst => {}
139143

140144
// If we have any generic arguments to print, we do that
141145
// on top of the same path, but without its own generics.

0 commit comments

Comments
 (0)