about summary refs log tree commit diff
path: root/tests/ui/trivial-bounds
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-09-10 03:33:07 +0000
committerMichael Goulet <michael@errs.io>2023-09-10 21:20:36 +0000
commit30e6cea0ae4780bdd99e56fc85719dcb4305c900 (patch)
treed9bc44a8a86d3c6dcf9d2df277e6bba6d86cc5da /tests/ui/trivial-bounds
parent26f4b7272428b181e0a88ad075e5c8f09dcb0e5c (diff)
downloadrust-30e6cea0ae4780bdd99e56fc85719dcb4305c900.tar.gz
rust-30e6cea0ae4780bdd99e56fc85719dcb4305c900.zip
Point out if a local trait has no implementations
Diffstat (limited to 'tests/ui/trivial-bounds')
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-leak.stderr11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/trivial-bounds/trivial-bounds-leak.stderr b/tests/ui/trivial-bounds/trivial-bounds-leak.stderr
index 02c5d5d2484..be472a50769 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-leak.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-leak.stderr
@@ -27,6 +27,12 @@ LL |     Foo::test(&4i32);
    |     --------- ^^^^^ the trait `Foo` is not implemented for `i32`
    |     |
    |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/trivial-bounds-leak.rs:4:1
+   |
+LL | pub trait Foo {
+   | ^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/trivial-bounds-leak.rs:26:22
@@ -36,6 +42,11 @@ LL |     generic_function(5i32);
    |     |
    |     required by a bound introduced by this call
    |
+help: this trait has no implementations, consider adding one
+  --> $DIR/trivial-bounds-leak.rs:4:1
+   |
+LL | pub trait Foo {
+   | ^^^^^^^^^^^^^
 note: required by a bound in `generic_function`
   --> $DIR/trivial-bounds-leak.rs:29:24
    |