diff options
| author | bors <bors@rust-lang.org> | 2021-01-19 08:59:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-01-19 08:59:37 +0000 |
| commit | 47121d6d884bb60dad47e345f52f2ad6aadecaaf (patch) | |
| tree | ec79f7cc389fcaad1402c0a7f8880c8779323ec8 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 7d7b22d78fa71cf18109dc9d186611f2ddf60d8e (diff) | |
| parent | 2136a5cfad69337222b5b02f934825e5d346f9ca (diff) | |
| download | rust-47121d6d884bb60dad47e345f52f2ad6aadecaaf.tar.gz rust-47121d6d884bb60dad47e345f52f2ad6aadecaaf.zip | |
Auto merge of #81110 - LeSeulArtichaut:fix-unused-unsafe-label, r=RalfJung
Fix `unused_unsafe` label with `unsafe_block_in_unsafe_fn
Previously, the following code:
```rust
#![feature(unsafe_block_in_unsafe_fn)]
unsafe fn foo() {
unsafe { unsf() }
}
unsafe fn unsf() {}
```
Would give the following warning:
```
warning: unnecessary `unsafe` block
--> src/lib.rs:4:5
|
4 | unsafe { unsf() }
| ^^^^^^ unnecessary `unsafe` block
|
= note: `#[warn(unused_unsafe)]` on by default
```
which doesn't point out that the block is in an `unsafe fn`.
Tracking issue: #71668
cc #79208
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
