diff options
| author | bors <bors@rust-lang.org> | 2024-05-18 19:35:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-18 19:35:24 +0000 |
| commit | eb1a5c9bb3df2ce5f003d45f835da0d61d8742cd (patch) | |
| tree | de21250e2fa4dfde4c4fe76d7d90eca3e6e38464 /compiler/rustc_codegen_llvm/src | |
| parent | c00957a3e269219413041a4e3565f33b1f9d0779 (diff) | |
| parent | 6b46a919e1fe92c7d5bc58d26d2ad7a54d09a927 (diff) | |
| download | rust-eb1a5c9bb3df2ce5f003d45f835da0d61d8742cd.tar.gz rust-eb1a5c9bb3df2ce5f003d45f835da0d61d8742cd.zip | |
Auto merge of #125077 - spastorino:add-new-fnsafety-enum2, r=jackh726
Rename Unsafe to Safety
Alternative to #124455, which is to just have one Safety enum to use everywhere, this opens the posibility of adding `ast::Safety::Safe` that's useful for unsafe extern blocks.
This leaves us today with:
```rust
enum ast::Safety {
Unsafe(Span),
Default,
// Safe (going to be added for unsafe extern blocks)
}
enum hir::Safety {
Unsafe,
Safe,
}
```
We would convert from `ast::Safety::Default` into the right Safety level according the context.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/intrinsic.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index b0b867701a4..c0a1208a8c7 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -990,7 +990,7 @@ fn get_rust_try_fn<'ll, 'tcx>( [i8p], tcx.types.unit, false, - hir::Unsafety::Unsafe, + hir::Safety::Unsafe, Abi::Rust, )), ); @@ -1001,7 +1001,7 @@ fn get_rust_try_fn<'ll, 'tcx>( [i8p, i8p], tcx.types.unit, false, - hir::Unsafety::Unsafe, + hir::Safety::Unsafe, Abi::Rust, )), ); @@ -1010,7 +1010,7 @@ fn get_rust_try_fn<'ll, 'tcx>( [try_fn_ty, i8p, catch_fn_ty], tcx.types.i32, false, - hir::Unsafety::Unsafe, + hir::Safety::Unsafe, Abi::Rust, )); let rust_try = gen_fn(cx, "__rust_try", rust_fn_sig, codegen); |
