fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
620 B17 linesraw
1// run-rustfix
2
3// In this regression test for #67146, we check that the
4// negative outlives bound `!'a` is rejected by the parser.
5// This regression was first introduced in PR #57364.
6
7fn main() {}
8
9pub fn f1<T: 'static>() {}
10//~^ ERROR negative bounds are not supported
11//~| ERROR `!` may only modify trait bounds, not lifetime bound
12pub fn f2<'a, T: Ord + 'a>() {}
13//~^ ERROR negative bounds are not supported
14//~| ERROR `!` may only modify trait bounds, not lifetime bound
15pub fn f3<'a, T: 'a + Ord>() {}
16//~^ ERROR negative bounds are not supported
17//~| ERROR `!` may only modify trait bounds, not lifetime bound