]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / coherence / coherence-no-direct-lifetime-dispatch.rs
1 // Test that you cannot *directly* dispatch on lifetime requirements
2
3 // revisions: old re
4
5 #![cfg_attr(re, feature(re_rebalance_coherence))]
6
7 trait MyTrait { fn foo() {} }
8
9 impl<T> MyTrait for T {}
10 impl<T: 'static> MyTrait for T {}
11 //[old]~^ ERROR E0119
12 //[re]~^^ ERROR E0119
13
14 fn main() {}