Skip to content

Commit

Permalink
Update for unsafe attributes stabilization
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored Aug 19, 2024
1 parent 1c65098 commit 7916e1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rust-2024/unsafe-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ More information may be found in the tracking issue at <https://github.com/rust-

## Details

Rust 1.xx <!--TODO--> added the ability in all editions to mark certain attributes as `unsafe` to indicate that they have soundness requirements that must be upheld.[^RFC3325] The syntax for an unsafe attribute looks like this:
Rust 1.82 added the ability in all editions to mark certain attributes as `unsafe` to indicate that they have soundness requirements that must be upheld.[^RFC3325] The syntax for an unsafe attribute looks like this:

```rust
# #![feature(unsafe_attributes)]
// SAFETY: there is no other global function of this name
#[unsafe(no_mangle)]
pub fn example() {}
Expand Down Expand Up @@ -52,7 +51,6 @@ In the 2024 Edition, it is now required to mark these attributes as unsafe to em

<!-- TODO: edition2024 -->
```rust
# #![feature(unsafe_attributes)]
// SAFETY: There should only be a single definition of the loop symbol.
#[unsafe(export_name="loop")]
fn arduino_loop() {
Expand Down

0 comments on commit 7916e1c

Please sign in to comment.