-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
ConstArgKind::Path
for all paths
Like in the previous commit, (most of) these changes to error output are not desired. They are merely committed temporarily to make it easier to see what's changed.
- Loading branch information
Showing
5 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/bad-generic-in-copy-impl.rs:3:13 | ||
error: the constant `1` is not of type `usize` | ||
--> $DIR/bad-generic-in-copy-impl.rs:3:8 | ||
| | ||
LL | x: [u8; SIZE], | ||
| ^^^^ expected `usize`, found `u32` | ||
| ^^^^^^^^^^ expected `usize`, found `u32` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/bad-generic-in-copy-impl.rs:3:13 | ||
error[E0204]: the trait `Copy` cannot be implemented for this type | ||
--> $DIR/bad-generic-in-copy-impl.rs:1:10 | ||
| | ||
LL | #[derive(Copy, Clone)] | ||
| ^^^^ | ||
LL | pub struct Foo { | ||
LL | x: [u8; SIZE], | ||
| ^^^^ expected `usize`, found `u32` | ||
| ------------- this field does not implement `Copy` | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
note: the `Copy` impl for `[u8; 1]` requires that `the constant `1` has type `usize`` | ||
--> $DIR/bad-generic-in-copy-impl.rs:3:8 | ||
| | ||
LL | x: [u8; SIZE], | ||
| ^^^^^^^^^^ | ||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: the constant `1` is not of type `usize` | ||
--> $DIR/bad-generic-in-copy-impl.rs:3:5 | ||
| | ||
LL | #[derive(Copy, Clone)] | ||
| ----- in this derive macro expansion | ||
LL | pub struct Foo { | ||
LL | x: [u8; SIZE], | ||
| ^^^^^^^^^^^^^ expected `usize`, found `u32` | ||
| | ||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. | ||
For more information about this error, try `rustc --explain E0204`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters