-
Notifications
You must be signed in to change notification settings - Fork 13.3k
multiple applicable items in scope
on nightly but not stable
#93599
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
Comments
This changed as part of #93090 which added a Display impl. This kind of breakage is often considered OK (https://std-dev-guide.rust-lang.org/code-considerations/breaking-changes/new-trait-impls.html), though a crater run may change that decision if sufficiently large number of crates are affected. It doesn't look like one was done, though there will be one done in about 4 weeks to check for beta regressions. cc @jyn514 |
That's.....incredibly surprising? From what I can tell (a) there's no way for users to write code that will be robust to rustc changes, or at least not enforce it in an automated way from rustc and (b) there will be no warning for users until their code suddenly doesn't compile on the latest rustc. Doesn't this very strongly violate the stability guarantees of rustc? Don't get me wrong, if there's a strong reason for breakage so be it, but adding a trivial trait impl that doesn't significantly improve ergonomics seems like a trivial win compared to breakage? Are there no other ways to go about this - adding the impl in a new edition, warning of future resolution failures for a few versions prior to stabilizing the impl, etc? |
Adding trait impls is a minor change per RFC 1105. Robust code can use partially or fully qualified function call syntax as the error message suggests, but yes, that can be unergonomic.
The API remains stable, it is shorthands that become ambiguous. This situation isn't optimal and there have been some discussions about how to improve it but for now, lacking other solutions, it must be allowed because otherwise new methods cannot be introduced because they could conflict with any random 3rd-party import. As ehuss already said, the ecosystem-impact will be assessed during the next beta cycle.
Some projects use allowed-fail CI against nightly or beta rustc to get earlier warnings. |
Yep, totally understand the policy and the changes here and the motivation for it. I guess my point is twofold here - (a) it seems the policy here is at least in some substantial way in major conflict with the publicly stated stability guarantees of rustc and (b) it seems the change to stdlib here is very minor and the inherent tension between code-compiling stability and the really minor win of the feature improvement calls into question whether its worth breaking compilation for downstream projects, given (a).
Yep, that's what led to this issue. Well, and because we have CI fuzzing, and for that we have to use nightly for the LLVM instrumentation stuff, so our CI fuzzing pipeline is currently paused until we figure out if rustc is gonna move forward here or if we have to go change our code. |
Apparently rustc doesn't (actually) provide any kind of compilation-stability guarantees, despite their claims. Here we work around rustc being unstable by making the trait call explicit. See also rust-lang/rust#93599
Apparently rustc doesn't (actually) provide any kind of compilation-stability guarantees, despite their claims. Here we work around rustc being unstable by making the trait call explicit. See also rust-lang/rust#93599
Closing per the comment at #94507 (comment). |
Is there a tracking issue for reconsidering the policy in RFC 1105? |
The following seems to have regressed maybe yesterday or the day before on nightly, but builds on stable. It is real code, sorry its not 100% minimal :)
Error running this on playground for feb 1's nightly:
The text was updated successfully, but these errors were encountered: