about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-04 18:52:29 +0100
committerGitHub <noreply@github.com>2022-11-04 18:52:29 +0100
commit347c478d886acc7e1b94af83f7fa882f73e809b7 (patch)
tree9d036093f1f5c3db60c9c3c10ed2c20fe210b895 /compiler/rustc_codegen_llvm/src/attributes.rs
parent82d7de837c83063af323c6c3c003bf562f5a004e (diff)
parent28819cbb7e7ae05dc83e285ca936ac16876fd701 (diff)
downloadrust-347c478d886acc7e1b94af83f7fa882f73e809b7.tar.gz
rust-347c478d886acc7e1b94af83f7fa882f73e809b7.zip
Rollup merge of #103964 - clubby789:lint-enclosing-unsafe, r=compiler-errors
Give a specific lint for unsafety not being inherited

In cases like
```rs
static mut FOO: u64 = 0;
fn main() {
    unsafe {static BAR: u64 = FOO;}
}
```
and
```rs
fn foo() {
  unsafe {
    fn bar() {
      unsafe_call();
    }
  }
}
```
Specifically inform the user that the unsafety is not inherited for the seperate enclosing items
Fixes #94077
r? compiler-errors
`@rustbot` label +A-diagnostics
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions