1
Fork 0
rust/compiler/rustc_ast_lowering/src
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
..
asm.rs Update compiletest's has_asm_support to match rustc 2025-03-11 15:42:33 -07:00
block.rs Introduce new parsing infrastructure and types for parsed attributes 2025-02-24 14:26:06 +01:00
delegation.rs Delegation: allow foreign fns reuse 2025-03-13 14:13:07 +03:00
errors.rs Rollup merge of #137824 - estebank:rtn-sugg, r=compiler-errors 2025-03-01 16:03:18 +01:00
expr.rs Share implementation of expr_u{16,32,size}. 2025-03-10 13:57:23 +01:00
format.rs Limit formatting width and precision to 16 bits. 2025-03-10 12:20:05 +01:00
index.rs Use a different hir type for patterns in pattern types than we use in match patterns 2025-02-03 08:18:30 +00:00
item.rs Auto merge of #128440 - oli-obk:defines, r=lcnr 2025-03-11 18:13:31 +00:00
lib.rs Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
pat.rs Pass Option<Symbol> to def_path_data/create_def methods. 2025-03-07 20:53:00 +11:00
path.rs Provide more context on resolve error caused from incorrect RTN 2025-03-03 18:23:49 +00:00
stability.rs compiler: remove AbiDatas 2025-02-11 20:18:01 -08:00