2023-12-26 21:17:37 -06:00
|
|
|
//@ check-pass
|
|
|
|
//@ revisions: current next
|
2024-03-10 20:18:41 -05:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-26 21:17:37 -06:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
|
|
|
|
#![feature(trait_upcasting)]
|
|
|
|
|
|
|
|
trait Target {}
|
|
|
|
trait Source: Send + Target {}
|
|
|
|
|
|
|
|
fn upcast(x: &dyn Source) -> &(dyn Target + Send) { x }
|
|
|
|
|
|
|
|
fn same(x: &dyn Source) -> &(dyn Source + Send) { x }
|
|
|
|
|
|
|
|
fn main() {}
|