Properly deal with missing/placeholder types inside GACs#125457
Properly deal with missing/placeholder types inside GACs#125457bors merged 2 commits intorust-lang:masterfrom
Conversation
compiler/rustc_hir_typeck/src/lib.rs
Outdated
| && let Some(trait_item) = item.trait_item_def_id | ||
| // We don't want to call `tcx.compare_impl_const` here to avoid cycle errors. This is a | ||
| // very naive check to prevent us from messing up the generic param instantiation below. | ||
| && tcx.generics_of(def_id).own_counts() == tcx.generics_of(trait_item).own_counts() |
There was a problem hiding this comment.
Can we use https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.check_args_compatible ? Perhaps after rebasing the const onto the impl?
There was a problem hiding this comment.
Like, similar to what we do when we have a mismatch between GAT params in a trait and impl
There was a problem hiding this comment.
Thanks for the pointer, I'll check!
There was a problem hiding this comment.
relevant callsite:
rust/compiler/rustc_trait_selection/src/traits/project.rs
Lines 2108 to 2115 in 9c8a58f
There was a problem hiding this comment.
Applied. Great idea, thanks!
ecb118e to
39d9b84
Compare
compiler-errors
left a comment
There was a problem hiding this comment.
r=me if ci is green
|
@bors r=compiler-errors rollup |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (7c54789): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.634s -> 673.551s (-0.01%) |
Fixes #124833.
r? oli-obk (#123130)