Skip to content

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Aug 21, 2024

Almost all calls are removed after this.

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2024

r? @Alexendoo

rustbot has assigned @Alexendoo.
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 Aug 21, 2024
@Jarcho Jarcho force-pushed the get_src_display3 branch 2 times, most recently from 8b833ea to 4ff5673 Compare August 21, 2024 18:39
self.sf
.src
.as_ref()
.or_else(|| self.sf.external_src.get().and_then(|src| src.get_source()))
Copy link
Member

Choose a reason for hiding this comment

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

Are there cases where we actually want to return a snippet pointing to an external crate? My gut reaction is that would almost always indicate a macro handling bug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unnecessary_cast uses it to deal with type aliases.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see, that's quite the hack. What do you think about using SourceMap for that one manually and skipping external sources for the clippy_utils method? It would make issues of the #12837 variety easier to notice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only noticed unnecessary_cast because it has a test for that case. Given that this might silently break lints and I don't really want to audit all uses of it right now it's better to leave it as is.

@Alexendoo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Aug 24, 2024

📌 Commit 9450b4a has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 24, 2024

⌛ Testing commit 9450b4a with merge 497177f...

@bors
Copy link
Contributor

bors commented Aug 24, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 497177f to master...

@bors bors merged commit 497177f into rust-lang:master Aug 24, 2024
8 checks passed
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.

4 participants