Update src/test/ui/unsized/issue-97732.rs
Co-authored-by: Eduard-Mihai Burtescu <edy.burt@gmail.com>
This commit is contained in:
parent
857453d36c
commit
10336cf162
@ -15,9 +15,14 @@ impl<S: ?Sized, T: ?Sized> CoerceUnsized<BoxWithZstTail<T>> for BoxWithZstTail<S
|
||||
}
|
||||
|
||||
pub fn noop_dyn_upcast_with_zst_tail(
|
||||
b: BoxWithZstTail<dyn Send + Sync>,
|
||||
) -> BoxWithZstTail<dyn Send> {
|
||||
b: BoxWithZstTail<dyn ToString + Send>,
|
||||
) -> BoxWithZstTail<dyn ToString> {
|
||||
b
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
fn main() {
|
||||
let original = "foo";
|
||||
let boxed = BoxWithZstTail(Box::new(original) as Box<dyn ToString + Send>, ());
|
||||
let noop_upcasted = noop_dyn_upcast_with_zst_tail(boxed);
|
||||
assert_eq!(original, noop_upcasted.0.to_string());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user