Files
rust/tests/ui/error-codes/E0195.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
729 B
Rust
Raw Normal View History

2016-06-01 16:30:13 +02:00
trait Trait {
//~^ NOTE in this trait...
//~| NOTE in this trait...
2016-06-01 16:30:13 +02:00
fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
//~^ NOTE `'a` is early-bound
//~| NOTE this lifetime bound makes `'a` early-bound
//~| NOTE `'b` is early-bound
//~| NOTE this lifetime bound makes `'b` early-bound
2016-06-01 16:30:13 +02:00
}
struct Foo;
impl Trait for Foo {
//~^ NOTE in this impl...
//~| NOTE in this impl...
fn bar<'a,'b>(x: &'a str, y: &'b str) {
//~^ ERROR E0195
//~| NOTE `'a` differs between the trait and impl
//~| NOTE `'a` is late-bound
//~| NOTE `'b` differs between the trait and impl
//~| NOTE `'b` is late-bound
//~| NOTE lifetime parameters differ in whether they are early- or late-bound
2016-06-01 16:30:13 +02:00
}
}
fn main() {
}