Skip to content

Conversation

@ShoyuVanilla
Copy link
Member

Fixes #17738

Currently, we are pushing IndexMut obligations only for assign usages;

if *is_assignee_expr {
if let Some(index_trait) = self.resolve_lang_trait(LangItem::IndexMut) {
let trait_ref = TyBuilder::trait_ref(self.db, index_trait)
.push(self_ty)
.fill(|_| index_ty.clone().cast(Interner))
.build();
self.push_obligation(trait_ref.cast(Interner));
}
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2024
Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

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

LGTM!

@lnicola
Copy link
Member

lnicola commented Jul 31, 2024

@bors r=davidbarsky

@bors
Copy link
Contributor

bors commented Jul 31, 2024

📌 Commit b5494d7 has been approved by davidbarsky

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 31, 2024

⌛ Testing commit b5494d7 with merge c8e41d9...

@bors
Copy link
Contributor

bors commented Jul 31, 2024

☀️ Test successful - checks-actions
Approved by: davidbarsky
Pushing c8e41d9 to master...

@bors bors merged commit c8e41d9 into rust-lang:master Jul 31, 2024
@ShoyuVanilla ShoyuVanilla deleted the issue-17738 branch July 31, 2024 18:24
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.

Type inference missing with defaultmap 0.6.0

5 participants