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.
Auto merge of rust-lang#2869 - oli-obk:only_interp_compiling_code, r=…
…RalfJung Avoid interpreting code that has lint errors fixes rust-lang#2608 we previously only checked for actual errors, as deny lints are handled differently.
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@error-pattern: miri cannot be run on programs that fail compilation | ||
|
||
#![deny(warnings)] | ||
|
||
struct Foo; | ||
//~^ ERROR: struct `Foo` is never constructed | ||
|
||
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,12 @@ | ||
error: struct `Foo` is never constructed | ||
--> $DIR/deny_lint.rs:LL:CC | ||
| | ||
LL | struct Foo; | ||
| ^^^ | ||
| | ||
= note: `-D dead-code` implied by `-D unused` | ||
|
||
error: miri cannot be run on programs that fail compilation | ||
|
||
error: aborting due to 2 previous errors | ||
|