mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Hide lifetimes of impl Trait
in force trimmed paths
This commit is contained in:
parent
252c43b42b
commit
ab8dc9a0ad
@ -1084,9 +1084,11 @@ pub trait PrettyPrinter<'tcx>:
|
||||
write!(self, "Sized")?;
|
||||
}
|
||||
|
||||
for re in lifetimes {
|
||||
write!(self, " + ")?;
|
||||
self = self.print_region(re)?;
|
||||
if !FORCE_TRIMMED_PATH.with(|flag| flag.get()) {
|
||||
for re in lifetimes {
|
||||
write!(self, " + ")?;
|
||||
self = self.print_region(re)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(self)
|
||||
|
@ -114,7 +114,7 @@ LL | union U3 { f: ManuallyDrop<dyn Iterator<Item: 'static>> }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: within `ManuallyDrop<(dyn Iterator<Item = impl Sized + 'static> + 'static)>`, the trait `Sized` is not implemented for `(dyn Iterator<Item = impl Sized + 'static> + 'static)`
|
||||
= note: required because it appears within the type `ManuallyDrop<dyn Iterator<Item = impl Sized + 'static>>`
|
||||
= note: required because it appears within the type `ManuallyDrop<dyn Iterator<Item = impl Sized>>`
|
||||
= note: no field of a union may have a dynamically sized type
|
||||
= help: change the field's type to have a statically known size
|
||||
help: borrowed types always have a statically known size
|
||||
|
Loading…
Reference in New Issue
Block a user