Conversation
0747b0d to
8c2047f
Compare
|
Do I move this to nursery if we don't plan to use it in clippy? Also, how to test eating dogfood? |
clippy_lints/src/as_conversions.rs
Outdated
| /// **Example:** | ||
| /// ```rust | ||
| /// let a: u32 = 0; | ||
| /// let p = &a as *const u32 as *mut u32; |
There was a problem hiding this comment.
Could you add an example that shows the better alternative here? Similar to https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
Pedantic is totally fine. Whenever we have a lint that doesn't really work well for Clippy we usually use |
|
I'd vote for
|
|
☔ The latest upstream changes (presumably #4839) made this pull request unmergeable. Please resolve the merge conflicts. |
f93c0d2 to
9a2c011
Compare
actuall add files add better example and change pedantic to restriction
9a2c011 to
9ec8888
Compare
|
@bors r=flip1995 |
|
📌 Commit 9ec8888 has been approved by |
Add `as_conversions` lint changelog: closes #4771, adding a new pedantic allow-by-default lint that lints against any usage of `as`.
|
☀️ Test successful - checks-travis, status-appveyor |
|
|
||
| fn main() { | ||
| let i = 0u32 as u64; | ||
|
|
There was a problem hiding this comment.
True, I'll open a follow-up pr
changelog: closes #4771, adding a new pedantic allow-by-default lint that lints against any usage of
as.