Skip to content

Commit

Permalink
Merge pull request #319 from rust-lang/ehuss-patch-1
Browse files Browse the repository at this point in the history
Update for unsafe attributes stabilization
  • Loading branch information
ehuss authored Aug 19, 2024
2 parents 1c65098 + 7916e1c commit 85f63e3
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 85f63e3

Please sign in to comment.