forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These were changed to `has_errors` assertions in rust-lang#121071 because that seemed reasonable, but evidently not. Fixes rust-lang#121103. Fixes rust-lang#121108.
- Loading branch information
1 parent
502ce82
commit 64a9c9c
Showing
6 changed files
with
57 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![derive(Clone, Copy)] //~ ERROR `derive` attribute cannot be used at crate level | ||
|
||
use std::ptr::addr_of; | ||
|
||
const UNINHABITED_VARIANT: () = unsafe { | ||
let v = *addr_of!(data).cast(); //~ ERROR cannot determine resolution for the macro `addr_of` | ||
}; | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
error: `derive` attribute cannot be used at crate level | ||
--> $DIR/issue-121108.rs:1:1 | ||
| | ||
LL | #![derive(Clone, Copy)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | | ||
LL | use std::ptr::addr_of; | ||
| ------- the inner attribute doesn't annotate this `use` import | ||
| | ||
help: perhaps you meant to use an outer attribute | ||
| | ||
LL - #![derive(Clone, Copy)] | ||
LL + #[derive(Clone, Copy)] | ||
| | ||
|
||
error: cannot determine resolution for the macro `addr_of` | ||
--> $DIR/issue-121108.rs:6:14 | ||
| | ||
LL | let v = *addr_of!(data).cast(); | ||
| ^^^^^^^ | ||
| | ||
= note: import resolution is stuck, try simplifying macro imports | ||
|
||
error: aborting due to 2 previous errors | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main(_: <lib2::GenericType<42> as lib2::TypeFn>::Output) {} | ||
//~^ ERROR failed to resolve: use of undeclared crate or module `lib2` | ||
//~| ERROR failed to resolve: use of undeclared crate or module `lib2` |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0433]: failed to resolve: use of undeclared crate or module `lib2` | ||
--> $DIR/issue-121103.rs:1:38 | ||
| | ||
LL | fn main(_: <lib2::GenericType<42> as lib2::TypeFn>::Output) {} | ||
| ^^^^ use of undeclared crate or module `lib2` | ||
|
||
error[E0433]: failed to resolve: use of undeclared crate or module `lib2` | ||
--> $DIR/issue-121103.rs:1:13 | ||
| | ||
LL | fn main(_: <lib2::GenericType<42> as lib2::TypeFn>::Output) {} | ||
| ^^^^ use of undeclared crate or module `lib2` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |