diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-12-17 19:09:00 +0800 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-12-17 19:09:00 +0800 |
| commit | 30f5a039f07f830427fec693cdaff8724042cb12 (patch) | |
| tree | fdfc3bd310a3e807150faa8f504059e5a967db15 /tests/ui/parser | |
| parent | 978c659b72ed7520332a74321dc8accf48b06d94 (diff) | |
Move `tests/ui/associated-path-shl.rs` to `tests/ui/parser/`
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/associated-path-shl.rs | 9 | ||||
| -rw-r--r-- | tests/ui/parser/associated-path-shl.stderr | 33 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/ui/parser/associated-path-shl.rs b/tests/ui/parser/associated-path-shl.rs new file mode 100644 index 00000000000..20a6fd83faa --- /dev/null +++ b/tests/ui/parser/associated-path-shl.rs @@ -0,0 +1,9 @@ +// Check that associated paths starting with `<<` are successfully parsed. + +fn main() { + let _: <<A>::B>::C; //~ ERROR cannot find type `A` in this scope + let _ = <<A>::B>::C; //~ ERROR cannot find type `A` in this scope + let <<A>::B>::C; //~ ERROR cannot find type `A` in this scope + let 0 ..= <<A>::B>::C; //~ ERROR cannot find type `A` in this scope + <<A>::B>::C; //~ ERROR cannot find type `A` in this scope +} diff --git a/tests/ui/parser/associated-path-shl.stderr b/tests/ui/parser/associated-path-shl.stderr new file mode 100644 index 00000000000..71ee93f4835 --- /dev/null +++ b/tests/ui/parser/associated-path-shl.stderr @@ -0,0 +1,33 @@ +error[E0412]: cannot find type `A` in this scope + --> $DIR/associated-path-shl.rs:4:14 + | +LL | let _: <<A>::B>::C; + | ^ not found in this scope + +error[E0412]: cannot find type `A` in this scope + --> $DIR/associated-path-shl.rs:5:15 + | +LL | let _ = <<A>::B>::C; + | ^ not found in this scope + +error[E0412]: cannot find type `A` in this scope + --> $DIR/associated-path-shl.rs:6:11 + | +LL | let <<A>::B>::C; + | ^ not found in this scope + +error[E0412]: cannot find type `A` in this scope + --> $DIR/associated-path-shl.rs:7:17 + | +LL | let 0 ..= <<A>::B>::C; + | ^ not found in this scope + +error[E0412]: cannot find type `A` in this scope + --> $DIR/associated-path-shl.rs:8:7 + | +LL | <<A>::B>::C; + | ^ not found in this scope + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0412`. |
