about summary refs log tree commit diff
path: root/tests/ui/parser/associated-path-shl.rs
diff options
context:
space:
mode:
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
commit30f5a039f07f830427fec693cdaff8724042cb12 (patch)
treefdfc3bd310a3e807150faa8f504059e5a967db15 /tests/ui/parser/associated-path-shl.rs
parent978c659b72ed7520332a74321dc8accf48b06d94 (diff)
downloadrust-30f5a039f07f830427fec693cdaff8724042cb12.tar.gz
rust-30f5a039f07f830427fec693cdaff8724042cb12.zip
Move `tests/ui/associated-path-shl.rs` to `tests/ui/parser/`
Diffstat (limited to 'tests/ui/parser/associated-path-shl.rs')
-rw-r--r--tests/ui/parser/associated-path-shl.rs9
1 files changed, 9 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
+}