summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr')
-rw-r--r--src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr
new file mode 100644
index 000000000..f2e7777ce
--- /dev/null
+++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr
@@ -0,0 +1,40 @@
+error[E0277]: the trait bound `Uwu<10, 12>: Trait` is not satisfied
+ --> $DIR/rp_impl_trait_fail.rs:6:14
+ |
+LL | fn rawr() -> impl Trait {
+ | ^^^^^^^^^^ the trait `Trait` is not implemented for `Uwu<10, 12>`
+LL |
+LL | Uwu::<10, 12>
+ | ------------- return type was inferred to be `Uwu<10, 12>` here
+ |
+ = help: the trait `Trait` is implemented for `Uwu<N>`
+
+error[E0277]: the trait bound `u32: Traitor<N>` is not satisfied
+ --> $DIR/rp_impl_trait_fail.rs:16:26
+ |
+LL | fn uwu<const N: u8>() -> impl Traitor<N> {
+ | ^^^^^^^^^^^^^^^ the trait `Traitor<N>` is not implemented for `u32`
+LL |
+LL | 1_u32
+ | ----- return type was inferred to be `u32` here
+ |
+ = help: the following other types implement trait `Traitor<N, M>`:
+ <u32 as Traitor<N, 2>>
+ <u64 as Traitor<1, 2>>
+
+error[E0277]: the trait bound `u64: Traitor` is not satisfied
+ --> $DIR/rp_impl_trait_fail.rs:21:13
+ |
+LL | fn owo() -> impl Traitor {
+ | ^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u64`
+LL |
+LL | 1_u64
+ | ----- return type was inferred to be `u64` here
+ |
+ = help: the following other types implement trait `Traitor<N, M>`:
+ <u32 as Traitor<N, 2>>
+ <u64 as Traitor<1, 2>>
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.