]> git.lizzy.rs Git - rust.git/blob - src/test/ui/compare-method/region-unrelated.rs
Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14
[rust.git] / src / test / ui / compare-method / region-unrelated.rs
1 // Test that we elaborate `Type: 'region` constraints and infer various important things.
2
3 trait Master<'a, T: ?Sized, U> {
4     fn foo() where T: 'a;
5 }
6
7 // `U: 'a` does not imply `V: 'a`
8 impl<'a, U, V> Master<'a, U, V> for () {
9     fn foo() where V: 'a { }
10     //~^ ERROR impl has stricter requirements than trait
11 }
12
13 fn main() {
14     println!("Hello, world!");
15 }