diff options
| author | bors <bors@rust-lang.org> | 2022-09-13 15:33:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-13 15:33:06 +0000 |
| commit | 1ce51982b8550c782ded466c1abff0d2b2e21c4e (patch) | |
| tree | 597e3ad33ce315008a6a4579da540eb46ef39ab7 /src/test/ui/impl-trait | |
| parent | 5338f5f1d4ad9c99706e5cb691f8d5bbac341262 (diff) | |
| parent | bec079d1a9fe1a9163a0143ff9e1281b4eb09ec9 (diff) | |
| download | rust-1ce51982b8550c782ded466c1abff0d2b2e21c4e.tar.gz rust-1ce51982b8550c782ded466c1abff0d2b2e21c4e.zip | |
Auto merge of #101615 - compiler-errors:rpitit-perf, r=oli-obk
Make `compare_predicate_entailment` no longer a query Make `compare_predicate_entailment` so it's no longer a query (again), and splits out the new logic (that equates the return types to infer RPITITs) into its own query. This means that this new query (now called `collect_trait_impl_trait_tys`) is no longer executed for non-RPITIT cases. This should improve perf (https://github.com/rust-lang/rust/pull/101224#issuecomment-1241682203), though in practice we see that these some crates remain from the primary regressions list on the original report... They are all <= 0.43% regression and seemingly only on the incr-full scenario for all of them. I am at a loss for what might be causing this regression other than what I fixed here, since we don't introduce much new non-RPITIT logic except for some `def_kind` query calls in some places, for example, like projection. Maybe that's it? ---- Originally this PR was opened to test enabling `cache_on_disk` (62164aaaa11) but that didn't turn out to be very useful (https://github.com/rust-lang/rust/pull/101615#issuecomment-1242403205), so that led me to just split the query (and rename the PR).
Diffstat (limited to 'src/test/ui/impl-trait')
| -rw-r--r-- | src/test/ui/impl-trait/in-trait/deep-match.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/in-trait/deep-match.stderr | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/test/ui/impl-trait/in-trait/deep-match.rs b/src/test/ui/impl-trait/in-trait/deep-match.rs index 5a220bc3f19..a6385147c3a 100644 --- a/src/test/ui/impl-trait/in-trait/deep-match.rs +++ b/src/test/ui/impl-trait/in-trait/deep-match.rs @@ -9,7 +9,7 @@ trait Foo { impl Foo for () { fn bar() -> i32 { 0 } - //~^ ERROR method `bar` has an incompatible type for trait + //~^ ERROR method `bar` has an incompatible return type for trait } fn main() {} diff --git a/src/test/ui/impl-trait/in-trait/deep-match.stderr b/src/test/ui/impl-trait/in-trait/deep-match.stderr index af449869cb3..034ee5ea4e1 100644 --- a/src/test/ui/impl-trait/in-trait/deep-match.stderr +++ b/src/test/ui/impl-trait/in-trait/deep-match.stderr @@ -1,19 +1,14 @@ -error[E0053]: method `bar` has an incompatible type for trait +error[E0053]: method `bar` has an incompatible return type for trait --> $DIR/deep-match.rs:11:17 | LL | fn bar() -> i32 { 0 } | ^^^ | | | expected struct `Wrapper`, found `i32` - | help: change the output type to match the trait: `Wrapper<_>` + | return type in trait | -note: type in trait - --> $DIR/deep-match.rs:7:17 - | -LL | fn bar() -> Wrapper<impl Sized>; - | ^^^^^^^^^^^^^^^^^^^ - = note: expected fn pointer `fn() -> Wrapper<_>` - found fn pointer `fn() -> i32` + = note: expected struct `Wrapper<_>` + found type `i32` error: aborting due to previous error |
