about summary refs log tree commit diff
path: root/tests/ui/trivial-bounds
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-06-15 21:34:44 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-07-23 01:48:03 +0200
commitfdf8f024ad71c6e9c46867fb31b74df0fcaaf3f2 (patch)
tree4734f3cd875a36318edf34f613728dfe1c99fe4d /tests/ui/trivial-bounds
parenta8b3dfd25336dc12f17da23a0ed7004a4ebee234 (diff)
downloadrust-fdf8f024ad71c6e9c46867fb31b74df0fcaaf3f2.tar.gz
rust-fdf8f024ad71c6e9c46867fb31b74df0fcaaf3f2.zip
Improve the impl and diag output of lint type_alias_bounds
Diffstat (limited to 'tests/ui/trivial-bounds')
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
index d66e468873b..0eae68bfcf0 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
@@ -24,18 +24,19 @@ warning: trait bound i32: Foo does not depend on any type or lifetime parameters
 LL | union U where i32: Foo { f: i32 }
    |                    ^^^
 
-warning: where clauses are not enforced in type aliases
+warning: where clauses on type aliases are not enforced
   --> $DIR/trivial-bounds-inconsistent.rs:22:14
    |
 LL | type Y where i32: Foo = ();
-   |              ^^^^^^^^
-   |
+   |        ------^^^^^^^^
+   |        |     |
+   |        |     will not be checked at usage sites of the type alias
+   |        help: remove this where clause
+   |
+   = note: this is a known limitation of the type checker that may be lifted in a future edition.
+           see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
+   = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics
    = 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