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: Fix implicit ty args being lowered where they shouldn't #17175

Merged
merged 1 commit into from
May 2, 2024

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented May 2, 2024

Fixes #17173

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 2, 2024
@@ -662,7 +662,7 @@ impl<'a> Ctx<'a> {
let attrs = RawAttrs::new(self.db.upcast(), &param, self.body_ctx.span_map());
debug_assert!(self.generic_param_attr_buffer.insert(item, attrs).is_none());
};

self.body_ctx.take_impl_traits_bounds();
Copy link
Member Author

Choose a reason for hiding this comment

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

Issue was basically this line missing. Without it, we start allocating impl trait args for things that are not related to the generic params / where clauses

@Veykril
Copy link
Member Author

Veykril commented May 2, 2024

cc @dfireBird this fixes an issue that your recent PR introduced just so you are aware
@bors r+

@bors
Copy link
Contributor

bors commented May 2, 2024

📌 Commit 8241d8a has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented May 2, 2024

⌛ Testing commit 8241d8a with merge ecba59d...

@bors
Copy link
Contributor

bors commented May 2, 2024

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

@Veykril Veykril closed this May 2, 2024
@bors bors merged commit ecba59d into rust-lang:master May 2, 2024
11 checks passed
@Veykril Veykril deleted the fix-implicit-ty-args branch May 2, 2024 10:16
bors added a commit that referenced this pull request May 2, 2024
Fix impl trait params not being counted properly

Fixes the other thing in #17173, this just rolls back a change from #17175 and adds a comment as to what it does
lnicola pushed a commit to lnicola/rust that referenced this pull request May 19, 2024
Fix impl trait params not being counted properly

Fixes the other thing in rust-lang/rust-analyzer#17173, this just rolls back a change from rust-lang/rust-analyzer#17175 and adds a comment as to what it does
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.

r-a gets confused with nested anonymous type params when additional where bounds are involved
3 participants