-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stop bailing out from compilation just because there were incoherent traits #120558
Conversation
r? @nnethercote (rustbot has picked a reviewer for you, use r? to override) |
tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.rs
Outdated
Show resolved
Hide resolved
That's a lot of error output changes for such small compiler changes. I'm uncomfortable reviewing this because I know very little about trait stuff in general. r? @lcnr (or anyone else who might want to steal it, such as @compiler-errors or @estebank) |
This comment has been minimized.
This comment has been minimized.
08e7773
to
a9ca5b1
Compare
r? @estebank |
a9ca5b1
to
965da3a
Compare
error[E0282]: type annotations needed | ||
--> $DIR/opaques.rs:13:20 | ||
| | ||
LL | pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> { | ||
| ^ cannot infer type for struct `Container<Alias<T>, T>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate but ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea this one had me scratching my head. It's an unfortunate combination of opaque types and type inference, but has a good chance of getting properly resolved with cleanups that will be enabled by #113169
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors r- |
47c97b1
to
b044242
Compare
Finished benchmarking commit (870a01a): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 663.578s -> 662.662s (-0.14%) |
…l, r=<try> Use `ensure` when the result of the query is not needed beyond its `Result`ness while I would like to just remove the `tcx` methods for ensure-only queries, that is hard to do without another query annotation or by turning the `define_callbacks` macro into a proc macro to get more control should fix perf regression of rust-lang#120558
@oli-obk: a bunch of possible icount regressions, is that expected? |
I already opened a PR: #120771 it is not expected, but from the detailed diffs (only incremental cache changes, no actual execution changes), I presume it's that one missing |
Weirdly, while that PR is a perf improvement, it's completely orthogonal to this PR (because I also fixed another missing I'll dig into what happened here, This regression must be fixable, we're not actually doing extra work in successful builds, so it must just be some query/caching thing |
The queries I'm I mean, since we only use the query to check for errors at the individual item level, we could just not
but that feels quite hacky. |
A trait's local impls are trivially coherent if there are no impls. This avoids creating a dependency edge on the hir or the specialization graph This may resolve part of the performance issue of rust-lang#120558
Avoid accessing the HIR in the happy path of `coherent_trait` based on rust-lang#120834 This may resolve part of the performance issue of rust-lang#120558
Perf regression fully resolved after #120835 (comment) @rustbot label: +perf-regression-triaged |
Avoid accessing the HIR in the happy path of `coherent_trait` This may resolve part of the performance issue of rust-lang#120558
…l, r=davidtwco Use `ensure` when the result of the query is not needed beyond its `Result`ness while I would like to just remove the `tcx` methods for ensure-only queries, that is hard to do without another query annotation or by turning the `define_callbacks` macro into a proc macro to get more control should fix perf regression of rust-lang#120558
…dtwco Use `ensure` when the result of the query is not needed beyond its `Result`ness while I would like to just remove the `tcx` methods for ensure-only queries, that is hard to do without another query annotation or by turning the `define_callbacks` macro into a proc macro to get more control should fix perf regression of rust-lang/rust#120558
A trait's local impls are trivially coherent if there are no impls. This avoids creating a dependency edge on the hir or the specialization graph This may resolve part of the performance issue of rust-lang#120558
A trait's local impls are trivially coherent if there are no impls. This avoids creating a dependency edge on the hir or the specialization graph This may resolve part of the performance issue of rust-lang/rust#120558
A trait's local impls are trivially coherent if there are no impls. This avoids creating a dependency edge on the hir or the specialization graph This may resolve part of the performance issue of rust-lang/rust#120558
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes rust-lang#123292 Also removes a bunch of extra diagnostics that were introduced in rust-lang#121154 and rust-lang#120558
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes rust-lang#123292 Also removes a bunch of extra diagnostics that were introduced in rust-lang#121154 and rust-lang#120558
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes rust-lang#123292 Also removes a bunch of extra diagnostics that were introduced in rust-lang#121154 and rust-lang#120558
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in rust-lang/rust#121154 and rust-lang/rust#120558
A trait's local impls are trivially coherent if there are no impls. This avoids creating a dependency edge on the hir or the specialization graph This may resolve part of the performance issue of rust-lang/rust#120558
fixes #120343
but also has a lot of "type annotations needed" fallout. Some are fixed in the second commit.