]> git.lizzy.rs Git - rust.git/blob - src/test/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / trivial-bounds / trivial-bounds-inconsistent-associated-functions.rs
1 // run-pass
2 // Inconsistent bounds with trait implementations
3
4 #![feature(trivial_bounds)]
5 #![allow(unused)]
6
7 trait A {
8     fn foo(&self) -> Self where Self: Copy;
9 }
10
11 impl A for str {
12     fn foo(&self) -> Self where Self: Copy { *"" }
13 }
14
15 impl A for i32 {
16     fn foo(&self) -> Self { 3 }
17 }
18
19 fn main() {}