Skip to content

treat no_mangle_generic_items as hard error instead of lint warning#154585

Open
HerrCai0907 wants to merge 2 commits into
rust-lang:mainfrom
HerrCai0907:fix/no_mangle_generic_items
Open

treat no_mangle_generic_items as hard error instead of lint warning#154585
HerrCai0907 wants to merge 2 commits into
rust-lang:mainfrom
HerrCai0907:fix/no_mangle_generic_items

Conversation

@HerrCai0907

@HerrCai0907 HerrCai0907 commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

View all comments

In rust-lang/miri#4929 (comment), rustc should reject the no_mangled generic function.
This PR treat is as a hard error

@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 Mar 30, 2026
@rustbot

This comment was marked as outdated.

@HerrCai0907

Copy link
Copy Markdown
Contributor Author

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned fmease Mar 30, 2026
@rustbot

rustbot commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@fmease fmease added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Mar 30, 2026
@oli-obk

oli-obk commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Please make it a hard error and not a lint at all if crater doesn't show any significant regressions.

For crater purposes this works.

@rust-bors

This comment was marked as off-topic.

@rust-bors rust-bors Bot 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 30, 2026
@oli-obk

This comment was marked as off-topic.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 30, 2026
@oli-obk

oli-obk commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Mar 30, 2026
set no_mangle_generic_items deny by default
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: ac4c361 (ac4c3613be2acd5395b65d85e5657b81e3c982f0, parent: 4cf5f9580233c36f6bc8db76e282ba8a1c1ea491)

@oli-obk

oli-obk commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-154585 created and queued.
🤖 Automatically detected try build ac4c361
🔍 You can check out the queue and this experiment's details.

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

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 30, 2026
@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-154585 is now running

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

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-154585 is completed!
📊 5 regressed and 2 fixed (871888 total)
📊 5110 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-154585/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 6, 2026
@traviscross traviscross removed I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Jul 1, 2026
@scottmcm

scottmcm commented Jul 1, 2026

Copy link
Copy Markdown
Member

Agreed. Obviously can't work and easy to describe the error rule -- easier than giving it a meaning -- so 👍

@rfcbot reviewed

@traviscross traviscross removed the S-waiting-on-t-lang Status: Awaiting decision from T-lang label Jul 1, 2026
@rust-rfcbot rust-rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Jul 1, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@rust-rfcbot rust-rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jul 1, 2026
@nikomatsakis

Copy link
Copy Markdown
Contributor

@rfcbot reviewed

@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jul 11, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@RalfJung

Copy link
Copy Markdown
Member

@HerrCai0907 could you please rebase, and deal with the CI failures?
All the paperwork for this PR is done, we just have to get the implementation in shape. :)

@RalfJung
RalfJung force-pushed the fix/no_mangle_generic_items branch from 40a9cfe to 5ccc016 Compare July 24, 2026 10:06
@rustbot

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
Member

@oli-obk I took over the PR, this is
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 24, 2026
@RalfJung
RalfJung force-pushed the fix/no_mangle_generic_items branch from 5ccc016 to f551d1a Compare July 24, 2026 10:15
@rustbot

This comment has been minimized.

Comment thread tests/ui/backtrace/line-tables-only.rs
@jieyouxu jieyouxu self-assigned this Jul 24, 2026
@RalfJung
RalfJung force-pushed the fix/no_mangle_generic_items branch from f551d1a to 0d2248c Compare July 24, 2026 12:01
@jieyouxu jieyouxu removed their assignment Jul 25, 2026
@rust-bors

This comment has been minimized.

@RalfJung
RalfJung force-pushed the fix/no_mangle_generic_items branch from 0d2248c to b49e886 Compare July 26, 2026 10:43
@rustbot

rustbot commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-reference-pr This language change needs an approved Reference PR to proceed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-lang Relevant to the language team to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.