-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Remove speculative parameter from instantiate_poly_trait_ref_inner #114635
Copy link
Copy link
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
instantiate_poly_trait_ref_innerhas aspeculativeparameter:rust/compiler/rustc_hir_analysis/src/astconv/mod.rs
Line 684 in f525bb4
This parameter is used to suppress several errors downstream, and has only one usage:
rust/compiler/rustc_hir_analysis/src/lib.rs
Line 285 in f525bb4
... which is inside of
hir_trait_to_predicates, which itself has only one usage:rust/compiler/rustc_privacy/src/lib.rs
Lines 1215 to 1222 in f525bb4
The reason why
speculative = trueat this call-site is because we're passing the wrong self type when instantiating the trait ref:rust/compiler/rustc_privacy/src/lib.rs
Lines 1219 to 1221 in f525bb4
If we were able to pass the correct self type here, then we can totally remove the
speculativeparameter. I think that would be a nice clean-up if possible.