File: mismatched_ty_const_in_trait_impl.stderr

package info (click to toggle)
rustc 1.86.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 913,560 kB
  • sloc: xml: 158,127; python: 35,921; javascript: 19,689; sh: 19,600; cpp: 18,906; ansic: 13,124; asm: 4,376; makefile: 708; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (68 lines) | stat: -rw-r--r-- 2,247 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
error[E0053]: associated function `foo` has an incompatible generic parameter for trait `Trait`
  --> $DIR/mismatched_ty_const_in_trait_impl.rs:5:12
   |
LL | trait Trait {
   |       -----
LL |     fn foo<U>() {}
   |            - expected type parameter
LL | }
LL | impl Trait for () {
   | -----------------
LL |     fn foo<const M: u64>() {}
   |            ^^^^^^^^^^^^ found const parameter of type `u64`

error[E0053]: associated function `bar` has an incompatible generic parameter for trait `Other`
  --> $DIR/mismatched_ty_const_in_trait_impl.rs:13:12
   |
LL | trait Other {
   |       -----
LL |     fn bar<const M: u8>() {}
   |            ----------- expected const parameter of type `u8`
LL | }
LL | impl Other for () {
   | -----------------
LL |     fn bar<T>() {}
   |            ^ found type parameter

error[E0053]: associated function `baz` has an incompatible generic parameter for trait `Uwu`
  --> $DIR/mismatched_ty_const_in_trait_impl.rs:21:12
   |
LL | trait Uwu {
   |       ---
LL |     fn baz<const N: u32>() {}
   |            ------------ expected const parameter of type `u32`
LL | }
LL | impl Uwu for () {
   | ---------------
LL |     fn baz<const N: i32>() {}
   |            ^^^^^^^^^^^^ found const parameter of type `i32`

error[E0053]: associated function `bbbb` has an incompatible generic parameter for trait `Aaaaaa`
  --> $DIR/mismatched_ty_const_in_trait_impl.rs:29:13
   |
LL | trait Aaaaaa {
   |       ------
LL |     fn bbbb<const N: u32, T>() {}
   |             ------------ expected const parameter of type `u32`
LL | }
LL | impl Aaaaaa for () {
   | ------------------
LL |     fn bbbb<T, const N: u32>() {}
   |             ^ found type parameter

error[E0053]: associated function `abcd` has an incompatible generic parameter for trait `Names`
  --> $DIR/mismatched_ty_const_in_trait_impl.rs:37:13
   |
LL | trait Names {
   |       -----
LL |     fn abcd<T, const N: u32>() {}
   |             - expected type parameter
LL | }
LL | impl Names for () {
   | -----------------
LL |     fn abcd<const N: u32, T>() {}
   |             ^^^^^^^^^^^^ found const parameter of type `u32`

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0053`.