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

Turn order dependent trait objects future incompat warning into a hard error #136968

Merged
merged 1 commit into from
Mar 9, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 13, 2025

fixes #56484

r? @ghost

will FCP when we have a crater result

@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 Feb 13, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 13, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2025
Turn order dependent trait objects future incompat warning into a hard error

fixes rust-lang#56484

r? `@ghost`

will FCP when we have a crater result
@bors
Copy link
Collaborator

bors commented Feb 13, 2025

⌛ Trying commit 0ae0780 with merge 9d63f82...

@bors
Copy link
Collaborator

bors commented Feb 13, 2025

☀️ Try build successful - checks-actions
Build commit: 9d63f82 (9d63f825c0d409b0e1743a2c84b33f86965e5929)

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 13, 2025

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-136968 created and queued.
🤖 Automatically detected try build 9d63f82
🔍 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-136968 is now running

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

@craterbot
Copy link
Collaborator

🎉 Experiment pr-136968 is completed!
📊 506 regressed and 4 fixed (582562 total)
📰 Open the full 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

@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 Feb 14, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 14, 2025

🤔 hmm all the failures are because of crates with lockfiles for traitobject 0.1.0, even though traitobject 0.1.1 resolves the issues.

@oli-obk oli-obk marked this pull request as ready for review February 25, 2025 09:00
@oli-obk oli-obk added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 25, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 25, 2025

cc @rust-lang/lang

We've had a future incompatibility warning for years for code like

trait Trait {}
impl Trait for dyn Send + Sync {}
impl Trait for dyn Sync + Send {}

We already hard error if the trait has methods, but due to some widespread breakage, we decided not to make it a hard error. All (yes all) of the breakage is due to crates depending (mostly transitively) on the traitobject. @reem recently gave me crates.io ownership and I published a patch update, so everyone can just cargo update -p traitobject without causing any other problems.

There are only 10 crates on crates.io that break from this PR, and all of them also were due to lockfiles. All but

haven't seen updates in 4 years and are usually depending on an old version of hyper that still had traitobject in its dependency graph at all.

We should turn this FCW into a hard error and thus be able to rip out all the code that was necessary to maintain it

@rfcbot merge

@rfcbot
Copy link
Collaborator

rfcbot commented Feb 25, 2025

Team member @oli-obk has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Feb 25, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 25, 2025

r? types

@traviscross traviscross added the I-lang-nominated Nominated for discussion during a lang team meeting. label Feb 25, 2025
@tmandry tmandry added T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Feb 26, 2025
@rustbot rustbot removed the I-lang-nominated Nominated for discussion during a lang team meeting. label Feb 26, 2025
@traviscross traviscross added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Feb 26, 2025
@nikomatsakis
Copy link
Contributor

@rfcbot reviewed

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Feb 26, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Feb 26, 2025

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

@compiler-errors
Copy link
Member

r=me when FCP is done

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 28, 2025
Mark-Simulacrum added a commit to rust-lang/rfcbot-rs that referenced this pull request Mar 1, 2025
@rfcbot 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 Mar 8, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Mar 8, 2025

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.

This will be merged soon.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 8, 2025

📌 Commit 8f6b184 has been approved by compiler-errors

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 8, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 9, 2025
Turn order dependent trait objects future incompat warning into a hard error

fixes rust-lang#56484

r? `@ghost`

will FCP when we have a crater result
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 9, 2025
Rollup of 16 pull requests

Successful merges:

 - rust-lang#122790 (Apply dllimport in ThinLTO)
 - rust-lang#136127 (Allow `*const W<dyn A> -> *const dyn A` ptr cast)
 - rust-lang#136968 (Turn order dependent trait objects future incompat warning into a hard error)
 - rust-lang#137147 (Add exclude to config.toml)
 - rust-lang#137319 (Stabilize `const_vec_string_slice`)
 - rust-lang#137885 (tidy: add triagebot checks)
 - rust-lang#138040 (compiler: Use `size_of` from the prelude instead of imported)
 - rust-lang#138052 (strip `-Wlinker-messages` wrappers from `rust-lld` rmake test)
 - rust-lang#138084 (Use workspace lints for crates in `compiler/`)
 - rust-lang#138158 (Move more layouting logic to `rustc_abi`)
 - rust-lang#138160 (depend more on attr_data_structures and move find_attr! there)
 - rust-lang#138192 (crashes: couple more tests)
 - rust-lang#138216 (bootstrap: Fix stack printing when a step cycle is detected)
 - rust-lang#138232 (Reduce verbosity of GCC build log)
 - rust-lang#138233 (Windows: Don't link std (and run-make) against advapi32, except on win7)
 - rust-lang#138242 (Revert "Don't test new error messages with the stage 0 compiler")

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 9, 2025
…iaskrgr

Rollup of 12 pull requests

Successful merges:

 - rust-lang#136127 (Allow `*const W<dyn A> -> *const dyn A` ptr cast)
 - rust-lang#136968 (Turn order dependent trait objects future incompat warning into a hard error)
 - rust-lang#137319 (Stabilize `const_vec_string_slice`)
 - rust-lang#137885 (tidy: add triagebot checks)
 - rust-lang#138040 (compiler: Use `size_of` from the prelude instead of imported)
 - rust-lang#138084 (Use workspace lints for crates in `compiler/`)
 - rust-lang#138158 (Move more layouting logic to `rustc_abi`)
 - rust-lang#138160 (depend more on attr_data_structures and move find_attr! there)
 - rust-lang#138192 (crashes: couple more tests)
 - rust-lang#138216 (bootstrap: Fix stack printing when a step cycle is detected)
 - rust-lang#138232 (Reduce verbosity of GCC build log)
 - rust-lang#138242 (Revert "Don't test new error messages with the stage 0 compiler")

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5a46f82 into rust-lang:master Mar 9, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 9, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 9, 2025
Rollup merge of rust-lang#136968 - oli-obk:bye-bye, r=compiler-errors

Turn order dependent trait objects future incompat warning into a hard error

fixes rust-lang#56484

r? ``@ghost``

will FCP when we have a crater result
@Kobzol
Copy link
Contributor

Kobzol commented Mar 9, 2025

@rust-timer build 702badc

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (702badc): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.0% [2.2%, 4.2%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 0.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 765.417s -> 765.101s (-0.04%)
Artifact size: 362.05 MiB -> 362.02 MiB (-0.01%)

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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for future-incompatbility lint order_dependent_trait_objects