-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Crank up invalid value lint #63657
Crank up invalid value lint #63657
Conversation
This comment has been minimized.
This comment has been minimized.
r? @Centril r=me with comments addressed :) |
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
@bors r=Centril |
📌 Commit f19087d has been approved by |
src/librustc_lint/builtin.rs
Outdated
if let hir::ExprKind::Path(ref qpath) = path_expr.node { | ||
let def_id = cx.tables.qpath_res(qpath, path_expr.hir_id).opt_def_id()?; | ||
|
||
if cx.match_def_path(def_id, &ZEROED_PATH) { |
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.
No need to borrow ZEROED_PATH here.
(It's already a slice).
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.
Good point, thanks.
@bors r=Centril |
📌 Commit 72d9fe8 has been approved by |
⌛ Testing commit 72d9fe8 with merge 602e7dec16b4db3eddeb072ec9489a544d998f6b... |
💔 Test failed - checks-azure |
This comment has been minimized.
This comment has been minimized.
Ah, this is caused by musl not being able to display spans in libstd... I cannot test with |
@bors r=Centril |
📌 Commit 3288be5 has been approved by |
Crank up invalid value lint * Warn against uninit `bool` and `char`. * Warn against 0-init `NonNull` and friends * Detect transmute-from-0 as zero-initialization ([seen in the wild](glium/glium#1775 (comment)))
Rollup of 5 pull requests Successful merges: - #62451 (Add APIs for uninitialized Box, Rc, and Arc. (Plus get_mut_unchecked)) - #63487 (Remove meaningless comments in src/test) - #63657 (Crank up invalid value lint) - #63667 (resolve: Properly integrate derives and `macro_rules` scopes) - #63669 (fix typos in mir/interpret) Failed merges: r? @ghost
bool
andchar
.NonNull
and friends