rust/tests/ui/compare-method/region-extra.rs

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

15 lines
271 B
Rust
Raw Normal View History

// Test that you cannot add an extra where clause in the impl relating
// two regions.
2016-10-03 15:00:09 -05:00
trait Master<'a, 'b> {
fn foo();
2016-10-03 15:00:09 -05:00
}
impl<'a, 'b> Master<'a, 'b> for () {
2017-11-20 06:13:27 -06:00
fn foo() where 'a: 'b { } //~ ERROR impl has stricter
2016-10-03 15:00:09 -05:00
}
fn main() {
println!("Hello, world!");
}