Skip to content

Rustup #13440

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 38 commits into from
Sep 22, 2024
Merged

Rustup #13440

Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ba2577f
stabilize const_float_bits_conv
RalfJung Aug 25, 2024
0b8cb4a
Make `Ty::boxed_ty` return an `Option`
GrigorenkoPV Sep 4, 2024
c8f5136
Rollup merge of #129555 - RalfJung:const_float_bits_conv, r=dtolnay
matthiaskrgr Sep 7, 2024
1c2e9f8
Remove unused functions from ast CoroutineKind
compiler-errors Sep 11, 2024
cd99729
Update tests for hidden references to mutable static
obeis Aug 24, 2024
7fcdebf
Revert "stabilize const_float_bits_conv" for src/tools/clippy/clippy_…
tspiteri Sep 13, 2024
7cccef8
handle transmutes in const context if msrvs::CONST_FLOAT_BITS_CONV
tspiteri Sep 13, 2024
9e69796
Fix lint levels not getting overridden by attrs on `Stmt` nodes
gurry Sep 14, 2024
b5ea5c2
stabilize `const_extern_fn`
folkertdev Aug 29, 2024
976131f
stabilize const_mut_refs
RalfJung Aug 17, 2024
e3bb779
Rollup merge of #130293 - gurry:130142-lint-level-issue, r=cjgillot
matthiaskrgr Sep 15, 2024
978582b
[Clippy] Swap `manual_retain` to use diagnostic items instead of paths
GnomedDev Sep 18, 2024
5a13a93
[Clippy] Swap `map_entry` to use diagnostic items instead of paths
GnomedDev Sep 18, 2024
71dbfd5
[Clippy] Swap `lines_filter_map_ok` to use a diagnostic item instead …
GnomedDev Sep 18, 2024
7ffd485
[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead o…
GnomedDev Sep 18, 2024
8fc9e67
[Clippy] Swap `float_equality_without_abs` to use diagnostic items in…
GnomedDev Sep 18, 2024
1922a99
[Clippy] Swap `redundant_clone` to use diagnostic items instead of paths
GnomedDev Sep 18, 2024
959f7a2
[Clippy] Swap `manual_main_separator_str` to use diagnostic item inst…
GnomedDev Sep 18, 2024
f66915e
[Clippy] Swap `single_char_add_str`/`format_push_string` to use diagn…
GnomedDev Sep 18, 2024
5459679
[Clippy] Swap `VecArgs::hir` to use diagnostic items instead of paths
GnomedDev Sep 18, 2024
984bd6f
[Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item inste…
GnomedDev Sep 18, 2024
b015290
[Clippy] Swap `manual_while_let_some` to use diagnostic items instead…
GnomedDev Sep 18, 2024
45c1700
[Clippy] Swap `filter_map_bool_then` to use diagnostic item instead o…
GnomedDev Sep 18, 2024
d63e35b
[Clippy] Swap `waker_clone_wake` to use diagnostic item instead of path
GnomedDev Sep 18, 2024
98dc68e
[Clippy] Swap `instant_subtraction` to use diagnostic item instead of…
GnomedDev Sep 18, 2024
acb6748
[Clippy] Swap `unnecessary_to_owned` to use diagnostic item instead o…
GnomedDev Sep 18, 2024
1b76ae6
[Clippy] Swap `manual_strip` to use diagnostic items instead of paths
GnomedDev Sep 18, 2024
f1fc9c0
[Clippy] Swap `unnecessary_owned_empty_strings` to use diagnostic ite…
GnomedDev Sep 18, 2024
37e3832
[Clippy] Swap `non_octal_unix_permissions` to use diagnostic item ins…
GnomedDev Sep 18, 2024
917775f
[Clippy] Swap `iter_over_hash_type` to use diagnostic items instead o…
GnomedDev Sep 18, 2024
c7453b4
[Clippy] Swap `open_options` to use diagnostic items instead of paths
GnomedDev Sep 19, 2024
07b6e07
Categorise paths in `clippy_utils::paths`
GnomedDev Sep 19, 2024
4f31900
[Clippy] Remove final std paths for diagnostic item
GnomedDev Sep 19, 2024
bb04c68
Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errors
bors Sep 20, 2024
249210e
Fix clippy
saethlin Sep 20, 2024
d140e26
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Sep 22, 2024
3ab1da8
Formatting
flip1995 Sep 22, 2024
009134d
Bump nightly version -> 2024-09-22
flip1995 Sep 22, 2024
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
[Clippy] Swap lines_filter_map_ok to use a diagnostic item instead …
…of path
GnomedDev committed Sep 19, 2024
commit 71dbfd55a110cbd1673346db768fb6a06016abdd
4 changes: 2 additions & 2 deletions clippy_lints/src/lines_filter_map_ok.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::ty::is_type_diagnostic_item;
use clippy_utils::{is_diag_item_method, is_trait_method, match_def_path, path_to_local_id, paths};
use clippy_utils::{is_diag_item_method, is_trait_method, path_to_local_id};
use rustc_errors::Applicability;
use rustc_hir::{Body, Closure, Expr, ExprKind};
use rustc_lint::{LateContext, LateLintPass};
@@ -96,7 +96,7 @@ fn should_lint(cx: &LateContext<'_>, args: &[Expr<'_>], method_str: &str) -> boo
ExprKind::Path(qpath) => cx
.qpath_res(qpath, fm_arg.hir_id)
.opt_def_id()
.is_some_and(|did| match_def_path(cx, did, &paths::CORE_RESULT_OK_METHOD)),
.is_some_and(|did| cx.tcx.is_diagnostic_item(sym::result_ok_method, did)),
// Detect `|x| x.ok()`
ExprKind::Closure(Closure { body, .. }) => {
if let Body {
1 change: 0 additions & 1 deletion clippy_utils/src/paths.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ pub const APPLICABILITY_VALUES: [[&str; 3]; 4] = [
["rustc_lint_defs", "Applicability", "MachineApplicable"],
];
pub const DIAG: [&str; 2] = ["rustc_errors", "Diag"];
pub const CORE_RESULT_OK_METHOD: [&str; 4] = ["core", "result", "Result", "ok"];
pub const CSTRING_AS_C_STR: [&str; 5] = ["alloc", "ffi", "c_str", "CString", "as_c_str"];
pub const EARLY_CONTEXT: [&str; 2] = ["rustc_lint", "EarlyContext"];
pub const EARLY_LINT_PASS: [&str; 3] = ["rustc_lint", "passes", "EarlyLintPass"];