forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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#7891 - giraffate:fix_ice_for_undocumented_uns…
…afe_blocks, r=flip1995 Fix ice in `undocumented_unsafe_blocks` Fix rust-lang/rust-clippy#7868 changelog: Fix ice in [`undocumented_unsafe_blocks`]
- Loading branch information
Showing
4 changed files
with
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn zero() { | ||
unsafe { 0 }; | ||
} |
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,7 @@ | ||
#![warn(clippy::undocumented_unsafe_blocks)] | ||
#![allow(clippy::no_effect)] | ||
|
||
#[path = "auxiliary/ice-7868-aux.rs"] | ||
mod zero; | ||
|
||
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,15 @@ | ||
error: unsafe block missing a safety comment | ||
--> $DIR/auxiliary/ice-7868-aux.rs:2:5 | ||
| | ||
LL | unsafe { 0 }; | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings` | ||
help: consider adding a safety comment | ||
| | ||
LL ~ // Safety: ... | ||
LL ~ unsafe { 0 }; | ||
| | ||
|
||
error: aborting due to previous error | ||
|