Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subtree-push nightly-2024-09-10 #6320

Merged
merged 8 commits into from
Sep 12, 2024

Conversation

ytmimi
Copy link
Contributor

@ytmimi ytmimi commented Sep 10, 2024

Bumping the toolchain version as part of a git subtree push

current toolchain (nightly-2024-08-17):

  • 1.82.0-nightly (506052d49 2024-08-16)

latest toolchain (nightly-2024-09-10):

  • 1.83.0-nightly (c2f74c3f9 2024-09-09)

r? @calebcartwright

carbotaniuman and others added 7 commits August 7, 2024 03:12
…rcote

Stabilize `unsafe_attributes`

# Stabilization report

## Summary

This is a tracking issue for the RFC 3325: unsafe attributes

We are stabilizing `#![feature(unsafe_attributes)]`,  which makes certain attributes considered 'unsafe', meaning that they must be surrounded by an `unsafe(...)`, as in `#[unsafe(no_mangle)]`.

RFC: rust-lang/rfcs#3325
Tracking issue: #123757

## What is stabilized

### Summary of stabilization

Certain attributes will now be designated as unsafe attributes, namely, `no_mangle`, `export_name`, and `link_section` (stable only), and these attributes will need to be called by surrounding them in `unsafe(...)` syntax. On editions prior to 2024, this is simply an edition lint, but it will become a hard error in 2024. This also works in `cfg_attr`, but `unsafe` is not allowed for any other attributes, including proc-macros ones.

```rust
#[unsafe(no_mangle)]
fn a() {}

#[cfg_attr(any(), unsafe(export_name = "c"))]
fn b() {}
```

For a table showing the attributes that were considered to be included in the list to require unsafe, and subsequent reasoning about why each such attribute was or was not included, see [this comment here](rust-lang/rust#124214 (comment))

## Tests

The relevant tests are in `tests/ui/rust-2024/unsafe-attributes` and `tests/ui/attributes/unsafe`.
@ytmimi
Copy link
Contributor Author

ytmimi commented Sep 10, 2024

Running the Diff Check

Edit: The job passed ✅

src/lib.rs Outdated
Comment on lines 7 to 8
// #[macro_use]
// extern crate tracing;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why jsut commented out?

Copy link
Contributor Author

@ytmimi ytmimi Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@calebcartwright no idea. It was added in rust-lang/rust#129774. I can remove it.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small nit inline. feel free to merge as-is or address and then merge

@ytmimi ytmimi merged commit a1017ae into rust-lang:master Sep 12, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants