]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-no-direct-lifetime-dispatch.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / 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() {}