diff --git a/src/test/ui/parser/issue-68890-2.rs b/src/test/ui/parser/issue-68890-2.rs new file mode 100644 index 00000000000..4bf56f0b0c2 --- /dev/null +++ b/src/test/ui/parser/issue-68890-2.rs @@ -0,0 +1,3 @@ +type X = (?'a) +; +//~^ ERROR `?` may only modify trait bounds, not lifetime bounds +//~| ERROR expected trait bound, not lifetime bound diff --git a/src/test/ui/parser/issue-68890-2.stderr b/src/test/ui/parser/issue-68890-2.stderr new file mode 100644 index 00000000000..d6196eb1506 --- /dev/null +++ b/src/test/ui/parser/issue-68890-2.stderr @@ -0,0 +1,14 @@ +error: `?` may only modify trait bounds, not lifetime bounds + --> $DIR/issue-68890-2.rs:1:11 + | +LL | type X = (?'a) +; + | ^ + +error: expected trait bound, not lifetime bound + --> $DIR/issue-68890-2.rs:1:11 + | +LL | type X = (?'a) +; + | ^^^ + +error: aborting due to 2 previous errors +