-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Span debugger #12087
Span debugger #12087
Conversation
Before:
After:
|
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
use syntax::ast; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a comment about what this is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(What the file is doing, that is; I know what the import is doing. :P )
Added some comments. |
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)
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.
…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`
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`
No description provided.