diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-13 17:44:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-13 17:44:07 +0100 |
| commit | 41d6e6e8daf428ee6773e93ac4ab8e3422e9a760 (patch) | |
| tree | 2eed196e6fbac7ab4050e3218319bef88a1b58df /compiler/rustc_pattern_analysis/src | |
| parent | b5955e74e80d074f71625cd3340a31c14f7765c8 (diff) | |
| parent | 63447f20954bdd0f15698b55a7eb7e68695b63ad (diff) | |
| download | rust-41d6e6e8daf428ee6773e93ac4ab8e3422e9a760.tar.gz rust-41d6e6e8daf428ee6773e93ac4ab8e3422e9a760.zip | |
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`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
