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 47ab5f7 commit e291234Copy full SHA for e291234
compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1218,8 +1218,15 @@ pub trait PrettyPrinter<'tcx>:
1218
}
1219
p!(")");
1220
1221
- ty::Adt(def, substs) if def.variants.is_empty() => {
1222
- p!(print_value_path(def.did, substs));
+ ty::Adt(def, _) if def.variants.is_empty() => {
+ self = self.typed_value(
1223
+ |mut this| {
1224
+ write!(this, "unreachable()")?;
1225
+ Ok(this)
1226
+ },
1227
+ |this| this.print_type(ty),
1228
+ ": ",
1229
+ )?;
1230
1231
ty::Adt(def, substs) => {
1232
let variant_id =
0 commit comments