Change:
<!-- Thank you for filing a regression report! A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --I tried this code (minimized from [this test] in my library): [this test]: I expected to see this happen: Compile without errors. Instead, this happened: Compiled with errors: Note that it says is not implemented for , but then lists it as an existing implementation. It most recently worked on: 1.55.0 : <!-- If you know when this regression occurred, please add a line like below, replacing with one of stable, beta, or nightly. modify labels: +regression-from-stable-to-{channel} -regression-untriaged --
modify labels: +regression-from-stable-to-stable
Bisects to . cc searched nightlies: from nightly-2021-07-01 to nightly-2021-10-01 regressed nightly: nightly-2021-09-03 searched commits: from to regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.0</summaryHost triple: x86_64-apple-darwin Reproduce with: </details
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-high
Any advancements on this issue? I currently can't upgrade to Rust 1.56 due to this exact problem
I might try my hand at diagnosing it, but someone with more context would definitely be faster at it.
Sorry for the delay in getting to this. I've opened with a fix.
I noticed that this regression was found in the 1.56 beta crater run: https://crater- Was it just overlooked at that time?
Seems kinda major to Yeah, this seems rather significant. It's right there in the results. https://crater-

Discussion:
use super::Selection; use super::SelectionContext; use super::SelectionError; <del> use super::TraitQueryMode; </del> use super::{ ImplSourceClosureData, ImplSourceDiscriminantKindData, ImplSourceFnPointerData, ImplSourceGeneratorData, ImplSourcePointeeData, ImplSourceUserDefinedData,

}; let mut deduped: SsoHashSet<_> = Default::default(); <del> let mut canonical = SelectionContext::with_query_mode(selcx.infcx(), TraitQueryMode::Canonical); </del> result.obligations.drain_filter(|projected_obligation| { if !deduped.insert(projected_obligation.clone()) { return true; } <del> // If any global obligations always apply, considering regions, then we don't // need to include them. The `is_global` check rules out inference variables, // so there's no need for the caller of `opt_normalize_projection_type` // to evaluate them. // Note that we do *not* discard obligations that evaluate to // `EvaluatedtoOkModuloRegions`. Evaluating these obligations // inside of a query (e.g. `evaluate_obligation`) can change // the result to `EvaluatedToOkModuloRegions`, while an // `EvaluatedToOk` obligation will never change the result. // See #85360 for more details projected_obligation.is_global(canonical.tcx()) && canonical .evaluate_root_obligation(projected_obligation) .map_or(false, |res| res.must_apply_considering_regions()) </del> <ins> false </ins> }); if use_cache {

<ins> // check-pass // Regression test for issue #90662 // Tests that projection caching does not cause a spurious error trait HasProvider<T: ?Sized> {} trait Provider<M> { type Interface: ?Sized; } trait Repository {} trait Service {} struct DbConnection; impl<M> Provider<M> for DbConnection { type Interface = DbConnection; } struct RepositoryImpl; impl<M: HasProvider<DbConnection>> Provider<M> for RepositoryImpl { type Interface = dyn Repository; } struct ServiceImpl; impl<M: HasProvider<dyn Repository>> Provider<M> for ServiceImpl { type Interface = dyn Service; } struct TestModule; impl HasProvider<<DbConnection as Provider<Self>>::Interface> for TestModule {} impl HasProvider<<RepositoryImpl as Provider<Self>>::Interface> for TestModule {} impl HasProvider<<ServiceImpl as Provider<Self>>::Interface> for TestModule {} fn main() {} </ins>