summaryrefslogtreecommitdiffstats
path: root/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.rs
blob: d466dcac1c48cdde09775f8fc4b5b386ef4064c5 (plain)
1
2
3
4
5
6
7
8
9
// Test that you cannot *directly* dispatch on lifetime requirements

trait MyTrait { fn foo() {} }

impl<T> MyTrait for T {}
impl<T: 'static> MyTrait for T {}
//~^ ERROR E0119

fn main() {}