mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Pretty-print uninhabited const values more explicitly.
This commit is contained in:
parent
47ab5f7ce2
commit
e291234f59
@ -1218,8 +1218,15 @@ pub trait PrettyPrinter<'tcx>:
|
||||
}
|
||||
p!(")");
|
||||
}
|
||||
ty::Adt(def, substs) if def.variants.is_empty() => {
|
||||
p!(print_value_path(def.did, substs));
|
||||
ty::Adt(def, _) if def.variants.is_empty() => {
|
||||
self = self.typed_value(
|
||||
|mut this| {
|
||||
write!(this, "unreachable()")?;
|
||||
Ok(this)
|
||||
},
|
||||
|this| this.print_type(ty),
|
||||
": ",
|
||||
)?;
|
||||
}
|
||||
ty::Adt(def, substs) => {
|
||||
let variant_id =
|
||||
|
Loading…
Reference in New Issue
Block a user