]> git.lizzy.rs Git - rust.git/blob - src/test/ui/compare-method/proj-outlives-region.rs
Rollup merge of #106248 - dtolnay:revertupcastlint, r=jackh726
[rust.git] / src / test / ui / compare-method / proj-outlives-region.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::Item: 'a` does not imply that `U: 'a`
8 impl<'a, U: Iterator> Master<'a, U::Item, U> for () {
9     fn foo() where U: 'a { } //~ ERROR E0276
10 }
11
12 fn main() {
13     println!("Hello, world!");
14 }