summaryrefslogtreecommitdiffstats
path: root/src/test/ui/never_type/impl_trait_fallback2.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/never_type/impl_trait_fallback2.stderr')
-rw-r--r--src/test/ui/never_type/impl_trait_fallback2.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/never_type/impl_trait_fallback2.stderr b/src/test/ui/never_type/impl_trait_fallback2.stderr
new file mode 100644
index 000000000..78cc83bdb
--- /dev/null
+++ b/src/test/ui/never_type/impl_trait_fallback2.stderr
@@ -0,0 +1,19 @@
+error[E0277]: the trait bound `(): T` is not satisfied
+ --> $DIR/impl_trait_fallback2.rs:8:25
+ |
+LL | fn should_ret_unit() -> impl T {
+ | ^^^^^^ the trait `T` is not implemented for `()`
+ |
+ = help: the trait `T` is implemented for `i32`
+
+error[E0277]: the trait bound `(): T` is not satisfied
+ --> $DIR/impl_trait_fallback2.rs:15:11
+ |
+LL | fn a() -> Foo {
+ | ^^^ the trait `T` is not implemented for `()`
+ |
+ = help: the trait `T` is implemented for `i32`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.