diff options
Diffstat (limited to 'src/test/ui/const-generics')
| -rw-r--r-- | src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr | 50 |
2 files changed, 50 insertions, 3 deletions
diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs index 308c121a941..24031aa1e61 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs @@ -5,6 +5,7 @@ impl<const N: u32> Trait for Uwu<N> {} fn rawr() -> impl Trait { //~^ error: the trait bound `Uwu<10_u32, 12_u32>: Trait` is not satisfied + //~| error: the trait bound `Uwu<10_u32, 12_u32>: Trait` is not satisfied Uwu::<10, 12> } @@ -16,11 +17,13 @@ impl Traitor<1, 2> for u64 {} fn uwu<const N: u8>() -> impl Traitor<N> { //~^ error: the trait bound `u32: Traitor<N, N>` is not satisfied + //~| error: the trait bound `u32: Traitor<N, N>` is not satisfied 1_u32 } fn owo() -> impl Traitor { //~^ error: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied + //~| error: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied 1_u64 } 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 index 19813a491c9..81cfcb35606 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr @@ -7,8 +7,22 @@ LL | fn rawr() -> impl Trait { = help: the following implementations were found: <Uwu<N> as Trait> +error[E0277]: the trait bound `Uwu<10_u32, 12_u32>: Trait` is not satisfied + --> $DIR/rp_impl_trait_fail.rs:6:25 + | +LL | fn rawr() -> impl Trait { + | _________________________^ +LL | | +LL | | +LL | | Uwu::<10, 12> +LL | | } + | |_^ the trait `Trait` is not implemented for `Uwu<10_u32, 12_u32>` + | + = help: the following implementations were found: + <Uwu<N> as Trait> + error[E0277]: the trait bound `u32: Traitor<N, N>` is not satisfied - --> $DIR/rp_impl_trait_fail.rs:17:26 + --> $DIR/rp_impl_trait_fail.rs:18:26 | LL | fn uwu<const N: u8>() -> impl Traitor<N> { | ^^^^^^^^^^^^^^^ the trait `Traitor<N, N>` is not implemented for `u32` @@ -17,8 +31,23 @@ LL | fn uwu<const N: u8>() -> impl Traitor<N> { <u32 as Traitor<N, 2_u8>> <u64 as Traitor<1_u8, 2_u8>> +error[E0277]: the trait bound `u32: Traitor<N, N>` is not satisfied + --> $DIR/rp_impl_trait_fail.rs:18:42 + | +LL | fn uwu<const N: u8>() -> impl Traitor<N> { + | __________________________________________^ +LL | | +LL | | +LL | | 1_u32 +LL | | } + | |_^ the trait `Traitor<N, N>` is not implemented for `u32` + | + = help: the following implementations were found: + <u32 as Traitor<N, 2_u8>> + <u64 as Traitor<1_u8, 2_u8>> + error[E0277]: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied - --> $DIR/rp_impl_trait_fail.rs:22:13 + --> $DIR/rp_impl_trait_fail.rs:24:13 | LL | fn owo() -> impl Traitor { | ^^^^^^^^^^^^ the trait `Traitor<1_u8, 1_u8>` is not implemented for `u64` @@ -27,6 +56,21 @@ LL | fn owo() -> impl Traitor { <u64 as Traitor<1_u8, 2_u8>> <u32 as Traitor<N, 2_u8>> -error: aborting due to 3 previous errors +error[E0277]: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied + --> $DIR/rp_impl_trait_fail.rs:24:26 + | +LL | fn owo() -> impl Traitor { + | __________________________^ +LL | | +LL | | +LL | | 1_u64 +LL | | } + | |_^ the trait `Traitor<1_u8, 1_u8>` is not implemented for `u64` + | + = help: the following implementations were found: + <u64 as Traitor<1_u8, 2_u8>> + <u32 as Traitor<N, 2_u8>> + +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0277`. |
