mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +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")?;
|
write!(self, "Sized")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
for re in lifetimes {
|
if !FORCE_TRIMMED_PATH.with(|flag| flag.get()) {
|
||||||
write!(self, " + ")?;
|
for re in lifetimes {
|
||||||
self = self.print_region(re)?;
|
write!(self, " + ")?;
|
||||||
|
self = self.print_region(re)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(self)
|
Ok(self)
|
||||||
|
@ -114,7 +114,7 @@ LL | union U3 { f: ManuallyDrop<dyn Iterator<Item: 'static>> }
|
|||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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)`
|
= 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
|
= 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: change the field's type to have a statically known size
|
||||||
help: borrowed types always have a statically known size
|
help: borrowed types always have a statically known size
|
||||||
|
Loading…
Reference in New Issue
Block a user