We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c49895d commit 5038faeCopy full SHA for 5038fae
compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1217,8 +1217,15 @@ pub trait PrettyPrinter<'tcx>:
1217
}
1218
p!(")");
1219
1220
- ty::Adt(def, substs) if def.variants.is_empty() => {
1221
- p!(print_value_path(def.did, substs));
+ ty::Adt(def, _) if def.variants.is_empty() => {
+ self = self.typed_value(
1222
+ |mut this| {
1223
+ write!(this, "unreachable()")?;
1224
+ Ok(this)
1225
+ },
1226
+ |this| this.print_type(ty),
1227
+ ": ",
1228
+ )?;
1229
1230
ty::Adt(def, substs) => {
1231
let variant_id =
0 commit comments