Skip to content

Commit 64d5515

Browse files
committed
Auto merge of rust-lang#119447 - Nilstrieb:STACKOVERFLOW, r=compiler-errors
Fix `<BoundConstness as Display>` There was infinite recursion, which is not very good. I'm not sure what the best way to implement this is, I just did something that felt right. r? `@fmease`
2 parents d868bc2 + e36a24e commit 64d5515

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+2
-1
lines changed

compiler/rustc_middle/src/ty/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ impl fmt::Display for BoundConstness {
333333
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
334334
match self {
335335
Self::NotConst => f.write_str("normal"),
336-
_ => write!(f, "`{self}`"),
336+
Self::Const => f.write_str("const"),
337+
Self::ConstIfConst => f.write_str("~const"),
337338
}
338339
}
339340
}

0 commit comments

Comments
 (0)