Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't project to RPITIT that has no default value #108746

Merged

Conversation

compiler-errors
Copy link
Member

Replicates this behavior, but for RPITIT projection logic (which currently is separate)

if !assoc_ty.item.defaultness(tcx).has_value() {
// This means that the impl is missing a definition for the
// associated type. This error will be reported by the type
// checker method `check_impl_items_against_trait`, so here we
// just return Error.
debug!(
"confirm_impl_candidate: no associated type {:?} for {:?}",
assoc_ty.item.name, obligation.predicate
);
return Progress { term: tcx.ty_error_misc().into(), obligations: nested };
}

Fixes #108738

@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 4, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Mar 5, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 5, 2023

📌 Commit 7634c59 has been approved by cjgillot

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#108244 (Add test for semicolon recovery ICE)
 - rust-lang#108746 (Don't project to RPITIT that has no default value)
 - rust-lang#108764 (Tweaks to -Zdrop-tracking-mir)
 - rust-lang#108770 (Improve documentation and argument naming of some TyCtxt methods)
 - rust-lang#108773 (x fmt: Only check modified files locally)
 - rust-lang#108775 (Use the correct bound vars in return type suggestion.)
 - rust-lang#108776 (Make `x test tidy` less noisy)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b876232 into rust-lang:master Mar 6, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 6, 2023
@compiler-errors compiler-errors deleted the rpitit-dont-project-default-w-no-valu branch August 11, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: tcx.impl_defaultness(owner).has_value(): async_fn_in_trait + edition 2018
4 participants