Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
15
tests/ui/traits/inductive-overflow/supertrait.rs
Normal file
15
tests/ui/traits/inductive-overflow/supertrait.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Regression test for #29859, supertrait version. This example
|
||||
// allowed arbitrary trait bounds to be synthesized.
|
||||
|
||||
trait Magic: Copy {}
|
||||
impl<T: Magic> Magic for T {}
|
||||
|
||||
fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
|
||||
|
||||
#[derive(Debug)]
|
||||
struct NoClone;
|
||||
|
||||
fn main() {
|
||||
let (a, b) = copy(NoClone); //~ ERROR E0275
|
||||
println!("{:?} {:?}", a, b);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue