blob: ffc21a4a9ea50f7efe5924ad78a544860dec7dfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[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() {}
|