summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/issue-82566-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/issue-82566-1.rs')
-rw-r--r--src/test/ui/suggestions/issue-82566-1.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/issue-82566-1.rs b/src/test/ui/suggestions/issue-82566-1.rs
new file mode 100644
index 000000000..95c31fbaa
--- /dev/null
+++ b/src/test/ui/suggestions/issue-82566-1.rs
@@ -0,0 +1,21 @@
+struct T1<const X1: usize>;
+struct T2<const X1: usize, const X2: usize>;
+struct T3<const X1: usize, const X2: usize, const X3: usize>;
+
+impl T1<1> {
+ const C: () = ();
+}
+
+impl T2<1, 2> {
+ const C: () = ();
+}
+
+impl T3<1, 2, 3> {
+ const C: () = ();
+}
+
+fn main() {
+ T1<1>::C; //~ ERROR: comparison operators cannot be chained
+ T2<1, 2>::C; //~ ERROR: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
+ T3<1, 2, 3>::C; //~ ERROR: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
+}