]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-call-lifetime-args-lint.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / method-call-lifetime-args-lint.rs
1 #![deny(late_bound_lifetime_arguments)]
2 #![allow(unused)]
3
4 struct S;
5
6 impl S {
7     fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {}
8     fn late_implicit(self, _: &u8, _: &u8) {}
9 }
10
11 fn method_call() {
12     S.late::<'static>(&0, &0);
13     //~^ ERROR cannot specify lifetime arguments explicitly
14     //~| WARN this was previously accepted
15
16     S.late_implicit::<'static>(&0, &0);
17     //~^ ERROR cannot specify lifetime arguments explicitly
18     //~| WARN this was previously accepted
19 }
20
21 fn main() {}