Skip to content

Update Clippy #106259

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

Merged
merged 56 commits into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
055f349
Avoid `match_wildcard_for_single_variants` on guarded wild matches
koka831 Dec 10, 2022
3b6bbf7
Fix match_single_binding suggestion introduced an extra semicolon
alex-semenyuk Nov 7, 2022
5b3a666
fix manual_filter false positive
ericwu17 Dec 16, 2022
3c14075
manual_filter: add a related test
ericwu17 Dec 16, 2022
033f1ec
Add 2018/2021 edition tests for wildcard_imports
chansuke Dec 12, 2022
1c42252
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
flip1995 Dec 17, 2022
af39a8a
Identify more cases of useless `into_iter()` calls
samueltardieu Dec 1, 2022
6afe547
Add lint `transmute_null_to_fn`
Niki4tap Dec 17, 2022
3cc67d0
Relax clippy_utils::consts::miri_to_const pointer type restrictiveness
Niki4tap Dec 17, 2022
42106e0
Add lint `fn_null_check`
Niki4tap Dec 17, 2022
54a9168
Remove useless pattern matching
Niki4tap Dec 17, 2022
dae54fa
Doc codeblock fixup
Niki4tap Dec 18, 2022
ebb0759
Add a test for regular wildcard
koka831 Dec 11, 2022
b1ca307
Address some of the code style issues
Niki4tap Dec 18, 2022
910a97d
Auto merge of #10020 - samueltardieu:more-into-iter-removal, r=xFrednet
bors Dec 18, 2022
9b2fc8e
Make clippy happy
Niki4tap Dec 18, 2022
20f501a
Improve code style further
Niki4tap Dec 18, 2022
cc98574
Fix comments, use `constant` instead of raw `constant_context`
Niki4tap Dec 18, 2022
62061b8
Move manual_clamp to nursery
flip1995 Dec 19, 2022
8a6aca3
Auto merge of #10101 - flip1995:manual_clamp_nursery, r=xFrednet
bors Dec 19, 2022
691df70
Inline some `const`s
Niki4tap Dec 19, 2022
b3145fe
Auto merge of #10099 - Niki4tap:null_fn_lints, r=llogiq
bors Dec 19, 2022
d0ac6ba
Fix overflow ICE in large_stack/const_arrays
Niki4tap Dec 19, 2022
30e6e85
add [`permissions_set_readonly_false`] #9702
Oct 28, 2022
e1d3c1e
refactor: fix style
chansuke Dec 17, 2022
09cfcaf
Auto merge of #10103 - Niki4tap:overflow_ice, r=flip1995
bors Dec 19, 2022
2444494
Make Clippy test no longer unsound
compiler-errors Dec 16, 2022
1e68973
Auto merge of #10067 - chansuke:issue-7943, r=giraffate
bors Dec 20, 2022
cd3d38a
Use `rustc_mir_dataflow::impls::MaybeStorageLive`
smoelius Oct 11, 2022
c6477eb
Add tests
smoelius Oct 12, 2022
ed519ad
Improve `possible_borrower`
smoelius Oct 12, 2022
26df551
Fix adjacent code
smoelius Oct 12, 2022
c7dc961
Address review comments
smoelius Dec 13, 2022
4dbd8ad
Address https://github.com/rust-lang/rust/pull/105659
smoelius Dec 20, 2022
b21cc36
hotfix: add help dialog for `PermissionExt`
chansuke Dec 17, 2022
4a09068
Auto merge of #10063 - chansuke:issue-9702, r=Alexendoo
bors Dec 20, 2022
065c6f7
Auto merge of #10091 - EricWu2003:manual-filter-FP, r=llogiq
bors Dec 21, 2022
b6882f6
Fix FP in needless_return when using yeet
Niki4tap Dec 22, 2022
f0d331a
Auto merge of #10109 - Niki4tap:yeet_not_return, r=flip1995
bors Dec 22, 2022
8a6e6fd
Auto merge of #10056 - koka831:fix/9993, r=Jarcho
bors Dec 22, 2022
4fe3727
Auto merge of #9701 - smoelius:improve-possible-borrower, r=Jarcho
bors Dec 22, 2022
faebca3
Changelog fix
alex-semenyuk Dec 23, 2022
e2a687d
Auto merge of #10111 - alex-semenyuk:changelog_fix, r=flip1995
bors Dec 23, 2022
d7b9e19
Add size_of_ref lint
lukaslueg Dec 17, 2022
e8703a0
Auto merge of #10098 - lukaslueg:size_of_ref, r=Jarcho
bors Dec 24, 2022
12f2dea
`not_unsafe_ptr_arg_deref` update documentation
tgross35 Dec 25, 2022
4f1bae0
Auto merge of #10116 - tgross35:patch-1, r=llogiq
bors Dec 25, 2022
fae19a9
Place default values near its definitions
koka831 Dec 25, 2022
6bb6dd6
fix incorrect suggestion in `suboptimal_flops`
ericwu17 Dec 23, 2022
d98e714
Auto merge of #10113 - EricWu2003:suboptimal_flops_incorrect_suggesti…
bors Dec 26, 2022
266eef7
Auto merge of #10119 - koka831:doc/config-default-value, r=xFrednet
bors Dec 28, 2022
22af8fe
Auto merge of #10060 - alex-semenyuk:match_single_binding_fix, r=llogiq
bors Dec 29, 2022
0853540
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Dec 29, 2022
1f97186
Bump nightly version -> 2022-12-29
flip1995 Dec 29, 2022
4f3ab69
Auto merge of #10126 - flip1995:rustup, r=flip1995
bors Dec 29, 2022
56ab392
Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyup
flip1995 Dec 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Relax clippy_utils::consts::miri_to_const pointer type restrictiveness
  • Loading branch information
Niki4tap committed Dec 18, 2022
commit 3cc67d08569b5cf847242532f99c5aca838dbdeb
2 changes: 2 additions & 0 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ mod explicit_write;
mod fallible_impl_from;
mod float_literal;
mod floating_point_arithmetic;
mod fn_null_check;
mod format;
mod format_args;
mod format_impl;
Expand Down Expand Up @@ -902,6 +903,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_late_pass(|_| Box::new(suspicious_xor_used_as_pow::ConfusingXorAndPow));
store.register_late_pass(move |_| Box::new(manual_is_ascii_check::ManualIsAsciiCheck::new(msrv())));
store.register_late_pass(|_| Box::new(semicolon_block::SemicolonBlock));
store.register_late_pass(|_| Box::new(fn_null_check::FnNullCheck));
// add lints here, do not remove this comment, it's used in `new_lint`
}

Expand Down
7 changes: 1 addition & 6 deletions clippy_utils/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,12 +620,7 @@ pub fn miri_to_const<'tcx>(tcx: TyCtxt<'tcx>, result: mir::ConstantKind<'tcx>) -
ty::Float(FloatTy::F64) => Some(Constant::F64(f64::from_bits(
int.try_into().expect("invalid f64 bit representation"),
))),
ty::RawPtr(type_and_mut) => {
if let ty::Uint(_) = type_and_mut.ty.kind() {
return Some(Constant::RawPtr(int.assert_bits(int.size())));
}
None
},
ty::RawPtr(_) => Some(Constant::RawPtr(int.assert_bits(int.size()))),
// FIXME: implement other conversions.
_ => None,
}
Expand Down