summaryrefslogtreecommitdiffstats
path: root/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr')
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr95
1 files changed, 95 insertions, 0 deletions
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
new file mode 100644
index 000000000..d66e46887
--- /dev/null
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
@@ -0,0 +1,95 @@
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:14:19
+ |
+LL | enum E where i32: Foo { V }
+ | ^^^
+ |
+ = note: `#[warn(trivial_bounds)]` on by default
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:16:21
+ |
+LL | struct S where i32: Foo;
+ | ^^^
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:18:20
+ |
+LL | trait T where i32: Foo {}
+ | ^^^
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:20:20
+ |
+LL | union U where i32: Foo { f: i32 }
+ | ^^^
+
+warning: where clauses are not enforced in type aliases
+ --> $DIR/trivial-bounds-inconsistent.rs:22:14
+ |
+LL | type Y where i32: Foo = ();
+ | ^^^^^^^^
+ |
+ = note: `#[warn(type_alias_bounds)]` on by default
+help: the clause will not be checked when the type alias is used, and should be removed
+ |
+LL - type Y where i32: Foo = ();
+LL + type Y = ();
+ |
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:22:19
+ |
+LL | type Y where i32: Foo = ();
+ | ^^^
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:26:28
+ |
+LL | impl Foo for () where i32: Foo {
+ | ^^^
+
+warning: trait bound i32: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:34:19
+ |
+LL | fn f() where i32: Foo {
+ | ^^^
+
+warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:41:28
+ |
+LL | fn g() where &'static str: Foo {
+ | ^^^
+
+warning: trait bound str: Sized does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:55:37
+ |
+LL | struct TwoStrs(str, str) where str: Sized;
+ | ^^^^^
+
+warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:57:51
+ |
+LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
+ | ^^^^^
+
+warning: trait bound str: Sized does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:61:35
+ |
+LL | fn return_str() -> str where str: Sized {
+ | ^^^^^
+
+warning: trait bound String: Neg does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:65:46
+ |
+LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: trait bound i32: Iterator does not depend on any type or lifetime parameters
+ --> $DIR/trivial-bounds-inconsistent.rs:70:25
+ |
+LL | fn use_for() where i32: Iterator {
+ | ^^^^^^^^
+
+warning: 14 warnings emitted
+