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

fix variant resolve for type alias #15970

Merged
merged 1 commit into from Nov 27, 2023
Merged

fix variant resolve for type alias #15970

merged 1 commit into from Nov 27, 2023

Conversation

Austaras
Copy link
Contributor

Closes #15943

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 26, 2023
@@ -1152,20 +1152,14 @@ impl<'a> InferenceContext<'a> {
(ty, variant)
}
TypeNs::TypeAliasId(it) => {
let container = it.lookup(self.db.upcast()).container;
let parent_subst = match container {
ItemContainerId::TraitId(id) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem possible to encounter this -- trait assoc type would either results in Self or Trait.

@Veykril
Copy link
Member

Veykril commented Nov 27, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 27, 2023

📌 Commit 2411f13 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Nov 27, 2023

⌛ Testing commit 2411f13 with merge 2ee17bc...

@bors
Copy link
Collaborator

bors commented Nov 27, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 2ee17bc to master...

@bors bors merged commit 2ee17bc into rust-lang:master Nov 27, 2023
10 checks passed
@cart
Copy link

cart commented Nov 28, 2023

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic type alias fails to resolve fields
5 participants