about summary refs log tree commit diff
path: root/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs
blob: 5b22fce6311bd5e586f9d6ae9bf1dc56b4ec36af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

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() {}