rust/compiler/rustc_ast_lowering
Matthias Krüger 41d6e6e8da
Rollup merge of #138399 - Bryanskiy:delegation-extern-fn, r=petrochenkov
Delegation: allow foreign fns `reuse`

In example:
```rust
unsafe extern "C" {
    fn foo();
}

reuse foo as bar;
```

Desugaring before:

```rust
fn bar() {
    foo()
    //~^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
}
```

after:

```rust
unsafe extern "C" fn bar() {
    foo()
}
```

Fixes https://github.com/rust-lang/rust/issues/127412

r? `@petrochenkov`
2025-03-13 17:44:07 +01:00
..
src Rollup merge of #138399 - Bryanskiy:delegation-extern-fn, r=petrochenkov 2025-03-13 17:44:07 +01:00
Cargo.toml Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
messages.ftl Rollup merge of #137824 - estebank:rtn-sugg, r=compiler-errors 2025-03-01 16:03:18 +01:00