|
| 1 | +error[E0428]: the name `NonGeneric` is defined multiple times |
| 2 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:10:1 |
| 3 | + | |
| 4 | +LL | struct NonGeneric {} |
| 5 | + | ----------------- previous definition of the type `NonGeneric` here |
| 6 | +... |
| 7 | +LL | struct NonGeneric<'a, const N: usize> {} |
| 8 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `NonGeneric` redefined here |
| 9 | + | |
| 10 | + = note: `NonGeneric` must be defined only once in the type namespace of this module |
| 11 | + |
| 12 | +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied |
| 13 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:5:10 |
| 14 | + | |
| 15 | +LL | #[derive(Default)] |
| 16 | + | ^^^^^^^ expected 0 lifetime arguments |
| 17 | +... |
| 18 | +LL | struct NonGeneric<'a, const N: usize> {} |
| 19 | + | -- help: remove the lifetime argument |
| 20 | + | |
| 21 | +note: struct defined here, with 0 lifetime parameters |
| 22 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:3:8 |
| 23 | + | |
| 24 | +LL | struct NonGeneric {} |
| 25 | + | ^^^^^^^^^^ |
| 26 | + |
| 27 | +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied |
| 28 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:5:10 |
| 29 | + | |
| 30 | +LL | #[derive(Default)] |
| 31 | + | ^^^^^^^ expected 0 generic arguments |
| 32 | + | |
| 33 | +note: struct defined here, with 0 generic parameters |
| 34 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:3:8 |
| 35 | + | |
| 36 | +LL | struct NonGeneric {} |
| 37 | + | ^^^^^^^^^^ |
| 38 | + |
| 39 | +error[E0392]: lifetime parameter `'a` is never used |
| 40 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:10:19 |
| 41 | + | |
| 42 | +LL | struct NonGeneric<'a, const N: usize> {} |
| 43 | + | ^^ unused lifetime parameter |
| 44 | + | |
| 45 | + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` |
| 46 | + |
| 47 | +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied |
| 48 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:5:10 |
| 49 | + | |
| 50 | +LL | #[derive(Default)] |
| 51 | + | ^^^^^^^ expected 0 lifetime arguments |
| 52 | +... |
| 53 | +LL | struct NonGeneric<'a, const N: usize> {} |
| 54 | + | -- help: remove the lifetime argument |
| 55 | + | |
| 56 | +note: struct defined here, with 0 lifetime parameters |
| 57 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:3:8 |
| 58 | + | |
| 59 | +LL | struct NonGeneric {} |
| 60 | + | ^^^^^^^^^^ |
| 61 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 62 | + |
| 63 | +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied |
| 64 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:5:10 |
| 65 | + | |
| 66 | +LL | #[derive(Default)] |
| 67 | + | ^^^^^^^ expected 0 generic arguments |
| 68 | +... |
| 69 | +LL | struct NonGeneric<'a, const N: usize> {} |
| 70 | + | - help: remove the unnecessary generic argument |
| 71 | + | |
| 72 | +note: struct defined here, with 0 generic parameters |
| 73 | + --> $DIR/multiple-types-with-same-name-and-derive-default-133965.rs:3:8 |
| 74 | + | |
| 75 | +LL | struct NonGeneric {} |
| 76 | + | ^^^^^^^^^^ |
| 77 | + |
| 78 | +error: aborting due to 6 previous errors |
| 79 | + |
| 80 | +Some errors have detailed explanations: E0107, E0392, E0428. |
| 81 | +For more information about an error, try `rustc --explain E0107`. |
0 commit comments