]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / coherence / coherence-no-direct-lifetime-dispatch.rs
1 // Test that you cannot *directly* dispatch on lifetime requirements
2
3 trait MyTrait { fn foo() {} }
4
5 impl<T> MyTrait for T {}
6 impl<T: 'static> MyTrait for T {}
7 //~^ ERROR E0119
8
9 fn main() {}