rust-clippy/clippy_lints/src
bors fca1f9aec5 Auto merge of #11106 - syvb:literal_unwrap_ice, r=dswij
[`unnecessary_literal_unwrap`]: Fix ICE on None.unwrap_or_default()

Fixes #11099
Fixes #11064

I'm running into #11099 (cc `@y21)` on my Rust codebase. Clippy ICEs on this code when evaluating the `unnecessary_literal_unwrap` lint:
```rust
fn main() {
    let val1: u8 = None.unwrap_or_default();
}
```

This fixes that ICE and adds an message specifically for that case:

```
error: used `unwrap_or_default()` on `None` value
  --> $DIR/unnecessary_literal_unwrap.rs:26:5
   |
LL |     None::<String>.unwrap_or_default();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the `None` and `unwrap_or_default()`: `String::default()`
```

This PR also fixes the same ICE with `None.unwrap_or_else` (by giving the generic error message for the lint in that case).

changelog: Fix ICE in `unnecessary_literal_unwrap` on `None.unwrap_or_default()`
2023-07-20 10:55:30 +00:00
..
cargo Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
casts Extract the logic for if a snippet equals a type 2023-07-20 03:11:35 -05:00
functions Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
loops Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
matches add guard to suggestion instead of not linting 2023-07-17 21:18:11 +02:00
methods Auto merge of #11106 - syvb:literal_unwrap_ice, r=dswij 2023-07-20 10:55:30 +00:00
misc_early Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
operators Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
transmute Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
types Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
unit_types Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
utils Remove the configuration option 2023-07-19 02:08:33 -05:00
allow_attributes.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
almost_complete_range.rs Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
approx_const.rs Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
arc_with_non_send_sync.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
as_conversions.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
asm_syntax.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
assertions_on_constants.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
assertions_on_result_states.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
async_yields_async.rs Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup 2022-09-09 13:36:26 +02:00
attrs.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
await_holding_invalid.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
blocks_in_if_conditions.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
bool_assert_comparison.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
bool_to_int_with_if.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
booleans.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
borrow_deref_ref.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
box_default.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
checked_conversions.rs Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
cognitive_complexity.rs Use local key in providers 2023-03-21 15:38:51 +00:00
collapsible_if.rs Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
collection_is_never_read.rs Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup 2023-06-02 11:41:57 +02:00
comparison_chain.rs Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
copies.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
copy_iterator.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
crate_in_macro_def.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
create_dir.rs Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup 2022-08-11 19:42:16 +02:00
dbg_macro.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
declared_lints.rs Auto merge of #11107 - Centri3:error_impl_error, r=Jarcho 2023-07-20 02:07:27 +00:00
default.rs Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup 2023-03-24 14:26:19 +01:00
default_constructed_unit_structs.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
default_instead_of_iter_empty.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
default_numeric_fallback.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
default_union_representation.rs Allow LocalDefId as the argument to def_path_str 2023-04-21 22:27:20 +00:00
deprecated_lints.rs Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup 2022-06-30 10:50:09 +02:00
dereference.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
derivable_impls.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
derive.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
disallowed_macros.rs Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup 2022-12-17 14:12:54 +01:00
disallowed_methods.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
disallowed_names.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
disallowed_script_idents.rs Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
disallowed_types.rs rustc_hir: Change representation of import paths to support multiple resolutions 2022-12-01 18:51:05 +03:00
doc.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
double_parens.rs Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
drop_forget_ref.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
duplicate_mod.rs Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
else_if_without_else.rs Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
empty_drop.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
empty_enum.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
empty_structs_with_brackets.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
endian_bytes.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
entry.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
enum_clike.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
enum_variants.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
equatable_if_let.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
error_impl_error.rs Remove the configuration option 2023-07-19 02:08:33 -05:00
escape.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
eta_reduction.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
excessive_bools.rs Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyup 2023-02-10 14:01:19 +01:00
excessive_nesting.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
exhaustive_items.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
exit.rs Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
explicit_write.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
extra_unused_type_parameters.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
fallible_impl_from.rs change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata 2023-01-14 00:29:56 -07:00
float_literal.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
floating_point_arithmetic.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
format.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
format_args.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
format_impl.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
format_push_string.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
formatting.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
four_forward_slashes.rs Improve suggestion and add more tests 2023-07-12 19:54:55 -05:00
from_over_into.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
from_raw_with_void_ptr.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
from_str_radix_10.rs Rm diagnostic item, use lang item 2022-11-18 06:16:20 +00:00
future_not_send.rs Migrate item_bounds to ty::Clause 2023-06-22 18:34:23 +00:00
if_let_mutex.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
if_not_else.rs Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup 2021-12-06 12:33:31 +01:00
if_then_some_else_none.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
implicit_hasher.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
implicit_return.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
implicit_saturating_add.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
implicit_saturating_sub.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
inconsistent_struct_constructor.rs Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyup 2023-02-25 19:28:50 -05:00
incorrect_impls.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
index_refutable_slice.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
indexing_slicing.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
infinite_iter.rs Remove box expressions from HIR 2023-03-14 17:18:26 +00:00
inherent_impl.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
inherent_to_string.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
init_numbered_fields.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
inline_fn_without_body.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
instant_subtraction.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
int_plus_one.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
invalid_upcast_comparisons.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
items_after_statements.rs Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
items_after_test_module.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
iter_not_returning_iterator.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
large_const_arrays.rs Use target instead of machine for mir interpreter integer handling. 2023-02-15 08:56:18 +00:00
large_enum_variant.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
large_futures.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
large_include_file.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
large_stack_arrays.rs Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup 2023-06-02 11:41:57 +02:00
large_stack_frames.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
len_zero.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
let_if_seq.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
let_underscore.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
let_with_type_underscore.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
lib.deprecated.rs Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup 2021-10-07 11:21:30 +02:00
lib.rs New lint [error_impl_error] 2023-07-18 10:26:12 -05:00
lifetimes.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
lines_filter_map_ok.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
literal_representation.rs Fix warnings of needless_pass_by_ref_mut in clippy 2023-07-03 22:25:36 +02:00
macro_use.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
main_recursion.rs Merge 'rust-clippy/master' into clippyup 2022-05-21 13:24:00 +02:00
manual_assert.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
manual_async_fn.rs Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup 2023-03-24 14:26:19 +01:00
manual_bits.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
manual_clamp.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
manual_float_methods.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
manual_is_ascii_check.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
manual_let_else.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
manual_main_separator_str.rs Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup 2023-03-24 14:26:19 +01:00
manual_non_exhaustive.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
manual_range_patterns.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
manual_rem_euclid.rs Fix the now stricter lint in manual_rem_euclid.rs 2023-06-30 18:01:28 +02:00
manual_retain.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
manual_slice_size_calculation.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
manual_string_new.rs Rm diagnostic item, use lang item 2022-11-18 06:16:20 +00:00
manual_strip.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
map_unit_fn.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
match_result_ok.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
mem_replace.rs Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
min_ident_chars.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
minmax.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
misc.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
mismatching_type_param_order.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
missing_assert_message.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
missing_const_for_fn.rs Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
missing_doc.rs Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
missing_enforced_import_rename.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
missing_fields_in_debug.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
missing_inline.rs Rename impl_defaultness to defaultness 2023-06-01 06:14:06 +00:00
missing_trait_methods.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
mixed_read_write_in_expression.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
module_style.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
multi_assignments.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
multiple_unsafe_ops_per_block.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
mut_key.rs Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup 2023-03-24 14:26:19 +01:00
mut_mut.rs Rename Rptr to Ref in AST and HIR 2022-12-28 18:52:36 +01:00
mut_reference.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
mutable_debug_assertion.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
mutex_atomic.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
needless_arbitrary_self_type.rs Rename Rptr to Ref in AST and HIR 2022-12-28 18:52:36 +01:00
needless_bool.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
needless_borrowed_ref.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
needless_continue.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
needless_else.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
needless_for_each.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
needless_if.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
needless_late_init.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
needless_parens_on_range_literals.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
needless_pass_by_ref_mut.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
needless_pass_by_value.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
needless_question_mark.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
needless_update.rs Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyup 2022-06-16 17:39:06 +02:00
neg_cmp_op_on_partial_ord.rs Fix clippy's missing substs 2022-11-21 20:39:29 +00:00
neg_multiply.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
new_without_default.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
no_effect.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
no_mangle_with_rust_abi.rs Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup 2023-03-24 14:26:19 +01:00
non_copy_const.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
non_expressive_names.rs Fix warnings of needless_pass_by_ref_mut in clippy 2023-07-03 22:25:36 +02:00
non_octal_unix_permissions.rs Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
non_send_fields_in_send_ty.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
nonstandard_macro_braces.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
octal_escapes.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
only_used_in_recursion.rs Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup 2023-01-27 21:09:08 +01:00
option_env_unwrap.rs Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
option_if_let_else.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
overflow_check_conditional.rs Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup 2021-12-06 12:33:31 +01:00
panic_in_result_fn.rs [panic_in_result_fn] remove todo!, unimplemented!, unreachable! 2023-07-12 22:19:01 +03:00
panic_unimplemented.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
partial_pub_fields.rs Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
partialeq_ne_impl.rs Use local key in providers 2023-03-21 15:38:51 +00:00
partialeq_to_none.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
pass_by_ref_or_value.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
pattern_type_mismatch.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
permissions_set_readonly_false.rs Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
precedence.rs Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
ptr.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
ptr_offset_with_cast.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
pub_use.rs Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
question_mark.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
question_mark_used.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
ranges.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
raw_strings.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
rc_clone_in_vec_init.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
read_zero_byte_vec.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
redundant_async_block.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
redundant_clone.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
redundant_closure_call.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
redundant_else.rs Update clippy 2022-01-23 19:31:32 +08:00
redundant_field_names.rs Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
redundant_pub_crate.rs Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup 2022-12-17 14:12:54 +01:00
redundant_slicing.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
redundant_static_lifetimes.rs Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
redundant_type_annotations.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
ref_option_ref.rs Add (..) syntax for RTN 2023-03-28 01:14:28 +00:00
ref_patterns.rs Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup 2023-05-20 15:39:26 +02:00
reference.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
regex.rs Fix regex lints for regex 1.9.0 2023-07-05 18:29:43 +00:00
renamed_lints.rs Drop uplifted clippy::fn_null_check 2023-07-10 18:12:41 +02:00
return_self_not_must_use.rs Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyup 2023-02-10 14:01:19 +01:00
returns.rs Don't lint needless_return in fns across a macro boundary 2023-07-17 14:03:00 +00:00
same_name_method.rs Merge branch 'master' into rustup 2023-02-25 17:43:19 -05:00
self_named_constructors.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
semicolon_block.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
semicolon_if_nothing_returned.rs [semicolon_if_nothing_returned]: enable the autofix 2023-07-16 19:37:42 +02:00
serde_api.rs Box HIR Generics and Impl. 2022-04-30 13:51:49 +02:00
shadow.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
significant_drop_tightening.rs [significant_drop_tightening] Fix #11160 2023-07-14 13:51:34 -03:00
single_call_fn.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
single_char_lifetime_names.rs Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyup 2022-06-16 17:39:06 +02:00
single_component_path_imports.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
single_range_in_vec_init.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
size_of_in_element_count.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
size_of_ref.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
slow_vector_initialization.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
std_instead_of_core.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
strings.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
strlen_on_c_strings.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
suspicious_doc_comments.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
suspicious_operation_groupings.rs Make clippy happy 2023-04-27 17:18:12 +00:00
suspicious_trait_impl.rs Use LanguageItems::require less 2022-10-29 16:04:10 -05:00
suspicious_xor_used_as_pow.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
swap.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
swap_ptr_to_ref.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
tabs_in_doc_comments.rs Merge 'rust-clippy/master' into clippyup 2022-05-21 13:24:00 +02:00
temporary_assignment.rs Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup 2021-12-06 12:33:31 +01:00
tests_outside_test_module.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
to_digit_is_some.rs "try this" -> "try" 2023-07-01 07:08:01 -04:00
trailing_empty_array.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
trait_bounds.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
tuple_array_conversions.rs Auto merge of #11171 - Centri3:tuple_array_conversions, r=llogiq 2023-07-18 05:15:50 +00:00
undocumented_unsafe_blocks.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
unicode.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
uninit_vec.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
unit_return_expecting_ord.rs Migrate predicates_of and caller_bounds to Clause 2023-06-26 23:12:03 +00:00
unnamed_address.rs Make {Arc,Rc,Weak}::ptr_eq ignore pointer metadata 2023-04-26 15:27:32 +00:00
unnecessary_box_returns.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
unnecessary_owned_empty_strings.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
unnecessary_self_imports.rs rustc_ast_lowering: Stop lowering imports into multiple items 2022-12-01 18:51:20 +03:00
unnecessary_struct_initialization.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
unnecessary_wraps.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
unnested_or_patterns.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
unsafe_removed_from_name.rs rustc_ast_lowering: Stop lowering imports into multiple items 2022-12-01 18:51:20 +03:00
unused_async.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
unused_io_amount.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
unused_peekable.rs Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
unused_rounding.rs Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
unused_self.rs Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup 2023-01-12 19:48:13 +01:00
unused_unit.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
unwrap.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
unwrap_in_result.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
upper_case_acronyms.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
use_self.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
useless_conversion.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
vec.rs [useless_vec]: add more tests for macro combinations 2023-07-03 19:48:27 +02:00
vec_init_then_push.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
visibility.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
wildcard_imports.rs Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
write.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-07-14 13:36:16 +02:00
zero_div_zero.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
zero_sized_map_values.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00