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_ssa/src/debuginfo | |
| 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_ssa/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index e9c7606dc5a..07473ee476b 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -365,7 +365,7 @@ fn push_debuginfo_type_name<'tcx>( } output.push_str(" (*)("); } else { - output.push_str(sig.unsafety.prefix_str()); + output.push_str(sig.safety.prefix_str()); if sig.abi != rustc_target::spec::abi::Abi::Rust { output.push_str("extern \""); |
