summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/negative-bounds/associated-constraints.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/traits/negative-bounds/associated-constraints.stderr
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/negative-bounds/associated-constraints.stderr')
-rw-r--r--tests/ui/traits/negative-bounds/associated-constraints.stderr34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/ui/traits/negative-bounds/associated-constraints.stderr b/tests/ui/traits/negative-bounds/associated-constraints.stderr
new file mode 100644
index 000000000..335ac7e5a
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/associated-constraints.stderr
@@ -0,0 +1,34 @@
+error: associated type constraints not allowed on negative bounds
+ --> $DIR/associated-constraints.rs:8:19
+ |
+LL | fn test<T: !Trait<Assoc = i32>>() {}
+ | ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+ --> $DIR/associated-constraints.rs:11:31
+ |
+LL | fn test2<T>() where T: !Trait<Assoc = i32> {}
+ | ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+ --> $DIR/associated-constraints.rs:14:20
+ |
+LL | fn test3<T: !Trait<Assoc: Send>>() {}
+ | ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+ --> $DIR/associated-constraints.rs:17:31
+ |
+LL | fn test4<T>() where T: !Trait<Assoc: Send> {}
+ | ^^^^^^^^^^^
+
+warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/associated-constraints.rs:1:12
+ |
+LL | #![feature(negative_bounds, associated_type_bounds)]
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+
+error: aborting due to 4 previous errors; 1 warning emitted
+