summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr')
-rw-r--r--src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr b/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr
new file mode 100644
index 000000000..e74c2c421
--- /dev/null
+++ b/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr
@@ -0,0 +1,24 @@
+error[E0277]: the trait bound `(): Bar` is not satisfied
+ --> $DIR/impl-trait-return-trailing-semicolon.rs:9:13
+ |
+LL | fn foo() -> impl Bar {
+ | ^^^^^^^^ the trait `Bar` is not implemented for `()`
+LL |
+LL | 5;
+ | -- help: remove this semicolon
+ | |
+ | this expression has type `{integer}`, which implements `Bar`
+
+error[E0277]: the trait bound `(): Bar` is not satisfied
+ --> $DIR/impl-trait-return-trailing-semicolon.rs:15:13
+ |
+LL | fn bar() -> impl Bar {
+ | ^^^^^^^^ the trait `Bar` is not implemented for `()`
+ |
+ = help: the following other types implement trait `Bar`:
+ Qux
+ i32
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.