fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.1 KiB66 linesraw
1error[E0049]: const `A` has 1 type parameter but its trait declaration has 0 type parameters
2  --> $DIR/compare-impl-item.rs:15:13
3   |
4LL |     const A: ();
5   |            - expected 0 type parameters
6...
7LL |     const A<T>: () = ();
8   |             ^ found 1 type parameter
9
10error[E0049]: const `B` has 1 const parameter but its trait declaration has 2 const parameters
11  --> $DIR/compare-impl-item.rs:17:13
12   |
13LL |     const B<const K: u64, const Q: u64>: u64;
14   |             ------------  ------------
15   |             |
16   |             expected 2 const parameters
17...
18LL |     const B<const K: u64>: u64 = 0;
19   |             ^^^^^^^^^^^^ found 1 const parameter
20
21error[E0049]: const `C` has 0 type parameters but its trait declaration has 1 type parameter
22  --> $DIR/compare-impl-item.rs:19:13
23   |
24LL |     const C<T>: T;
25   |             - expected 1 type parameter
26...
27LL |     const C<'a>: &'a str = "";
28   |             ^^ found 0 type parameters
29
30error[E0053]: const `D` has an incompatible generic parameter for trait `Trait`
31  --> $DIR/compare-impl-item.rs:21:13
32   |
33LL | trait Trait<P> {
34   |       -----
35...
36LL |     const D<const N: usize>: usize;
37   |             -------------- expected const parameter of type `usize`
38...
39LL | impl<P> Trait<P> for () {
40   | -----------------------
41...
42LL |     const D<const N: u16>: u16 = N;
43   |             ^^^^^^^^^^^^ found const parameter of type `u16`
44
45error[E0276]: impl has stricter requirements than trait
46  --> $DIR/compare-impl-item.rs:26:12
47   |
48LL |     const E: usize;
49   |     -------------- definition of `E` from trait
50...
51LL |         P: Copy;
52   |            ^^^^ impl has extra requirement `P: Copy`
53
54error[E0276]: impl has stricter requirements than trait
55  --> $DIR/compare-impl-item.rs:27:16
56   |
57LL |     const F<T: PartialEq>: ();
58   |     ------------------------- definition of `F` from trait
59...
60LL |     const F<T: Eq>: () = ();
61   |                ^^ impl has extra requirement `T: Eq`
62
63error: aborting due to 6 previous errors
64
65Some errors have detailed explanations: E0049, E0053, E0276.
66For more information about an error, try `rustc --explain E0049`.