Gate repr(Rust) correctly on non-ADT items by compiler-errors · Pull Request #129422 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation17 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

compiler-errors

#114201 added repr(Rust) but didn't add any attribute validation to it like repr(C) has, to only allow it on ADT items.

I consider this code to be nonsense, for example:

#[repr(Rust)]
fn foo() {}

Reminder that it's different from extern "Rust", which is valid on function items. But also this now disallows repr(Rust) on modules, impls, traits, etc.

I'll crater it, if it looks bad then I'll add an FCW.


relnotes Marks issues that should be documented in the release notes of the next release.: Compatibility (minor breaking change).

@compiler-errors

@rustbot

r? @pnkfelix

rustbot has assigned @pnkfelix.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Aug 22, 2024

@compiler-errors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@bors

Gate repr(Rust) correctly on non-ADT items

rust-lang#114201 added repr(Rust) but didn't add any attribute validation to it like repr(C) has, to only allow it on ADT items.

I consider this code to be nonsense, for example:

#[repr(Rust)]
fn foo() {}

Reminder that it's different from extern "Rust", which is valid on function items. But also this now disallows repr(Rust) on modules, impls, traits, etc.

I'll crater it, if it looks bad then I'll add an FCW.

@bors

fmease

@fmease

r? fmease
r=me after crater etc.

@bors

☀️ Try build successful - checks-actions
Build commit: 0edd13c (0edd13c68435d50367c79cef43ac2768d2ec4f3d)

@compiler-errors

@craterbot

This was referenced

Aug 26, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 27, 2024

@bors

[CRATER] Crater Rollup

This is a " crater rollup" of:

What is a crater rollup? It's simply a crater job that is run on all of the containing PRs together, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build.

r? @ghost

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 28, 2024

@bors

[CRATER] Crater Rollup

This is a " crater rollup" of:

What is a crater rollup? It's simply a crater job that is run on all of the containing PRs together, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build.

r? @ghost

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 28, 2024

@bors

[CRATER] Crater Rollup

This is a " crater rollup" of:

What is a crater rollup? It's simply a crater job that is run on all of the containing PRs together, and then we can set the crates list for each of these jobs to just the failures after it's done. It should cut out on the bulk of "normal" crates that do nothing and simply just take time to build.

r? @ghost

@compiler-errors

@craterbot

📝 Configuration of the pr-129422 experiment changed.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@traviscross

@craterbot p=1

(Bump priority is this will run quickly.)

@craterbot

📝 Configuration of the pr-129422 experiment changed.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

🚧 Experiment pr-129422 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

@compiler-errors

Given that this is a single crate regression (https://crates.io/crates/list_tools/0.1.9-features) with no dependents, I'd say we should just break it. This is very obviously a bugfix. I would offer to put up a pull request to fix, but the crate seems to be hosted on some other code hosting site (gitee) that I don't have an account for.

I have absolutely no idea what compelled the crate author to put #[repr(Rust)] on a macro_rules definition, though. 🤔 The git history seems to only have 1 commit, so this crate must've either been moved recently or the author squashes their history across versions (which is a shame for the purposes of understanding this situation lol). It must've been somewhat recent though, since repr rust has only been stable for about 6 months or so...

@fmease fmease added the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Sep 4, 2024

@fmease

@fmease fmease added S-waiting-on-team

Status: Awaiting decision from the relevant subteam (see the T- label).

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 4, 2024

@compiler-errors

T-lang said this specific issue was obvious to fix.

@bors r=fmease rollup

@bors

📌 Commit 363addc has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-team

Status: Awaiting decision from the relevant subteam (see the T- label).

labels

Sep 18, 2024

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Sep 18, 2024

@workingjubilee

Gate repr(Rust) correctly on non-ADT items

rust-lang#114201 added repr(Rust) but didn't add any attribute validation to it like repr(C) has, to only allow it on ADT items.

I consider this code to be nonsense, for example:

#[repr(Rust)]
fn foo() {}

Reminder that it's different from extern "Rust", which is valid on function items. But also this now disallows repr(Rust) on modules, impls, traits, etc.

I'll crater it, if it looks bad then I'll add an FCW.


https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).

This was referenced

Sep 18, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 18, 2024

@bors

…kingjubilee

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Sep 19, 2024

@rust-timer

Rollup merge of rust-lang#129422 - compiler-errors:repr-rust, r=fmease

Gate repr(Rust) correctly on non-ADT items

rust-lang#114201 added repr(Rust) but didn't add any attribute validation to it like repr(C) has, to only allow it on ADT items.

I consider this code to be nonsense, for example:

#[repr(Rust)]
fn foo() {}

Reminder that it's different from extern "Rust", which is valid on function items. But also this now disallows repr(Rust) on modules, impls, traits, etc.

I'll crater it, if it looks bad then I'll add an FCW.


https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Nov 30, 2024

@he32

Pkgsrc changes compared to rust182:

TODO:

Upstream changes:

Version 1.83.0 (2024-11-28)

Language

Compiler

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Dec 5, 2024

@tmeijn

This MR contains the following updates:

Package Update Change
rust minor 1.82.0 -> 1.83.0

MR created with the help of el-capitano/tools/renovate-bot.

Proposed changes to behavior should be submitted there as MRs.


Release Notes

rust-lang/rust (rust)

v1.83.0

Compare Source

==========================

Language

Compiler

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.



This MR has been generated by Renovate Bot.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request

Feb 24, 2025

@he32

Pkgsrc changes:

Upstream changes:

Version 1.83.0 (2024-11-28)

Language

Compiler

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Labels

relnotes

Marks issues that should be documented in the release notes of the next release.

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.