Merged
Conversation
Contributor
Author
|
Before: After: |
src/librustc/front/show_span.rs
Outdated
Contributor
There was a problem hiding this comment.
Could we have a comment about what this is doing?
Contributor
There was a problem hiding this comment.
(What the file is doing, that is; I know what the import is doing. :P )
Contributor
Author
|
Added some comments. |
bors
added a commit
that referenced
this pull request
Feb 7, 2014
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 8, 2024
Add new lint: `ref_as_ptr` Fixes rust-lang#10130 Added new lint `ref_as_ptr` that checks for conversions from references to pointers and suggests using `std::ptr::from_{ref, mut}` instead. The name is different than suggested in the issue (`as_ptr_cast`) since there were some other lints with similar names (`ptr_as_ptr`, `borrow_as_ptr`) and I wanted to follow the convention. Note that this lint conflicts with the `borrow_as_ptr` lint in the sense that it recommends changing `&foo as *const _` to `std::ptr::from_ref(&foo)` instead of `std::ptr::addr_of!(foo)`. Personally, I think the former is more readable and, in contrast to `addr_of` macro, can be also applied to temporaries (cf. rust-lang#9884). --- changelog: New lint: [`ref_as_ptr`] [rust-lang#12087](rust-lang/rust-clippy#12087)
nnethercote
added a commit
to nnethercote/rust
that referenced
this pull request
Dec 4, 2024
It's very old (added in rust-lang#12087). It's strange, and it's not clear what its use cases are. It only works with the crate root file because it runs before expansion. I suspect it won't be missed.
Merged
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 4, 2024
…iler-errors Remove `-Zshow-span`. It's very old (added in rust-lang#12087). It's strange, and it's not clear what its use cases are. It only works with the crate root file because it runs before expansion. I suspect it won't be missed. r? `@estebank`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 4, 2024
Rollup merge of rust-lang#133847 - nnethercote:rm-Z-show-span, r=compiler-errors Remove `-Zshow-span`. It's very old (added in rust-lang#12087). It's strange, and it's not clear what its use cases are. It only works with the crate root file because it runs before expansion. I suspect it won't be missed. r? `@estebank`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.