-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Sort "the following types implement the trait" suggestion #120012
Conversation
This should help external UI tests using `trybuild` by being less non-deterministic.
(rustbot has picked a reviewer for you, use r? to override) |
Actually, thinking about it, this can be reproduced on macOS by using Rosetta. I don't have a smaller test-case at hand, but in https://github.com/madsmtm/objc2, running the following commands generate different TRYBUILD=overwrite cargo run --features=run --bin test-ui --target=aarch64-apple-darwin
TRYBUILD=overwrite cargo run --features=run --bin test-ui --target=x86_64-apple-darwin |
If The diff from CI: (dyn NSObjectProtocol + 'static)
(dyn NSObjectProtocol + Sync + 'static)
- (dyn NSObjectProtocol + Send + 'static)
(dyn NSObjectProtocol + Send + Sync + 'static)
+ (dyn NSObjectProtocol + Send + 'static)
(dyn NSCopying + 'static)
(dyn NSMutableCopying + 'static)
(dyn NSCacheDelegate + 'static) cc @rust-lang/types |
I can't test this myself, but collecting impls should be deterministic
HOWEVER: impls in extern crates are iterated using |
That's true, but CI failure example doesn't look like something originating from that? It would be good if @madsmtm made a minimized reproduction for this issue. |
Fair enough. I went with the sorting here because it was a simple fix, and is done elsewhere to make errors stable across invocations. |
Sorry, I didn't see your comment before now. I'll try to narrow down a reproduction, can't guarantee any timeline on that though ;). |
i encountered the underlying issue separately, it can be triggered using the following extern crate pub trait Trait {}
impl Trait for &u32 {}
impl Trait for &u16 {} the order of these two impls is different depending on the number of |
opened #120371 for the underlying bug here |
☔ The latest upstream changes (presumably #120649) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage - can you post your status on this PR? This PR has not received an update in a few months. FYI: when a PR is ready for review, send a message containing Or if you're not going to continue, please close it. Thank you! |
I think the problem I was having will be resolved by #120812, so am going to close this, thanks for the ping! |
This should help external UI tests using
trybuild
by being less non-deterministic.This is somewhat hard to reproduce, as it basically requires two different machines, but I've been consistently running into this for the past few months with the output from my CI differing from my local setup (example of a failed workflow in here).