Make RPITITs simple cases work when using lower_impl_trait_in_trait_to_assoc_ty#108700
Make RPITITs simple cases work when using lower_impl_trait_in_trait_to_assoc_ty#108700bors merged 13 commits intorust-lang:masterfrom
Conversation
6a02389 to
4f6a819
Compare
|
#108672 landed, I've rebased this one on top of master and it's now ready. |
| tcx.mk_opaque(def_id, substs) | ||
| }; | ||
| opaque_type_bounds(tcx, bounds_def_id, bounds, item_ty, *span) | ||
| } |
There was a problem hiding this comment.
This code feels a little tangled but I don't know how to disentangle it... 🤔
|
|
||
| /// See `ParamEnv` struct definition for details. | ||
| fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> { | ||
| let def_id = |
There was a problem hiding this comment.
Why is this not being fed? Cycles?
There was a problem hiding this comment.
Yes, all of the queries that I'm not feeding are because of cycles.
To be honest, I'm starting to think that feeding everything is ungreat :). Maybe just feeding opt_rpitit_info and inside each query deciding is better because in order to understand what a query does you just go to the query. With the feeding strategy, if you want to understand how generics_of works, there's code in the query and there's code in assoc.rs which feeds that query and makes it do something completely different.
4f6a819 to
f0b9551
Compare
|
@compiler-errors all comments addressed, I guess some things could be tweaked further, just let me know. |
|
☔ The latest upstream changes (presumably #108351) made this pull request unmergeable. Please resolve the merge conflicts. |
55ee8e5 to
a6ccedf
Compare
a6ccedf to
33dcd14
Compare
…ough sess.opts.unstable_opts
33dcd14 to
d525181
Compare
|
@compiler-errors is ready for another pass. |
d525181 to
b1ad7be
Compare
b1ad7be to
5daa01e
Compare
|
@bors r=compiler-errors |
|
@bors rollup=always only affects -Z flag |
|
@bors rollup- This makes a bunch of calls to |
|
should be |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (9455a55): 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.
|
|
Lots of regressions here, and no prior CI perf run. @spastorino, was this expected? |
|
Only thing I can think of is |
|
https://perf.rust-lang.org/detailed-query.html?commit=9455a5591b1435dfc9a88b2922d0dfc155d9614f&base_commit=542ed2bf72b232b245ece058fc11aebb1ca507d7&benchmark=bitmaps-3.1.0-check&scenario=incr-unchanged says there are 5920 additional |
|
Just seeing this comments, thanks for opening perf trying to remove |
|
I'm not with the computer today and don't know exactly what drives execution of |
|
With #109057 landed, I think we can mark this as triaged. |
…r-errors
Remove some direct calls to local_def_id_to_hir_id on diagnostics
Was playing with `tests/ui/impl-trait/in-trait/default-body-with-rpit.rs` and was able to remove some ICEs. Still getting ...
```
error[E0277]: `impl Future<Output = Foo::{opaque#0}>` is not a future
--> tests/ui/impl-trait/in-trait/default-body-with-rpit.rs:10:28
|
10 | async fn baz(&self) -> impl Debug {
| ^^^^^^^^^^ `impl Future<Output = Foo::{opaque#0}>` is not a future
|
= help: the trait `Future` is not implemented for `impl Future<Output = Foo::{opaque#0}>`
= note: impl Future<Output = Foo::{opaque#0}> must be a future or must implement `IntoFuture` to be awaited
note: required by a bound in `Foo::{opaque#1}`
--> tests/ui/impl-trait/in-trait/default-body-with-rpit.rs:10:28
|
10 | async fn baz(&self) -> impl Debug {
| ^^^^^^^^^^ required by this bound in `Foo::{opaque#1}`
error[E0277]: the size for values of type `impl Future<Output = Foo::{opaque#0}>` cannot be known at compilation time
--> tests/ui/impl-trait/in-trait/default-body-with-rpit.rs:10:28
|
10 | async fn baz(&self) -> impl Debug {
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `impl Future<Output = Foo::{opaque#0}>`
note: required by a bound in `Foo::{opaque#1}`
--> tests/ui/impl-trait/in-trait/default-body-with-rpit.rs:10:28
|
10 | async fn baz(&self) -> impl Debug {
| ^^^^^^^^^^ required by this bound in `Foo::{opaque#1}`
error: internal compiler error: compiler/rustc_hir_typeck/src/closure.rs:724:18: async fn generator return type not an inference variable: Foo::{opaque#1}<'_>
--> tests/ui/impl-trait/in-trait/default-body-with-rpit.rs:10:39
|
10 | async fn baz(&self) -> impl Debug {
| _______________________________________^
11 | | ""
12 | | }
| |_____^
```
But I guess this is a little bit of progress anyway.
This one goes on top of rust-lang#108700 and rust-lang#108945
r? `@compiler-errors`
|
Yes, #109057 this looks to have fixed about 90-100% of the regression. Thank you, @compiler-errors. |
r? @compiler-errors
It's probably best reviewed commit by commit.