Skip to content

Get the block content from the proper context #15014

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Jun 8, 2025

The first statement of the block might have been in a different context from the expression. Walk up to the right context to get bounds properly.

Also, switch to snippet_with_applicability() since we know that we are in the right context already.

changelog: [if_then_some_else_none]: emit well-formed suggestion, and do not lint inside macros

Fixes #15005

The first statement of the block might have been in a different context
from the expression. Walk up to the right context to get bounds
properly.

Also, switch to `snippet_with_applicability()` since we know that we are
in the right context already.
@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2025

r? @y21

rustbot has assigned @y21.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 8, 2025
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.

if-then-some-else-none does not account for extra exprs before the Some(...)
3 participants