diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/generic-const-items/compare-impl-item.stderr | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/generic-const-items/compare-impl-item.stderr')
-rw-r--r-- | tests/ui/generic-const-items/compare-impl-item.stderr | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/ui/generic-const-items/compare-impl-item.stderr b/tests/ui/generic-const-items/compare-impl-item.stderr new file mode 100644 index 000000000..8610d8cba --- /dev/null +++ b/tests/ui/generic-const-items/compare-impl-item.stderr @@ -0,0 +1,66 @@ +error[E0049]: const `A` has 1 type parameter but its trait declaration has 0 type parameters + --> $DIR/compare-impl-item.rs:15:13 + | +LL | const A: (); + | - expected 0 type parameters +... +LL | const A<T>: () = (); + | ^ found 1 type parameter + +error[E0049]: const `B` has 1 const parameter but its trait declaration has 2 const parameters + --> $DIR/compare-impl-item.rs:17:13 + | +LL | const B<const K: u64, const Q: u64>: u64; + | ------------ ------------ + | | + | expected 2 const parameters +... +LL | const B<const K: u64>: u64 = 0; + | ^^^^^^^^^^^^ found 1 const parameter + +error[E0049]: const `C` has 0 type parameters but its trait declaration has 1 type parameter + --> $DIR/compare-impl-item.rs:19:13 + | +LL | const C<T>: T; + | - expected 1 type parameter +... +LL | const C<'a>: &'a str = ""; + | ^^ found 0 type parameters + +error[E0053]: const `D` has an incompatible generic parameter for trait `Trait` + --> $DIR/compare-impl-item.rs:21:13 + | +LL | trait Trait<P> { + | ----- +... +LL | const D<const N: usize>: usize; + | -------------- expected const parameter of type `usize` +... +LL | impl<P> Trait<P> for () { + | ----------------------- +... +LL | const D<const N: u16>: u16 = N; + | ^^^^^^^^^^^^ found const parameter of type `u16` + +error[E0276]: impl has stricter requirements than trait + --> $DIR/compare-impl-item.rs:26:12 + | +LL | const E: usize; + | -------------- definition of `E` from trait +... +LL | P: Copy; + | ^^^^ impl has extra requirement `P: Copy` + +error[E0276]: impl has stricter requirements than trait + --> $DIR/compare-impl-item.rs:27:16 + | +LL | const F<T: PartialEq>: (); + | ------------------------- definition of `F` from trait +... +LL | const F<T: Eq>: () = (); + | ^^ impl has extra requirement `T: Eq` + +error: aborting due to 6 previous errors + +Some errors have detailed explanations: E0049, E0053, E0276. +For more information about an error, try `rustc --explain E0049`. |