From 0e94b1639551b8c8cebc265dcfeeaa7018feebdc Mon Sep 17 00:00:00 2001 From: Mason Ray Hanna III Date: Sat, 15 Jul 2023 10:43:53 -0400 Subject: [PATCH] Entered supposed changes, ran cargo dev fmt, test, and bless. initial step towards implementing C string literals rm diag item, use lang item Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. - Switch clippy to the new hook This also adds a `extra_info` callback so clippy can include its own version number, which differs from rustc's. - Call `install_ice_hook` in rustfmt make (try_)subst_and_normalize_erasing_regions take EarlyBinder changes from review: add FIXME to clippy and change subst_identity to skip_binder in mir subst methods IAT: Introduce AliasKind::Inherent Drop uplifted clippy::drop_ref Drop uplifted clippy::drop_copy Drop uplifted clippy::forget_ref Drop uplifted clippy::forget_copy Exposes false negative in clippy's diverging_sub_expression Remove `LangItems::require` It's just a short wrapper used by `tcx.require_lang_item`. Deleting it gives us a negative diff. Exclude inherent projections from some alias ty matches Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup Rename `drop_copy` lint to `dropping_copy_types` Rename `forget_copy` lint to `forgetting_copy_types` Rename `drop_ref` lint to `dropping_references` Rename `forget_ref` lint to `forgetting_references` Replace EarlyBinder(x) with EarlyBinder::new(x) Make EarlyBinder's inner value private; and fix all of the resulting errors Use `Cow` in `{D,Subd}iagnosticMessage`. Each of `{D,Subd}iagnosticMessage::{Str,Eager}` has a comment: ``` // FIXME(davidtwco): can a `Cow<'static, str>` be used here? ``` This commit answers that question in the affirmative. It's not the most compelling change ever, but it might be worth merging. This requires changing the `impl<'a> From<&'a str>` impls to `impl From<&'static str>`, which involves a bunch of knock-on changes that require/result in call sites being a little more precise about exactly what kind of string they use to create errors, and not just `&str`. This will result in fewer unnecessary allocations, though this will not have any notable perf effects given that these are error paths. Note that I was lazy within Clippy, using `to_string` in a few places to preserve the existing string imprecision. I could have used `impl Into<{D,Subd}iagnosticMessage>` in various places as is done in the compiler, but that would have required changes to *many* call sites (mostly changing `&format("...")` to `format!("...")`) which didn't seem worthwhile. Drop uplifted clippy::invalid_utf8_in_unchecked EarlyBinder::new -> EarlyBinder::bind Drop uplifted clippy::cast_ref_to_mut Use translatable diagnostics in `rustc_const_eval` Implement custom diagnostic for ConstParamTy Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup Rename `impl_defaultness` to `defaultness` Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems Whoops, submodule change was actually valid - undoing fixup Drop uplifted clippy::undropped_manually_drops Drop uplifted `clippy:cmp_nan` Extend `unused_must_use` to cover block exprs Add `AliasKind::Weak` for type aliases. Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases. Move WF goal to clause Move ConstEvaluatable to Clause Treat TAIT equation as always ambiguous in coherence Better error for non const `PartialEq` call generated by `match` Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata s/Clause/ClauseKind Support `ast::ExprKind::Become` in clippy Migrate item_bounds to ty::Clause Do not offer any of the suggestions in emit_coerce_suggestions for expr from destructuring assignment desugaring Support `hir::ExprKind::Become` in clippy Migrate predicates_of and caller_bounds to Clause Provide more context for `rustc +nightly -Zunstable-options` on stable Make simd_shuffle_indices use valtrees Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup Fix valtree changes Fix compile-test tests to work with the new ui_test crate Deal with fallout Patch clippy Move `TyCtxt::mk_x` to `Ty::new_x` where applicable Fix failing clippy tests Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121 Rename `adjustment::PointerCast` and variants using it to `PointerCoercion` It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum. Delete `to_string_in_format_args_incremental.rs` It fails CI and passes locally. It passes random directores in `-Cincremental` so maybe something's up. It shouldn't block us here. Drop uplifted `clippy::fn_null_check` Ignore flaky clippy tests. Suggest the correct variable name for `manual_let_else` Split if conditions by its semantics Remove old feature flag in code comment Since let_else feature has been stable in 1.65.0, it's now unnecessary Avoid renaming for TupleStruct with multiple arguments update spec fix: move specs in fire Fix: Some suggestions generated by the option_if_let_else lint did not compile bump up `regex-syntax` dependency version to 0.7.0 Ignoring `let_underscore_untyped` warnings in code from proc macros fixing fmt Checking for proc_macro not only when local.init is Some Remove unnecessary from example fix example heading in `string_slice` don't remove `dbg!` in arbitrary expressions handle nested macros and add tests for them Rename integer_arithmetic redundant_pattern_matching redundant_pattern_matching fix conflict with matches macro fix conflict with matches macro fix error test update a func fix reviewer comments fix reviewer comments: tests results update tests update test option Don't suggest unnameable types in box_default, let_underscore_untyped Search for inactive `cfg` attributes and empty macro expansion through the entire block Slightly refactor constant evaluation and add detection for empty macro expansion and `cfg`ed statements. Improve `SpanlessEq` * Don't consider expansions of different macros to be the same, even if they expand to the same tokens * Don't consider `cfg!` expansions to be equal if they check different configs. enhance `needless_collect` Updates `needless_collect` to lint for collecting into a method or function argument thats taking an `IntoIterator` (for example `extend`). Every `Iterator` trivially implements `IntoIterator` and colleting it only causes an unnecessary allocation. Add new `UNIQUE_CFG_CONDITION` lint Add UI test for UNIQUE_CFG_CONDITION Update CHANGELOG Add check for empty cfg `all` condition Update urls in Type Checking Bump nightly version -> 2023-05-20 [`match_wild_err_arm`]: do not lint in const contexts consider array initializer for `large_stack_arrays` add test case for #10741 Unit tests highlighting unsafe match issue These unit tests generate non-compilable code. I did NOT `bless` them on purpose because the stderr output is not good. I'm surprised we don't auto-compile the suggestions here - is this something that can be easily enabled? See #10808 Fix unsafe blocks Use #[rustfmt::skip] remove todo Run-rustfix needless_else: new lint to check for empty else clauses the implementation!! check msrv Update clippy_lints/src/casts/ptr_cast_constness.rs Co-authored-by: llogiq add description and rename msrv tests change `clippy::version` to 1.71.0 Display the `needless_return` suggestion error out if lint name contains dash replace `-` instead of erroring out apply suggestion Co-authored-by: Philipp Krones Address Dependabot alerts do not consider `await` in nested `async` blocks remove old span_lint point to `await` expr in note redundant pattern matches! result [`default_constructed_unit_structs`]: do not lint type aliases Ignore #[cfg]'d out code in needless_else Fix formatting of if let chain Some improvements to the manual_let_else lint suggestions * Replace variables inside | patterns in the if let: let v = if let V::A(v) | V::B(v) = v { v } else ... * Support nested patterns: let v = if let Ok(Ok(Ok(v))) = v { v } else ... * Support tuple structs with more than one arg: let v = V::W(v, _) = v { v } else ... * Correctly handle .. in tuple struct patterns: let v = V::X(v, ..) = v { v } else ... Fixing `invalid_regex` with invalid UTF8. Also, adding more test cases Update version attribute for 1.70 lints Changelog for Rust 1.70 :hammer: Change changelog typos Co-authored-by: Takayuki Nakata deps: drop serde feature from url actually, remove rustc-workspace-hack dependency too [`wildcard_imports`] Modules that contain `prelude` are also allowed This commit fixes #10846 by checking if the path segment contains the word "prelude". Signed-off-by: Charalampos Mitrodimas fix issues 10836 change booleans file and update tests Remove lint name and category fields from the new lint issue form new lint: `missing_field_in_debug` move some strings into consts, more tests s/missing_field_in_debug/missing_fields_in_debug dont trigger in macro expansions make dogfood tests happy minor cleanups replace HashSet with FxHashSet replace match_def_path with match_type if_chain -> let chains, fix markdown, allow newtype pattern fmt consider string literal in `.field()` calls as used don't intern defined symbol, remove mentions of 'debug_tuple' special-case PD, account for field access through `Deref` don't lint enums, update note in lint description Explain which paths clippy searches for configuration in docs Explain path-search using a list Add spans to `clippy.toml` error messages Bump nightly version -> 2023-06-02 Bump Clippy version -> 0.1.72 add checking for cfg(features = ...) Update *Current stable* text in `CHANGELOG.md` Refresh Lint Configuration's looks emit `unnecessary_cast` on raw pointers as well ok actually appease CI I should always run cargo test before committing :sweat_smile: add generics in test also ensure generics with the same type are linted Use URL parameters for filter states This retains the settings during browser navigation and allows sharing links with additional configuration. Handle back/forward when using URL parameters for filter states Clippy Lints page - Delay updating of the URL in response to search input Update on blur, enter keypress, and a debounced delay of 1000 ms. This keeps the URL updated, but not distractingly so. Clippy Lints page - Do not show groups in URL parameters if reset to defaults Clippy Lints page - Fix path watch triggering Clippy Lints page - Do not show filters in URL if configured as default values only lint when `cast_from` and `cast_to`'s ty are the same weird manual_let_else: only add () around PatKind::Or at the top level At the top level, () are required, but on the levels below they are not. Support multi-binding situations as well as tuple patterns Support struct patterns new lint: `explicit_into_iter_fn_arg` dogfood update docs, simplify arg->param map, dont lint on chain merge `explicit_into_iter_fn_arg` into `useless_conversion` fix new failing proc macro tests add plural form to useless_conversion if depth > 0 Add lint to check lint formulation messages Fix lints that don't conform to the standard formulation refactor(test): Move attribute to lint level Fix suggestion on fully qualified syntax ignore `Foo::deref` altogether Add from_over_into replace for type in `Self` reference Ignore from_over_into if it contains Self Move bail into lint to prevent no-linting, move to unfixable don't lint `allow_attributes` on attributes from proc macros foiled again (forgot to run cargo test) Fix `attr_search_pat` for `#[cfg_attr]` remove tuple add test for `?` desugaring Update allow_attributes_without_reason.rs `to_xx_bytes` implemented, `from_xx_bytes` todo Mentioned in #10765 implement `host_endian_bytes` and the other two weird grammar refine output unidiomatic `if_chain!` don't allocate the names use enum for `prefix` instead of `&str` Update endian_bytes.rs derive Copy/PartialEq for `Prefix` Remove `CARGO_UNSTABLE_SPARSE_REGISTRY` env from ci It is now the default to use the sparse registry Move redundant_clone to nursery Add a test that checks for old style test headers [`unnecessary_lazy_eval`]: don't lint on types with deref impl Bring up Rust lang #37612 as a known problem for let_and_return Compact issue link Co-authored-by: Takayuki Nakata Add redundant type annotations lint Move `redundant_type_annotations` to restriction Extract common logic to function Add support to returned refs from `MethodCall` Add `Limitations` section make cast_possible_wrap not lint on conversions for sizes that cannot wrap, and make it work correctly for 16 bit {u,i}size add more info link Fix #10498 Use type snippet instead of init expr for proc macro check check for `_` instead account for autoderef in eager_or_lazy don't call `type_of` on generic params Don't warn if there is a comment between else and curly bracket make `useless_vec` smarter allow the lint in a bunch of tests don't allow `as_slice` for now Adds new lint `arc_with_non_send_or_sync` Updating documentation and lint formatting. Adding extra check to ignore generic args. Swapping to matches macro. handle RangeInclusive function desugar actually don't lint for inclusive range Fix `useless_vec` suggestion in `for _ in vec![..]` Ignore more pointer types in `unnecessary_cast` check that the adjusted receiver type matches target add the `excessive_*` style lints change it to nursery category add `excessive_nesting` Close code block in example couple more notes decided against reinventing the wheel check non-inline modules, ignore all macros work with lint attributes move to `complexity` but don't lint by default Check if from proc macro and better tests remove revisions fix #10776 actually fix it also lint single expression blocks Update mixed_read_write_in_expression.rs Update diverging_sub_expression.stderr ensure there are no stmts for expr check refactor Update excessive_nesting.rs Update excessive_nesting.rs allow disabling module inception on private modules allow disabling module inception on private modules Direct towards late passes in `cargo dev new_lint` handle exponent without digits add test ignore more type aliases in unnecessary_cast ignore more type aliases in unnecessary_cast Update unnecessary_cast.stderr Add `needless_if` lint make cargo test pass add description add description don't lint on `if let` don't lint on `if let` Update needless_if.fixed Stop visiting once it's found `Let` Extend `explicit_iter_loop` to all types Split `for_loops` tests Fix `explicit_into_iter_loop` with mutable references Reborrow mutable references in `explicit_iter_loop` Fix #10504, don't lint on derived code refactor Update trait_bounds.rs `ty_search_pat` `impl WithSearchPat for Ty` Update check_proc_macro.rs Add lint `single_letter_idents` rename the lint make cargo test pass + example ignore generics and allow arbitrary threshold make it work for locals as well oopos add to tests and configuration `cargo collect-metadata` refactor and add link to issue new lint: `large_stack_frames` `cargo dev update_lints` fmt use span_lint_and_note rename "drawbacks" to "known issues" make lint description easier to read, prevent ICE fix rebase weirdness update lint_configuration.md Don't ling `as_conversions` in proc macros [`useless_vec`]: detect unnecessary `vec![_]` add- and fix existing tests Add test code Boilerplate for the new lint Add hook Add the lint to the lib Implement the lint Implement the lint for expect Implement the suggestion Recognize `Ok` Recognize `unwrap_or` methods Recognize `unwrap_or_else` method Track init and unwrap of expr Recognize `Err` Support suggesting panics Add more tests Preserve type annotations when present Fix all the other tests Don't lint non-statement/faux empty `needless_if`s Now `cargo collect-metadata` updates the `CHANGELOG.md` Remove dead code in `needless_pass_by_value` Fix `missing_const_for_fn` not checking `~const Destruct` use trait solver instead; created spaghetti code cleanup spaghetti code remove unnecessary checks remove `in_move` [`needless_lifetimes`]' suggestion now points at the lifetimes [`no_effect`]: suggest adding `return` if applicable make cargo test pass Revert "Make it `Unspecified`" This reverts commit 774863041c1878ab7fb6e27c1c61c04de0e25bc8. Make it `Unspecified` [`map_unwrap_or`]: don't lint when referenced variable is moved Ignore `main()` in `no_test` code fences run `cargo dev fmt` add main function to test itself [`derivable_impls`]: don't lint if expr unsize-coerces fmt dogfood fix internal lints Add lint [`single_range_in_vec_init`] refactor a bit [`unnecessary_fold`]: suggest turbofish if necessary get rid of unnecessary function pointer move check_fold_with_op function out from_over_into: Show suggestions for non-Self expanded paths [`match_same_arms`]: don't lint if `non_exhaustive_omitted_patterns` formatting :/ new lint: `drain_collect` take into account reborrowing when inserting `&mut` in sugg make clippy happy add a description add test case for not whole length, move sugg into variable add lint [`needless_clone_impl`] Update needless_impls.rs rename lint and disallow `clone_from` missing_panics_doc: pickup expect method bless address or allow clippy::missing_panics_doc in clippy-dev merge test improve grammer in comment sentence Co-authored-by: dswij Refactor to make following commit pass single_match_else lint Make `--explain` subcommand return 1 for missing lints Ignore more type aliases in `unnecessary_cast` Adapt versions.html file to cleaned up gh-pages Fix version.py after deleting v* dirs I missed updating this file. I also ran black and isort over it. Adding configuration to allow safety comment above stmt containing unsafe block Addressing reviewer comments adding all ui tests to the configuration test as well Collecting metadata Exlude `todo!()` from `missing_panics_in_doc` `missing_panics_in_doc` bless test and add additional macro testcase new lint `single_call_fn` add test for closures Ignore functions annotated with `#[test]` Fix `find_format_arg_expr` when incremental compilation is enabled Fix #10792 Dogfood Fix false positive of [self_named_module_files] and [mod_module_files] Move continue into if statement Co-authored-by: Catherine <114838443+Centri3@users.noreply.github.com> [`redundant_closure_call`]: handle nested closures fix docs don't unnecessarily walk more in visitor and add more tests Ignore in-proc-macros items use PlaceRef abstractions add non-test-case for suggesting const on functions accessing union fields allow safety comment above attributes [`single_match`]: don't lint if block contains comments add test for block comment and add note to description Don't lint `excessive_precision` on inf Add WebAssembly to allowed idents add WebAssembly to test [`borrow_as_ptr`]: Ignore temporaries use rustc's criteria for a temporary Don't lint `iter_nth_zero` in `next` include a ref if argument is not just a numeric literal use let chains, move assignments out of block, add tests declare needs_ref later [`type_repetition_in_bounds`]: respect msrv for combining maybe bounds put issue link between <> rename MSRV alias, add MSRV to lint doc update lint configuration Don't lint `ptr_arg` when return type uses Cow's lifetime [`format_push_string`]: look through match, if, if-let Avoid linting on procedural macros Lint `mem_forget` if fields are `Drop` move to `drop_forget_ref` make note less verbose Check if `if` conditions always evaluate to true in `never_loop` update changelog's data ranges Port clippy away from compiletest to ui_test Update tests Find the right `cargo-clippy` binary in CI Don't lint code from external macros add `needless_raw_string_hashes` lint add semicolon in doctest new lint `needless_raw_string` + refactor a bit Thanks, #112373, for the snippet at line 75! Update raw_strings.rs don't lint `needless_raw_string_hashes` when it's unnecessary change category and refactor Update raw_strings.rs Revert "new lints for visibility" This reverts commit 0e5a537d209727169769dc19cf86aef27122c092. new lints for visibility Fix compile-test under cargo nextest Add BLESS for compile-test and some cleanup new lint: `manual_range_pattern` manual_range_pattern -> manual_range_patterns Use substring matching for TESTNAME new lints for visibility Change category and update to `ui_test` [`unused_async`]: don't lint on async trait impls move `is_in_trait_method` to utils and rename [`option_if_let_else`]: suggest `.as_ref()` if `&Option<_>` allow dead code in the test [`question_mark`]: don't lint inside of `try` block lint in nested bodies if `try` is in outer body suggests `is_some_and` over `map().unwrap_or(false)` changed the msrv to 1.70 to suggest `is_some_and` if the msrv is not >= 1.70 then the `map_or` is suggested instead of `is_some_and` (even when `unwrap_or` returns false) now passes dogfood by wrapping unwrap_recv and unwrap_arg into a tuple was previously failing due to `check` having to many arguments. Revert "now passes dogfood by wrapping unwrap_recv and unwrap_arg into a tuple" This reverts commit 7b91844a3207d90d4200a7b53d0ae1a7a1dca73a. ignore too_many_arguments on `check` changed msrv name for consistency & changed nested if for style updated list of lints that use msrv ran `cargo collect-metadata` New lint [`redundant_rest_pattern`] Rename the lint Add note to remove `if` statement altogether Fix #10413 Dogfood Bump nightly version -> 2023-06-29 Make `eq_op` suggest `.is_nan()` New lint `tuple_array_conversions` Add msrv check and make test pass Fix FP heavily refactor New lint `manual_try_fold` Add msrv tests Typo update docs address comments Fix typos Use `cargo build --tests` in CI let_and_return: lint 'static lifetimes, don't lint borrows in closures Add `SPEEDTEST` Fix dogfood Finally fix dogfood [`missing_fields_in_debug`]: make sure `self` is an adt new lint: `type_id_on_box` that was definitely not the right version add it to the methods lint pass add a few more test cases s/is_dyn_trait/is_dyn_any [`arc_with_non_send_sync`]: look for nested type parameters [`useless_vec`]: use the source span Don't lint manual_let_else in cases where the question mark operator would work Also, lint question_mark for `let...else` clauses that can be simplified to use `?`. This lint isn't perfect as it doesn't support the unstable try blocks. Fix the now stricter lint in manual_rem_euclid.rs Put into one pass Don't suppress manual_let_else if question_mark is allowed If question_mark is allowed, there is no overlap any more, so we can just not suppress it. Move pat_and_expr_can_be_question_mark into clippy_utils Fix FP [`needless_raw_string_hashes`] [`useless_vec`]: add more tests for macro combinations new lint: `read_line_without_trim` add test cases for u32, f32, bool, String Fix regex lints for regex 1.9.0 arc_with_non_send_sync: reword and move to suspicious Pass correct substs to `implements_trait` in `incorrect_impls` `Copy` does in fact not exist. The substs on the trait_ref contain the `Self` type of the impl as the first parameter, so passing that to `implements_trait`, which then nicely prepends the `Self` type for us does not end will. Fix changelog PR listings, create them automatically in `fetch_prs_between.sh` implement `manual_partial_ord_impl` first try at this rename to `manual_partial_ord_and_ord_impl` cargo dev fmt cargo test passes cargo test passes refactor a lil Update bool_comparison.stderr heavily refactor + bump `clippy::version` refactor refactor check bounds to increase accuracy, and add todos use `other` instead of `self` refactor `manual_float_methods` Make suggestion give multiple alternatives Refactor, remove `Constant::to_bits` [significant_drop_tightening] Fix #11128 Dogfood Add test for #10535 Fix #10535 Add needless_pass_by_ref lint Add UI test for `needless_pass_by_ref_mut` Update UI tests with new `needless_pass_by_ref_mut` lint Fix warnings of `needless_pass_by_ref_mut` in clippy Add warning for `NEEDLESS_PASS_BY_REF_MUT` lint about the fact that it changes API Add warning about semver compatibility if it's a public function "try this" -> "try" [`unnecessary_literal_unwrap`]: don't lint if binding initializer is expn [`manual_range_patterns`]: lint negative values [`manual_range_patterns`]: document what range we don't lint changelog: Fix typo in `needless_pass_by_ref_mut` lint description adjust applicability and suggest making binding mutable Use depinfo to discover UI test dependencies [`unnecessary_literal_unwrap`]: lint `unwrap_unchecked` [`unnecessary_literal_unwrap`]: also handle unwrap_err_unchecked Update version attribute for 1.71 lints Changelog for Rust 1.71 :crown: Changelog: Add disclaimer about the new format [`panic_in_result_fn`] remove `todo!`, `unimplemented!`, `unreachable!` This commit fixes #11025 by removing checks for `todo!`, `unimplemented!` and `unreachable!`. Signed-off-by: Panagiotis Foliadis Add "Known problems" section to `needless_borrow` documentation [`tuple_array_conversions`]: move from `complexity` to `nursery` Due to outstanding issues: * https://github.com/rust-lang/rust-clippy/issues/11082 * https://github.com/rust-lang/rust-clippy/issues/11085 * https://github.com/rust-lang/rust-clippy/issues/11100 (https://github.com/rust-lang/rust-clippy/pull/11105) * https://github.com/rust-lang/rust-clippy/issues/11124 * https://github.com/rust-lang/rust-clippy/issues/11144 [`arithmetic_side_effect`]: allow different rhs type Add `imports_granularity = "Module"` to rustfmt.toml Trigger a rebuild when CLIPPY_CONF_DIR changes Set `unnecessary_cast` suggestion to `MaybeIncorrect` for pointer casts Removing casts may cause type inference to stop working which requires manual intervention Bump Clippy version -> 0.1.73 Bump nightly version -> 2023-07-14 renamed lint --- CHANGELOG.md | 12 +- Cargo.toml | 8 + book/src/lint_configuration.md | 61 +++- clippy_dev/src/lib.rs | 5 + clippy_lints/Cargo.toml | 4 + clippy_lints/src/attrs.rs | 6 + clippy_lints/src/borrow_deref_ref.rs | 1 - .../src/default_constructed_unit_structs.rs | 51 +++ clippy_lints/src/derive.rs | 4 + clippy_lints/src/floating_point_arithmetic.rs | 8 + clippy_lints/src/future_not_send.rs | 8 + clippy_lints/src/items_after_test_module.rs | 13 + clippy_lints/src/let_underscore.rs | 17 + clippy_lints/src/lib.rs | 184 +++++++++++ .../src/loops/manual_while_let_some.rs | 6 + clippy_lints/src/loops/mod.rs | 92 ++++-- clippy_lints/src/manual_let_else.rs | 2 +- .../src/matches/redundant_pattern_match.rs | 33 ++ clippy_lints/src/methods/mod.rs | 171 ++++++++++ clippy_lints/src/needless_bool.rs | 19 ++ clippy_lints/src/non_copy_const.rs | 4 + .../src/operators/arithmetic_side_effects.rs | 17 + .../src/operators/numeric_arithmetic.rs | 17 + clippy_lints/src/renamed_lints.rs | 6 + clippy_lints/src/trait_bounds.rs | 9 + clippy_lints/src/unnecessary_box_returns.rs | 5 + clippy_lints/src/useless_conversion.rs | 5 + clippy_lints/src/utils/conf.rs | 6 + .../internal_lints/metadata_collector.rs | 5 + clippy_lints/src/utils/mod.rs | 31 +- clippy_lints/src/wildcard_imports.rs | 5 + clippy_utils/Cargo.toml | 4 + clippy_utils/src/lib.rs | 4 + clippy_utils/src/paths.rs | 5 + clippy_utils/src/qualify_min_const_fn.rs | 3 + clippy_utils/src/ty.rs | 8 + declare_clippy_lint/Cargo.toml | 4 + rust-toolchain | 6 + tests/compile-test.rs | 6 + tests/ui-internal/custom_ice_message.rs | 4 + .../auxiliary/proc_macro_derive.rs | 3 + .../conf_nonstandard_macro_braces.fixed | 4 + .../conf_nonstandard_macro_braces.rs | 4 + .../toml_unknown_key/conf_unknown_key.rs | 4 + tests/ui/allow_attributes.fixed | 6 + tests/ui/allow_attributes.rs | 6 + tests/ui/almost_complete_range.fixed | 4 + tests/ui/almost_complete_range.rs | 4 + tests/ui/arithmetic_side_effects.rs | 10 + tests/ui/as_conversions.rs | 4 + tests/ui/asm_syntax.rs | 5 + tests/ui/auxiliary/proc_macro_attr.rs | 3 + tests/ui/auxiliary/proc_macro_derive.rs | 15 + .../proc_macro_suspicious_else_formatting.rs | 3 + tests/ui/auxiliary/proc_macro_unsafe.rs | 3 + tests/ui/auxiliary/proc_macros.rs | 3 + tests/ui/borrow_deref_ref.fixed | 4 + tests/ui/borrow_deref_ref.rs | 4 + tests/ui/box_default.fixed | 4 + tests/ui/box_default.rs | 4 + tests/ui/box_default.stderr | 16 + .../ui/cmp_owned/asymmetric_partial_eq.fixed | 6 + tests/ui/cmp_owned/asymmetric_partial_eq.rs | 6 + tests/ui/collapsible_else_if.fixed | 4 + tests/ui/collapsible_else_if.rs | 4 + tests/ui/collapsible_if.fixed | 6 + tests/ui/collapsible_if.rs | 6 + .../ui/crashes/auxiliary/proc_macro_crash.rs | 3 + tests/ui/crashes/ice-10148.rs | 4 + tests/ui/crashes/ice-10645.rs | 4 + tests/ui/crashes/ice-10645.stderr | 8 + tests/ui/crashes/ice-3741.rs | 4 + tests/ui/crashes/ice-4968.rs | 3 + tests/ui/crashes/ice-7410.rs | 5 + .../entrypoint_recursion.rs | 4 + .../no_std_main_recursion.rs | 4 + tests/ui/dbg_macro.rs | 3 + tests/ui/def_id_nocore.rs | 4 + .../ui/default_constructed_unit_structs.fixed | 25 ++ tests/ui/default_constructed_unit_structs.rs | 25 ++ .../default_constructed_unit_structs.stderr | 33 ++ tests/ui/default_numeric_fallback_f64.fixed | 4 + tests/ui/default_numeric_fallback_f64.rs | 4 + tests/ui/default_numeric_fallback_i32.fixed | 4 + tests/ui/default_numeric_fallback_i32.rs | 4 + tests/ui/default_trait_access.fixed | 4 + tests/ui/default_trait_access.rs | 4 + tests/ui/deref_addrof.fixed | 4 + tests/ui/deref_addrof.rs | 4 + tests/ui/deref_addrof_macro.rs | 4 + tests/ui/doc_unsafe.rs | 4 + tests/ui/double_comparison.fixed | 4 + tests/ui/double_comparison.rs | 4 + tests/ui/empty_line_after_doc_comments.rs | 6 + tests/ui/empty_line_after_outer_attribute.rs | 6 + tests/ui/empty_loop.rs | 4 + tests/ui/empty_loop_no_std.rs | 4 + tests/ui/enum_clike_unportable_variant.rs | 4 + tests/ui/eq_op.rs | 3 + tests/ui/equatable_if_let.fixed | 4 + tests/ui/equatable_if_let.rs | 4 + tests/ui/extra_unused_lifetimes.rs | 4 + tests/ui/extra_unused_type_parameters.fixed | 6 + tests/ui/extra_unused_type_parameters.rs | 6 + tests/ui/field_reassign_with_default.rs | 5 + tests/ui/for_loop_fixable.fixed | 309 ------------------ tests/ui/for_loop_fixable.rs | 309 ------------------ tests/ui/implicit_hasher.rs | 4 + .../ui/inconsistent_struct_constructor.fixed | 4 + tests/ui/inconsistent_struct_constructor.rs | 4 + tests/ui/integer_arithmetic.stderr | 169 ---------- .../block_module.stderr | 4 + tests/ui/large_enum_variant.rs | 4 + tests/ui/let_underscore_untyped.rs | 10 + tests/ui/let_underscore_untyped.stderr | 30 +- tests/ui/macro_use_imports.fixed | 4 + tests/ui/macro_use_imports.rs | 4 + tests/ui/macro_use_imports.stderr | 6 + tests/ui/macro_use_imports_expect.rs | 4 + tests/ui/manual_rem_euclid.fixed | 4 + tests/ui/manual_rem_euclid.rs | 4 + tests/ui/manual_slice_size_calculation.fixed | 4 + tests/ui/manual_slice_size_calculation.rs | 4 + tests/ui/mem_replace_macro.rs | 4 + .../ui/missing_const_for_fn/cant_be_const.rs | 4 + tests/ui/missing_doc.rs | 4 + tests/ui/missing_doc_impl.rs | 4 + tests/ui/mistyped_literal_suffix.fixed | 4 + tests/ui/mistyped_literal_suffix.rs | 4 + tests/ui/multiple_unsafe_ops_per_block.rs | 4 + tests/ui/must_use_unit.fixed | 4 + tests/ui/must_use_unit.rs | 4 + tests/ui/mut_mut.rs | 4 + .../needless_arbitrary_self_type_unfixable.rs | 6 + tests/ui/needless_bool/fixable.stderr | 48 +++ tests/ui/needless_late_init.fixed | 4 + tests/ui/needless_late_init.rs | 4 + tests/ui/needless_lifetimes.fixed | 4 + tests/ui/needless_lifetimes.rs | 4 + tests/ui/non_octal_unix_permissions.fixed | 4 + tests/ui/non_octal_unix_permissions.rs | 4 + tests/ui/nonminimal_bool_methods.fixed | 4 + tests/ui/nonminimal_bool_methods.rs | 4 + tests/ui/option_env_unwrap.rs | 4 + tests/ui/patterns.fixed | 4 + tests/ui/patterns.rs | 4 + tests/ui/ptr_as_ptr.fixed | 4 + tests/ui/ptr_as_ptr.rs | 4 + tests/ui/ptr_offset_with_cast.fixed | 4 + tests/ui/ptr_offset_with_cast.rs | 4 + tests/ui/question_mark.fixed | 4 + tests/ui/question_mark.rs | 4 + .../redundant_pattern_matching_option.stderr | 72 +++- tests/ui/rename.fixed | 12 + tests/ui/rename.rs | 12 + tests/ui/rename.stderr | 276 ++++++++++++++++ tests/ui/search_is_some_fixable_none.fixed | 4 + tests/ui/search_is_some_fixable_none.rs | 4 + tests/ui/search_is_some_fixable_some.fixed | 4 + tests/ui/search_is_some_fixable_some.rs | 4 + tests/ui/shadow.rs | 4 + tests/ui/single_match_else.rs | 6 + tests/ui/starts_ends_with.fixed | 4 + tests/ui/starts_ends_with.rs | 4 + tests/ui/string_add.rs | 4 + tests/ui/suspicious_else_formatting.rs | 4 + tests/ui/tests_outside_test_module.rs | 3 + tests/ui/toplevel_ref_arg.fixed | 4 + tests/ui/toplevel_ref_arg.rs | 4 + tests/ui/toplevel_ref_arg_non_rustfix.rs | 4 + tests/ui/try_err.fixed | 4 + tests/ui/try_err.rs | 4 + tests/ui/undocumented_unsafe_blocks.rs | 4 + tests/ui/unicode.fixed | 3 + tests/ui/unicode.rs | 3 + tests/ui/uninlined_format_args.fixed | 4 + tests/ui/uninlined_format_args.rs | 4 + tests/ui/unit_arg.rs | 4 + tests/ui/unnecessary_cast.fixed | 4 + tests/ui/unnecessary_cast.rs | 4 + tests/ui/unnecessary_lazy_eval.fixed | 4 + tests/ui/unnecessary_lazy_eval.rs | 4 + tests/ui/unnecessary_unsafety_doc.rs | 4 + tests/ui/unneeded_wildcard_pattern.fixed | 4 + tests/ui/unneeded_wildcard_pattern.rs | 4 + tests/ui/unseparated_prefix_literals.fixed | 4 + tests/ui/unseparated_prefix_literals.rs | 4 + tests/ui/use_self.fixed | 4 + tests/ui/use_self.rs | 4 + tests/ui/used_underscore_binding.rs | 4 + tests/ui/useless_attribute.fixed | 4 + tests/ui/useless_attribute.rs | 4 + tests/ui/write_with_newline.stderr | 9 + 193 files changed, 1984 insertions(+), 820 deletions(-) delete mode 100644 tests/ui/for_loop_fixable.fixed delete mode 100644 tests/ui/for_loop_fixable.rs delete mode 100644 tests/ui/integer_arithmetic.stderr diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c3496eaa287..9fafcbbc4083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ document. ## Unreleased / Beta / In Rust Nightly <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) [435a8ad8...master](https://github.com/rust-lang/rust-clippy/compare/435a8ad8...master) ## Rust 1.71 @@ -238,6 +241,7 @@ Current stable, released 2023-06-01 [#10592](https://github.com/rust-lang/rust-clippy/pull/10592) * Fixed a deserialization error for the `array-size-threshold` config value [#10423](https://github.com/rust-lang/rust-clippy/pull/10423) +<<<<<<< HEAD ## Rust 1.69 @@ -246,13 +250,19 @@ Released 2023-04-20 [View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-01-13T06%3A12%3A46Z..2023-02-25T23%3A48%3A10Z+base%3Amaster) ======= [149392b0...master](https://github.com/rust-lang/rust-clippy/compare/149392b0...master) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ## Rust 1.69 -Current stable, released 2023-04-20 +Released 2023-04-20 +<<<<<<< HEAD [7f27e2e7...149392b0](https://github.com/rust-lang/rust-clippy/compare/7f27e2e7...149392b0) >>>>>>> e4f5d83fa (Fixed formatting.) +======= +[View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-01-13T06%3A12%3A46Z..2023-02-25T23%3A48%3A10Z+base%3Amaster) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ### New Lints diff --git a/Cargo.toml b/Cargo.toml index b31e7d7f16ca..fc8ddfdb1d70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "clippy" <<<<<<< HEAD +<<<<<<< HEAD version = "0.1.73" ======= version = "0.1.71" >>>>>>> e4f5d83fa (Fixed formatting.) +======= +version = "0.1.73" +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) description = "A bunch of helpful lints to avoid common pitfalls in Rust" repository = "https://github.com/rust-lang/rust-clippy" readme = "README.md" @@ -32,10 +36,14 @@ termize = "0.1" [dev-dependencies] <<<<<<< HEAD +<<<<<<< HEAD ui_test = "0.11.5" ======= compiletest_rs = { version = "0.10", features = ["tmp"] } >>>>>>> e4f5d83fa (Fixed formatting.) +======= +ui_test = "0.11.5" +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) tester = "0.9" regex = "1.5" toml = "0.7.3" diff --git a/book/src/lint_configuration.md b/book/src/lint_configuration.md index e50dfadd05e0..11f8651a2763 100644 --- a/book/src/lint_configuration.md +++ b/book/src/lint_configuration.md @@ -3,6 +3,7 @@ This file is generated by `cargo collect-metadata`. Please use that command to update the file and do not edit it by hand. --> +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD ## Lint Configuration Options @@ -134,6 +135,9 @@ Please use that command to update the file and do not edit it by hand. | [unnecessary-box-size](#unnecessary-box-size) | `128` | >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +# Lint Configuration Options +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) The following list shows each configuration option, along with a description, its default value, an example and lints affected. @@ -360,15 +364,20 @@ default configuration of Clippy. By default, any configuration will replace the * [`disallowed_names`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names) +<<<<<<< HEAD <<<<<<< HEAD ## `semicolon-inside-block-ignore-singleline` ======= ### semicolon-inside-block-ignore-singleline >>>>>>> e4f5d83fa (Fixed formatting.) +======= +## `semicolon-inside-block-ignore-singleline` +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) Whether to lint only if it's multiline. **Default Value:** `false` (`bool`) +<<<<<<< HEAD <<<<<<< HEAD --- **Affected lints:** @@ -382,10 +391,19 @@ Whether to lint only if it's multiline. ### semicolon-outside-block-ignore-multiline >>>>>>> e4f5d83fa (Fixed formatting.) +======= +--- +**Affected lints:** +* [`semicolon_inside_block`](https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_inside_block) + + +## `semicolon-outside-block-ignore-multiline` +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) Whether to lint only if it's singleline. **Default Value:** `false` (`bool`) +<<<<<<< HEAD <<<<<<< HEAD --- **Affected lints:** @@ -399,6 +417,14 @@ Whether to lint only if it's singleline. ### doc-valid-idents >>>>>>> e4f5d83fa (Fixed formatting.) +======= +--- +**Affected lints:** +* [`semicolon_outside_block`](https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_outside_block) + + +## `doc-valid-idents` +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) The list of words this lint should not consider as identifiers needing ticks. The value `".."` can be used as part of the list to indicate, that the configured values should be appended to the default configuration of Clippy. By default, any configuration will replace the default value. For example: @@ -884,6 +910,7 @@ The maximum byte size a `Future` can have, before it triggers the `clippy::large <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> a1b75c510 (Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup) ======= @@ -892,22 +919,47 @@ The maximum byte size a `Future` can have, before it triggers the `clippy::large ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ## `unnecessary-box-size` <<<<<<< HEAD <<<<<<< HEAD ======= >>>>>>> 203e87518 (`cargo collect-metadata`) +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) The byte size a `T` in `Box` can have, below which it triggers the `clippy::unnecessary_box` lint ======= ### unnecessary-box-size +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) The byte size a `T` in `Box` can have, below which it triggers the `clippy::unnecessary_box` lint **Default Value:** `128` (`u64`) -* [unnecessary_box_returns](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_returns) +--- +**Affected lints:** +* [`unnecessary_box_returns`](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_returns) +<<<<<<< HEAD +<<<<<<< HEAD + +======= +>>>>>>> b7a605471 (Refresh Lint Configuration's looks) +======= + +>>>>>>> 203e87518 (`cargo collect-metadata`) + +## `allow-private-module-inception` +Whether to allow module inception if it's not public. + +**Default Value:** `false` (`bool`) + +--- +**Affected lints:** +* [`module_inception`](https://rust-lang.github.io/rust-clippy/master/index.html#module_inception) +<<<<<<< HEAD >>>>>>> e4f5d83fa (Fixed formatting.) **Default Value:** `128` (`u64`) @@ -950,6 +1002,13 @@ the list to indicate, that the configured values should be appended to the defau configuration of Clippy. By default, any configuration will replace the default value. >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) +======= +## `allowed-idents-below-min-chars` +Allowed names below the minimum allowed characters. The value `".."` can be used as part of +the list to indicate, that the configured values should be appended to the default +configuration of Clippy. By default, any configuration will replace the default value. + +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) **Default Value:** `{"j", "z", "i", "y", "n", "x", "w"}` (`rustc_data_structures::fx::FxHashSet`) --- diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index caebd501f7fe..8467676ea78a 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -64,11 +64,16 @@ pub fn clippy_project_root() -> PathBuf { panic!("error: Can't determine root of project. Please run inside a Clippy working dir."); } +<<<<<<< HEAD <<<<<<< HEAD /// # Panics /// Panics if given command result was failed. ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +/// # Panics +/// Panics if given command result was failed. +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub fn exit_if_err(status: io::Result) { match status.expect("failed to run command").code() { Some(0) => {}, diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index f13fa94a0d66..4eddd48bd238 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "clippy_lints" <<<<<<< HEAD +<<<<<<< HEAD version = "0.1.73" ======= version = "0.1.71" >>>>>>> e4f5d83fa (Fixed formatting.) +======= +version = "0.1.73" +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) description = "A bunch of helpful lints to avoid common pitfalls in Rust" repository = "https://github.com/rust-lang/rust-clippy" readme = "README.md" diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index a7a1f401aba0..4b0b9e35ecf9 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -730,6 +730,9 @@ impl_lint_pass!(EarlyAttributes => [ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= NON_MINIMAL_CFG, <<<<<<< HEAD @@ -744,8 +747,11 @@ impl_lint_pass!(EarlyAttributes => [ ======= MAYBE_MISUSED_CFG, >>>>>>> ad76687b2 (add checking for cfg(features = ...)) +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ]); impl EarlyLintPass for EarlyAttributes { diff --git a/clippy_lints/src/borrow_deref_ref.rs b/clippy_lints/src/borrow_deref_ref.rs index 514133da4460..b3dbbb08f8eb 100644 --- a/clippy_lints/src/borrow_deref_ref.rs +++ b/clippy_lints/src/borrow_deref_ref.rs @@ -1,6 +1,5 @@ use crate::reference::DEREF_ADDROF; use clippy_utils::diagnostics::span_lint_and_then; -use clippy_utils::is_from_proc_macro; use clippy_utils::source::snippet_opt; use clippy_utils::ty::implements_trait; use clippy_utils::{get_parent_expr, is_from_proc_macro, is_lint_allowed}; diff --git a/clippy_lints/src/default_constructed_unit_structs.rs b/clippy_lints/src/default_constructed_unit_structs.rs index 8339503a0efb..bd85f3ca1fa3 100644 --- a/clippy_lints/src/default_constructed_unit_structs.rs +++ b/clippy_lints/src/default_constructed_unit_structs.rs @@ -1,6 +1,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::{diagnostics::span_lint_and_sugg, match_def_path, paths}; ======= use clippy_utils::{diagnostics::span_lint_and_sugg, is_from_proc_macro, match_def_path, paths}; @@ -35,9 +36,34 @@ use hir::def::Res; use hir::ExprKind; >>>>>>> 2811effe3 (Add `imports_granularity = "Module"` to rustfmt.toml) ======= +======= +<<<<<<< HEAD +<<<<<<< HEAD +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use clippy_utils::{diagnostics::span_lint_and_sugg, match_def_path, paths}; +======= +use clippy_utils::{diagnostics::span_lint_and_sugg, is_from_proc_macro, match_def_path, paths}; +>>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) +======= +use clippy_utils::{diagnostics::span_lint_and_sugg, match_def_path, paths}; +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) +======= +use clippy_utils::{diagnostics::span_lint_and_sugg, is_ty_alias, match_def_path, paths}; +>>>>>>> e6dc0efc0 (Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup) +======= +use clippy_utils::{diagnostics::span_lint_and_sugg, is_ty_alias, match_def_path, paths}; +>>>>>>> 8c82486ea ([`default_constructed_unit_structs`]: do not lint type aliases) use hir::{def::Res, ExprKind}; +<<<<<<< HEAD >>>>>>> e4f5d83fa (Fixed formatting.) +======= +======= +use clippy_utils::diagnostics::span_lint_and_sugg; +use clippy_utils::{is_ty_alias, match_def_path, paths}; +use hir::def::Res; +use hir::ExprKind; +>>>>>>> 2811effe3 (Add `imports_granularity = "Module"` to rustfmt.toml) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_errors::Applicability; use rustc_hir as hir; use rustc_lint::{LateContext, LateLintPass}; @@ -46,11 +72,15 @@ use rustc_session::{declare_lint_pass, declare_tool_lint}; declare_clippy_lint! { /// ### What it does +<<<<<<< HEAD <<<<<<< HEAD /// Checks for construction on unit struct using `default`. ======= /// Check for construction on unit struct using `default`. >>>>>>> e4f5d83fa (Fixed formatting.) +======= + /// Checks for construction on unit struct using `default`. +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) /// /// ### Why is this bad? /// This adds code complexity and an unnecessary function call. @@ -110,6 +140,9 @@ declare_clippy_lint! { declare_lint_pass!(DefaultConstructedUnitStructs => [DEFAULT_CONSTRUCTED_UNIT_STRUCTS]); <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn is_alias(ty: hir::Ty<'_>) -> bool { if let hir::TyKind::Path(ref qpath) = ty.kind { is_ty_alias(qpath) @@ -118,8 +151,11 @@ fn is_alias(ty: hir::Ty<'_>) -> bool { } } +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) impl LateLintPass<'_> for DefaultConstructedUnitStructs { fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { if_chain!( @@ -128,6 +164,7 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD if let ExprKind::Path(ref qpath@ hir::QPath::TypeRelative(_,_)) = fn_expr.kind; ======= @@ -139,17 +176,22 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if let ExprKind::Path(ref qpath @ hir::QPath::TypeRelative(base, _)) = fn_expr.kind; // make sure this isn't a type alias: // `::Assoc` cannot be used as a constructor if !is_alias(*base); <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= if let ExprKind::Path(ref qpath@ hir::QPath::TypeRelative(_,_)) = fn_expr.kind; >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id); if match_def_path(cx, def_id, &paths::DEFAULT_TRAIT_METHOD); // make sure we have a struct with no fields (unit struct) @@ -160,6 +202,7 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { if let var @ ty::VariantDef { ctor: Some((hir::def::CtorKind::Const, _)), .. } = def.non_enum_variant(); <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD if !var.is_field_list_non_exhaustive(); if !expr.span.from_expansion() && !qpath.span().from_expansion(); @@ -180,6 +223,11 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { if !expr.span.from_expansion() && !qpath.span().from_expansion(); >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +======= + if !var.is_field_list_non_exhaustive(); + if !expr.span.from_expansion() && !qpath.span().from_expansion(); +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if !var.is_field_list_non_exhaustive() && !is_from_proc_macro(cx, expr); >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= @@ -187,6 +235,7 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { if !expr.span.from_expansion() && !qpath.span().from_expansion(); >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= @@ -194,6 +243,8 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs { if !expr.span.from_expansion() && !qpath.span().from_expansion(); >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) then { span_lint_and_sugg( cx, diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs index ff0537fefda2..60e1fd05345b 100644 --- a/clippy_lints/src/derive.rs +++ b/clippy_lints/src/derive.rs @@ -515,11 +515,15 @@ fn param_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) -> ParamEnv::new( tcx.mk_clauses_from_iter(ty_predicates.iter().map(|&(p, _)| p).chain( params.iter().filter(|&&(_, needs_eq)| needs_eq).map(|&(param, _)| { +<<<<<<< HEAD <<<<<<< HEAD ClauseKind::Trait(TraitPredicate { ======= tcx.mk_predicate(Binder::dummy(PredicateKind::Clause(Clause::Trait(TraitPredicate { >>>>>>> e4f5d83fa (Fixed formatting.) +======= + ClauseKind::Trait(TraitPredicate { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) trait_ref: ty::TraitRef::new(tcx, eq_trait_id, [tcx.mk_param_from_def(param)]), constness: BoundConstness::NotConst, polarity: ImplPolarity::Positive, diff --git a/clippy_lints/src/floating_point_arithmetic.rs b/clippy_lints/src/floating_point_arithmetic.rs index 85ea8eff51e9..2b1c9a8fec82 100644 --- a/clippy_lints/src/floating_point_arithmetic.rs +++ b/clippy_lints/src/floating_point_arithmetic.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::consts::Constant::{Int, F32, F64}; use clippy_utils::consts::{constant, constant_simple, Constant}; use clippy_utils::diagnostics::span_lint_and_sugg; @@ -13,6 +14,13 @@ use clippy_utils::{ diagnostics::span_lint_and_sugg, eq_expr_value, get_parent_expr, higher, in_constant, is_no_std_crate, numeric_literal, peel_blocks, sugg, >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::consts::Constant::{Int, F32, F64}; +use clippy_utils::consts::{constant, constant_simple, Constant}; +use clippy_utils::diagnostics::span_lint_and_sugg; +use clippy_utils::{ + eq_expr_value, get_parent_expr, higher, in_constant, is_no_std_crate, numeric_literal, peel_blocks, sugg, +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) }; use if_chain::if_chain; use rustc_errors::Applicability; diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index 5f051e62a389..f46dfd93fdf2 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -5,10 +5,14 @@ use rustc_hir::{Body, FnDecl}; use rustc_infer::infer::TyCtxtInferExt; use rustc_lint::{LateContext, LateLintPass}; <<<<<<< HEAD +<<<<<<< HEAD use rustc_middle::ty::{self, AliasTy, ClauseKind, PredicateKind}; ======= use rustc_middle::ty::{self, AliasTy, Clause, PredicateKind}; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use rustc_middle::ty::{self, AliasTy, ClauseKind, PredicateKind}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::def_id::LocalDefId; use rustc_span::{sym, Span}; @@ -71,11 +75,15 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { let preds = cx.tcx.explicit_item_bounds(def_id); let mut is_future = false; for (p, _span) in preds.subst_iter_copied(cx.tcx, substs) { +<<<<<<< HEAD <<<<<<< HEAD if let Some(trait_pred) = p.as_trait_clause() { ======= if let Some(trait_pred) = p.to_opt_poly_trait_pred() { >>>>>>> e4f5d83fa (Fixed formatting.) +======= + if let Some(trait_pred) = p.as_trait_clause() { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() { is_future = true; break; diff --git a/clippy_lints/src/items_after_test_module.rs b/clippy_lints/src/items_after_test_module.rs index 994925bfd269..6e4bd86172f8 100644 --- a/clippy_lints/src/items_after_test_module.rs +++ b/clippy_lints/src/items_after_test_module.rs @@ -1,9 +1,14 @@ <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::{is_from_proc_macro, is_in_cfg_test}; ======= use clippy_utils::{diagnostics::span_lint_and_help, is_in_cfg_test}; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::diagnostics::span_lint_and_help; +use clippy_utils::{is_from_proc_macro, is_in_cfg_test}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_hir::{HirId, ItemId, ItemKind, Mod}; use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_middle::lint::in_external_macro; @@ -70,11 +75,15 @@ declare_clippy_lint! { /// // [...] /// } /// ``` +<<<<<<< HEAD <<<<<<< HEAD #[clippy::version = "1.71.0"] ======= #[clippy::version = "1.70.0"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= + #[clippy::version = "1.71.0"] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub ITEMS_AFTER_TEST_MODULE, style, "An item was found after the testing module `tests`" @@ -181,6 +190,7 @@ impl LateLintPass<'_> for ItemsAfterTestModule { if !matches!(item.kind, ItemKind::Mod(_)); if !is_in_cfg_test(cx.tcx, itid.hir_id()); // The item isn't in the testing module itself if !in_external_macro(cx.sess(), item.span); +<<<<<<< HEAD <<<<<<< HEAD if !is_from_proc_macro(cx, item); @@ -196,6 +206,9 @@ impl LateLintPass<'_> for ItemsAfterTestModule { if !matches!(item.kind, ItemKind::Mod(_)); if !is_in_cfg_test(cx.tcx, itid.hir_id()); // The item isn't in the testing module itself if !in_external_macro(cx.sess(), item.span); +======= + if !is_from_proc_macro(cx, item); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) then { <<<<<<< HEAD diff --git a/clippy_lints/src/let_underscore.rs b/clippy_lints/src/let_underscore.rs index 93df9e6b8a52..3a25bc67bb66 100644 --- a/clippy_lints/src/let_underscore.rs +++ b/clippy_lints/src/let_underscore.rs @@ -1,12 +1,17 @@ use clippy_utils::diagnostics::span_lint_and_help; use clippy_utils::ty::{implements_trait, is_must_use_ty, match_type}; <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::{is_from_proc_macro, is_must_use_func_call, paths}; use rustc_hir::{Local, PatKind}; ======= use clippy_utils::{is_must_use_func_call, paths}; use rustc_hir::{ExprKind, Local, PatKind}; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::{is_from_proc_macro, is_must_use_func_call, paths}; +use rustc_hir::{Local, PatKind}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::lint::in_external_macro; use rustc_middle::ty::subst::GenericArgKind; @@ -201,6 +206,9 @@ impl<'tcx> LateLintPass<'tcx> for LetUnderscore { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= >>>>>>> cfa5aa2aa (Don't suggest unnameable types in box_default, let_underscore_untyped) // Ignore unnameable types @@ -211,8 +219,11 @@ impl<'tcx> LateLintPass<'tcx> for LetUnderscore { } <<<<<<< HEAD ======= +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // Ignore function calls that return impl traits... if let Some(init) = local.init && matches!(init.kind, ExprKind::Call(_, _) | ExprKind::MethodCall(_, _, _, _)) { @@ -222,6 +233,9 @@ impl<'tcx> LateLintPass<'tcx> for LetUnderscore { } } <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >>>>>>> 2d9d81fc1 (Checking for proc_macro not only when local.init is Some) ======= >>>>>>> cfa5aa2aa (Don't suggest unnameable types in box_default, let_underscore_untyped) @@ -247,9 +261,12 @@ impl<'tcx> LateLintPass<'tcx> for LetUnderscore { ======= >>>>>>> 2d9d81fc1 (Checking for proc_macro not only when local.init is Some) } +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) span_lint_and_help( cx, diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 61d465e2b59e..ea708a857bb4 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -398,6 +398,7 @@ mod zero_div_zero; mod zero_sized_map_values; // end lints modules, do not remove this comment, it’s used in `update_lints` +<<<<<<< HEAD <<<<<<< HEAD use crate::utils::conf::metadata::get_configuration_metadata; use crate::utils::conf::TryConf; @@ -410,6 +411,12 @@ use crate::utils::{ FindAll, }; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use crate::utils::conf::metadata::get_configuration_metadata; +use crate::utils::conf::TryConf; +pub use crate::utils::conf::{lookup_conf_file, Conf}; +use crate::utils::FindAll; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) /// Register all pre expansion lints /// @@ -569,6 +576,7 @@ pub(crate) struct LintInfo { pub fn explain(name: &str) -> i32 { let target = format!("clippy::{}", name.to_ascii_uppercase()); <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD match declared_lints::LINTS.iter().find(|info| info.lint.name == target) { Some(info) => { @@ -602,6 +610,8 @@ pub fn explain(name: &str) -> i32 { ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if let Some(info) = declared_lints::LINTS.iter().find(|info| info.lint.name == target) { println!("{}", info.explanation); // Check if the lint has configuration @@ -615,6 +625,7 @@ pub fn explain(name: &str) -> i32 { for position in config_vec_positions { let conf = &mdconf[position]; println!(" - {}: {} (default: {})", conf.name, conf.doc, conf.default); +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } } @@ -653,6 +664,25 @@ pub fn explain(name: &str) -> i32 { }, None => println!("unknown lint: {name}"), >>>>>>> e4f5d83fa (Fixed formatting.) +======= + } + } +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 894d5dafa (Make `--explain` subcommand return 1 for missing lints) + 0 + } else { + println!("unknown lint: {name}"); + 1 +<<<<<<< HEAD +======= + } else { + println!("unknown lint: {name}"); +>>>>>>> a94aac607 (Refactor to make following commit pass single_match_else lint) +======= +>>>>>>> 894d5dafa (Make `--explain` subcommand return 1 for missing lints) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } } @@ -1166,9 +1196,12 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: )) }); <<<<<<< HEAD +<<<<<<< HEAD ======= store.register_late_pass(|_| Box::new(fn_null_check::FnNullCheck)); >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) store.register_late_pass(|_| Box::new(permissions_set_readonly_false::PermissionsSetReadonlyFalse)); store.register_late_pass(|_| Box::new(size_of_ref::SizeOfRef)); store.register_late_pass(|_| Box::new(multiple_unsafe_ops_per_block::MultipleUnsafeOpsPerBlock)); @@ -1218,6 +1251,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD store.register_late_pass(|_| Box::new(items_after_test_module::ItemsAfterTestModule)); <<<<<<< HEAD @@ -1229,6 +1263,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: ======= >>>>>>> 4da6e7e06 (rebase attempt) ======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) +======= >>>>>>> e68dbc330 (add `excessive_nesting`) let excessive_nesting_threshold = conf.excessive_nesting_threshold; store.register_early_pass(move || { @@ -1254,6 +1290,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: >>>>>>> 378d77584 (work with lint attributes) }) }); +<<<<<<< HEAD store.register_late_pass(|_| Box::new(items_after_test_module::ItemsAfterTestModule)); <<<<<<< HEAD <<<<<<< HEAD @@ -1420,11 +1457,158 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) store.register_late_pass(|_| Box::new(items_after_test_module::ItemsAfterTestModule)); +<<<<<<< HEAD +<<<<<<< HEAD store.register_early_pass(|| Box::new(ref_patterns::RefPatterns)); +======= +>>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) +======= + store.register_early_pass(|| Box::new(ref_patterns::RefPatterns)); +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) store.register_late_pass(|_| Box::new(default_constructed_unit_structs::DefaultConstructedUnitStructs)); +<<<<<<< HEAD >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + store.register_early_pass(|| Box::new(needless_else::NeedlessElse)); +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(|_| Box::new(missing_fields_in_debug::MissingFieldsInDebug)); + store.register_late_pass(|_| Box::new(endian_bytes::EndianBytes)); +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(|_| Box::new(redundant_type_annotations::RedundantTypeAnnotations)); + store.register_late_pass(|_| Box::new(arc_with_non_send_sync::ArcWithNonSendSync)); +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(|_| Box::new(needless_if::NeedlessIf)); +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 7cdd87ca4 (ignore generics and allow arbitrary threshold) + let allowed_idents_below_min_chars = conf.allowed_idents_below_min_chars.clone(); + let min_ident_chars_threshold = conf.min_ident_chars_threshold; + store.register_late_pass(move |_| { + Box::new(min_ident_chars::MinIdentChars { + allowed_idents_below_min_chars: allowed_idents_below_min_chars.clone(), + min_ident_chars_threshold, +<<<<<<< HEAD + }) + }); + let stack_size_threshold = conf.stack_size_threshold; + store.register_late_pass(move |_| Box::new(large_stack_frames::LargeStackFrames::new(stack_size_threshold))); +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(|_| Box::new(single_range_in_vec_init::SingleRangeInVecInit)); +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD +======= + store.register_late_pass(|_| Box::new(needless_pass_by_ref_mut::NeedlessPassByRefMut)); +>>>>>>> b41fc6784 (Add needless_pass_by_ref lint) +======= + store.register_late_pass(move |_| { + Box::new(needless_pass_by_ref_mut::NeedlessPassByRefMut::new( + avoid_breaking_exported_api, + )) + }); +>>>>>>> f048f7325 (Add warning about semver compatibility if it's a public function) + store.register_late_pass(|_| Box::new(incorrect_impls::IncorrectImpls)); + store.register_late_pass(move |_| { + Box::new(single_call_fn::SingleCallFn { + avoid_breaking_exported_api, + def_id_to_usage: rustc_data_structures::fx::FxHashMap::default(), + }) + }); +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 8cb6c8699 (change category and refactor) + let needless_raw_string_hashes_allow_one = conf.allow_one_hash_in_raw_strings; + store.register_early_pass(move || { + Box::new(raw_strings::RawStrings { + needless_raw_string_hashes_allow_one, + }) + }); +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(|_| Box::new(manual_range_patterns::ManualRangePatterns)); + store.register_early_pass(|| Box::new(visibility::Visibility)); +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD + store.register_late_pass(move |_| Box::new(tuple_array_conversions::TupleArrayConversions { msrv: msrv() })); +<<<<<<< HEAD +======= +>>>>>>> e6646eb5f (needless_else: new lint to check for empty else clauses) +======= + store.register_late_pass(|_| Box::new(missing_fields_in_debug::MissingFieldsInDebug)); +>>>>>>> f74ec6b1b (new lint: `missing_field_in_debug`) +======= + store.register_late_pass(|_| Box::new(explicit_into_iter_fn_arg::ExplicitIntoIterFnArg)); +>>>>>>> 516f4f6ae (new lint: `explicit_into_iter_fn_arg`) +======= +>>>>>>> de1f41001 (merge `explicit_into_iter_fn_arg` into `useless_conversion`) +======= +>>>>>>> 3ab6aeefb (`to_xx_bytes` implemented, `from_xx_bytes` todo) +======= + store.register_late_pass(|_| Box::new(redundant_type_annotations::RedundantTypeAnnotations)); +>>>>>>> 01b105725 (Add redundant type annotations lint) +======= +>>>>>>> 339cd14f2 (Adds new lint `arc_with_non_send_or_sync`) +======= + store.register_late_pass(|_| Box::new(needless_if::NeedlessIf)); +>>>>>>> 26f50395b (Add `needless_if` lint) +======= + let allowed_idents = conf.allowed_idents.clone(); + store.register_early_pass(move || { + Box::new(single_char_idents::SingleCharIdents { + allowed_idents: allowed_idents.clone(), +======= +>>>>>>> 7cdd87ca4 (ignore generics and allow arbitrary threshold) + }) + }); +>>>>>>> 52cfc997a (Add lint `single_letter_idents`) +======= +>>>>>>> 7312a93a0 (new lint: `large_stack_frames`) +======= + store.register_late_pass(|_| Box::new(single_range_in_vec_init::SingleRangeInVecInit)); +>>>>>>> 6702c7a7a (Add lint [`single_range_in_vec_init`]) +======= + store.register_late_pass(|_| Box::new(needless_impls::NeedlessImpls)); +>>>>>>> 67d5e6ec3 (add lint [`needless_clone_impl`]) +======= + store.register_late_pass(|_| Box::new(incorrect_impls::IncorrectImpls)); +>>>>>>> 10cc1684c (rename lint and disallow `clone_from`) +======= +>>>>>>> 07dbcbda1 (new lint `single_call_fn`) +======= +>>>>>>> 8cb6c8699 (change category and refactor) +======= + store.register_late_pass(|_| Box::new(manual_range_pattern::ManualRangePattern)); +>>>>>>> 1d4afc5d8 (new lint: `manual_range_pattern`) +======= + store.register_late_pass(|_| Box::new(manual_range_patterns::ManualRangePatterns)); +>>>>>>> b592d3996 (manual_range_pattern -> manual_range_patterns) +======= +>>>>>>> 8296a338d (new lints for visibility) +======= + store.register_late_pass(|_| Box::new(tuple_array_conversions::TupleArrayConversions)); +>>>>>>> bfcc8ba44 (New lint `tuple_array_conversions`) +======= + store.register_late_pass(move |_| Box::new(tuple_array_conversions::TupleArrayConversions { msrv: msrv() })); +>>>>>>> b1acbde61 (Add msrv check and make test pass) +======= + store.register_late_pass(|_| Box::new(manual_float_methods::ManualFloatMethods)); +>>>>>>> f12edfdb5 (`manual_float_methods`) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // add lints here, do not remove this comment, it's used in `new_lint` } diff --git a/clippy_lints/src/loops/manual_while_let_some.rs b/clippy_lints/src/loops/manual_while_let_some.rs index 2b6cbf031bd1..9244876e3359 100644 --- a/clippy_lints/src/loops/manual_while_let_some.rs +++ b/clippy_lints/src/loops/manual_while_let_some.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::diagnostics::{multispan_sugg_with_applicability, span_lint_and_then}; use clippy_utils::source::snippet; use clippy_utils::{match_def_path, paths, SpanlessEq}; @@ -10,6 +11,11 @@ use clippy_utils::{ SpanlessEq, }; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::diagnostics::{multispan_sugg_with_applicability, span_lint_and_then}; +use clippy_utils::source::snippet; +use clippy_utils::{match_def_path, paths, SpanlessEq}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_errors::Applicability; use rustc_hir::{Expr, ExprKind, Pat, Stmt, StmtKind, UnOp}; use rustc_lint::LateContext; diff --git a/clippy_lints/src/loops/mod.rs b/clippy_lints/src/loops/mod.rs index 5f2f7ff0f4db..5b56b9269e89 100644 --- a/clippy_lints/src/loops/mod.rs +++ b/clippy_lints/src/loops/mod.rs @@ -610,6 +610,7 @@ declare_clippy_lint! { /// } /// ``` <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD #[clippy::version = "1.70.0"] <<<<<<< HEAD @@ -623,6 +624,9 @@ declare_clippy_lint! { #[clippy::version = "1.70.0"] >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + #[clippy::version = "1.71.0"] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub MANUAL_WHILE_LET_SOME, ======= pub WHILE_POP_UNWRAP, @@ -635,6 +639,9 @@ declare_clippy_lint! { } <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub struct Loops { msrv: Msrv, } @@ -644,9 +651,12 @@ impl Loops { } } impl_lint_pass!(Loops => [ +<<<<<<< HEAD ======= declare_lint_pass!(Loops => [ >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) MANUAL_MEMCPY, MANUAL_FLATTEN, NEEDLESS_RANGE_LOOP, @@ -738,6 +748,7 @@ impl<'tcx> LateLintPass<'tcx> for Loops { >>>>>>> 8d8178f93 (rename lint to `manual_while_let_some`) } } +<<<<<<< HEAD <<<<<<< HEAD extract_msrv_attr!(LateContext); @@ -800,30 +811,37 @@ impl Loops { _ => {}, } ======= +======= + + extract_msrv_attr!(LateContext); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } -fn check_for_loop<'tcx>( - cx: &LateContext<'tcx>, - pat: &'tcx Pat<'_>, - arg: &'tcx Expr<'_>, - body: &'tcx Expr<'_>, - expr: &'tcx Expr<'_>, - span: Span, -) { - let is_manual_memcpy_triggered = manual_memcpy::check(cx, pat, arg, body, expr); - if !is_manual_memcpy_triggered { - needless_range_loop::check(cx, pat, arg, body, expr); - explicit_counter_loop::check(cx, pat, arg, body, expr); +impl Loops { + fn check_for_loop<'tcx>( + &self, + cx: &LateContext<'tcx>, + pat: &'tcx Pat<'_>, + arg: &'tcx Expr<'_>, + body: &'tcx Expr<'_>, + expr: &'tcx Expr<'_>, + span: Span, + ) { + let is_manual_memcpy_triggered = manual_memcpy::check(cx, pat, arg, body, expr); + if !is_manual_memcpy_triggered { + needless_range_loop::check(cx, pat, arg, body, expr); + explicit_counter_loop::check(cx, pat, arg, body, expr); + } + self.check_for_loop_arg(cx, pat, arg); + for_kv_map::check(cx, pat, arg, body); + mut_range_bound::check(cx, arg, body); + single_element_loop::check(cx, pat, arg, body, expr); + same_item_push::check(cx, pat, arg, body, expr); + manual_flatten::check(cx, pat, arg, body, span); + manual_find::check(cx, pat, arg, body, span, expr); } - check_for_loop_arg(cx, pat, arg); - for_kv_map::check(cx, pat, arg, body); - mut_range_bound::check(cx, arg, body); - single_element_loop::check(cx, pat, arg, body, expr); - same_item_push::check(cx, pat, arg, body, expr); - manual_flatten::check(cx, pat, arg, body, span); - manual_find::check(cx, pat, arg, body, span, expr); -} +<<<<<<< HEAD fn check_for_loop_arg(cx: &LateContext<'_>, _: &Pat<'_>, arg: &Expr<'_>) { if let ExprKind::MethodCall(method, self_arg, [], _) = arg.kind { let method_name = method.ident.as_str(); @@ -841,6 +859,40 @@ fn check_for_loop_arg(cx: &LateContext<'_>, _: &Pat<'_>, arg: &Expr<'_>) { }, _ => {}, >>>>>>> e4f5d83fa (Fixed formatting.) +======= + fn check_for_loop_arg(&self, cx: &LateContext<'_>, _: &Pat<'_>, arg: &Expr<'_>) { + if let ExprKind::MethodCall(method, self_arg, [], _) = arg.kind { +<<<<<<< HEAD +<<<<<<< HEAD + match method.ident.as_str() { + "iter" | "iter_mut" => { + explicit_iter_loop::check(cx, self_arg, arg, &self.msrv); + }, + "into_iter" => { +======= + let method_name = method.ident.as_str(); + // check for looping over x.iter() or x.iter_mut(), could use &x or &mut x + match method_name { +======= + match method.ident.as_str() { +>>>>>>> 482baf2bc (Fix `explicit_into_iter_loop` with mutable references) + "iter" | "iter_mut" => { + explicit_iter_loop::check(cx, self_arg, arg, &self.msrv); + }, + "into_iter" => { +<<<<<<< HEAD + explicit_iter_loop::check(cx, self_arg, arg, method_name, &self.msrv); +>>>>>>> b6fa4d43d (Extend `explicit_iter_loop` to all types) +======= +>>>>>>> 482baf2bc (Fix `explicit_into_iter_loop` with mutable references) + explicit_into_iter_loop::check(cx, self_arg, arg); + }, + "next" => { + iter_next_loop::check(cx, arg); + }, + _ => {}, + } +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } } } diff --git a/clippy_lints/src/manual_let_else.rs b/clippy_lints/src/manual_let_else.rs index 64d431e152cd..4c2fc44fba41 100644 --- a/clippy_lints/src/manual_let_else.rs +++ b/clippy_lints/src/manual_let_else.rs @@ -194,7 +194,7 @@ impl<'tcx> QuestionMark { if source != MatchSource::Normal { return; } - // Any other number than two arms doesn't (necessarily) + // Any other number than two arms doesn't (neccessarily) // have a trivial mapping to let else. if arms.len() != 2 { return; diff --git a/clippy_lints/src/matches/redundant_pattern_match.rs b/clippy_lints/src/matches/redundant_pattern_match.rs index 7d59122f1f66..ee8bc29a6183 100644 --- a/clippy_lints/src/matches/redundant_pattern_match.rs +++ b/clippy_lints/src/matches/redundant_pattern_match.rs @@ -615,3 +615,36 @@ fn find_good_method_for_matches_macro<'a>( _ => None, } } + +<<<<<<< HEAD +<<<<<<< HEAD +======= +#[expect(clippy::too_many_arguments)] +>>>>>>> afa2741e6 (redundant_pattern_matching) +======= +>>>>>>> 630f31ce5 (fix conflict with matches macro) +fn find_good_method_for_matches_macro<'a>( + cx: &LateContext<'_>, + arms: &[Arm<'_>], + path_left: &QPath<'_>, + expected_item_left: Item, + should_be_left: &'a str, + should_be_right: &'a str, +) -> Option<&'a str> { + let first_pat = arms[0].pat; + + let body_node_pair = if is_pat_variant(cx, first_pat, path_left, expected_item_left) { + (&arms[0].body.kind, &arms[1].body.kind) + } else { + return None; + }; + + match body_node_pair { + (ExprKind::Lit(lit_left), ExprKind::Lit(lit_right)) => match (&lit_left.node, &lit_right.node) { + (LitKind::Bool(true), LitKind::Bool(false)) => Some(should_be_left), + (LitKind::Bool(false), LitKind::Bool(true)) => Some(should_be_right), + _ => None, + }, + _ => None, + } +} diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 674d6ab26887..9fb76f052083 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -49,14 +49,20 @@ mod iterator_step_by_zero; <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) mod join_absolute_path; ======= >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) ======= mod join_absolute_paths; >>>>>>> 85f4cccf4 (renamed lint) +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) mod manual_next_back; mod manual_ok_or; mod manual_saturating_arithmetic; @@ -3342,6 +3348,7 @@ declare_clippy_lint! { <<<<<<< HEAD /// ### What it does <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 08a8a81af (Rebase and merge attempt number 2.) /// Checks for initial `'/'` in an argument to `.join()` on a `Path`. ======= @@ -3357,6 +3364,12 @@ declare_clippy_lint! { /// ### Why is this bad? /// `.join()` comments starting with a separator, can replace the entire path. >>>>>>> e4f5d83fa (Fixed formatting.) +======= + /// Checks for initial `'/ or \\'` in an argument to `.join()` on a `Path`. + /// + /// ### Why is this bad? + /// `.join()` comments starting with a separator (`/` or `\\`) can replace the entire path. +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) /// If this is intentional, prefer creating a new `Path` instead. /// /// See [`Path::join()`](https://doc.rust-lang.org/std/path/struct.Path.html#method.join) @@ -3591,6 +3604,8 @@ declare_clippy_lint! { ======= declare_clippy_lint! { /// ### What it does +======= +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) /// Checks for `.rev().next()` on a `DoubleEndedIterator` /// /// ### Why is this bad? @@ -3612,8 +3627,147 @@ declare_clippy_lint! { "manual reverse iteration of `DoubleEndedIterator`" } +<<<<<<< HEAD >>>>>>> a8834bc46 (add lint `manual_next_back`) >>>>>>> 4da6e7e06 (rebase attempt) +======= +declare_clippy_lint! { + /// ### What it does + /// Checks for calls to `.drain()` that clear the collection, immediately followed by a call to `.collect()`. + /// + /// > "Collection" in this context refers to any type with a `drain` method: + /// > `Vec`, `VecDeque`, `BinaryHeap`, `HashSet`,`HashMap`, `String` + /// + /// ### Why is this bad? + /// Using `mem::take` is faster as it avoids the allocation. + /// When using `mem::take`, the old collection is replaced with an empty one and ownership of + /// the old collection is returned. + /// +<<<<<<< HEAD +<<<<<<< HEAD + /// ### Known issues +======= + /// ### Drawback +>>>>>>> 2748ab956 (new lint: `drain_collect`) +======= + /// ### Known issues +>>>>>>> 5821fbbc3 (add test case for not whole length, move sugg into variable) + /// `mem::take(&mut vec)` is almost equivalent to `vec.drain(..).collect()`, except that + /// it also moves the **capacity**. The user might have explicitly written it this way + /// to keep the capacity on the original `Vec`. + /// + /// ### Example + /// ```rust + /// fn remove_all(v: &mut Vec) -> Vec { + /// v.drain(..).collect() + /// } + /// ``` + /// Use instead: + /// ```rust + /// use std::mem; + /// fn remove_all(v: &mut Vec) -> Vec { + /// mem::take(v) + /// } + /// ``` + #[clippy::version = "1.71.0"] + pub DRAIN_COLLECT, + perf, +<<<<<<< HEAD +<<<<<<< HEAD + "calling `.drain(..).collect()` to move all elements into a new collection" +} + +declare_clippy_lint! { + /// ### What it does + /// Checks for usage of `Iterator::fold` with a type that implements `Try`. + /// + /// ### Why is this bad? +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> cb5d7e344 (address comments) + /// The code should use `try_fold` instead, which short-circuits on failure, thus opening the + /// door for additional optimizations not possible with `fold` as rustc can guarantee the + /// function is never called on `None`, `Err`, etc., alleviating otherwise necessary checks. It's + /// also slightly more idiomatic. +<<<<<<< HEAD +======= + /// This should use `try_fold` instead, which short-circuits on failure, thus opening the door + /// for additional optimizations not possible with `fold` as rustc can guarantee the function is + /// never called on `None`, `Err`, etc., alleviating otherwise necessary checks. It's also + /// slightly more idiomatic. +>>>>>>> fbb3f759e (update docs) +======= +>>>>>>> cb5d7e344 (address comments) + /// + /// ### Known issues + /// This lint doesn't take into account whether a function does something on the failure case, + /// i.e., whether short-circuiting will affect behavior. Refactoring to `try_fold` is not + /// desirable in those cases. +<<<<<<< HEAD +======= + /// This is better represented with `try_fold`, but this has one major difference: It will + /// short-circuit on failure. *This is almost always what you want*. This can also open the door + /// for additional optimizations as well, as rustc can guarantee the function is never + /// called on `None`, `Err`, etc., alleviating otherwise necessary checks. +>>>>>>> 354172a18 (New lint `manual_try_fold`) +======= +>>>>>>> fbb3f759e (update docs) + /// + /// ### Example + /// ```rust + /// vec![1, 2, 3].iter().fold(Some(0i32), |sum, i| sum?.checked_add(*i)); + /// ``` + /// Use instead: + /// ```rust + /// vec![1, 2, 3].iter().try_fold(0i32, |sum, i| sum.checked_add(*i)); + /// ``` + #[clippy::version = "1.72.0"] + pub MANUAL_TRY_FOLD, + perf, + "checks for usage of `Iterator::fold` with a type that implements `Try`" +<<<<<<< HEAD +======= + "description" +>>>>>>> 2748ab956 (new lint: `drain_collect`) +======= + "calling `.drain(..).collect()` to move all elements into a new collection" +>>>>>>> 20ae597ec (add a description) +======= +>>>>>>> 354172a18 (New lint `manual_try_fold`) +} + +declare_clippy_lint! { + /// Looks for calls to [`Stdin::read_line`] to read a line from the standard input + /// into a string, then later attempting to parse this string into a type without first trimming it, which will + /// always fail because the string has a trailing newline in it. + /// + /// ### Why is this bad? + /// The `.parse()` call will always fail. + /// + /// ### Example + /// ```rust,ignore + /// let mut input = String::new(); + /// std::io::stdin().read_line(&mut input).expect("Failed to read a line"); + /// let num: i32 = input.parse().expect("Not a number!"); + /// assert_eq!(num, 42); // we never even get here! + /// ``` + /// Use instead: + /// ```rust,ignore + /// let mut input = String::new(); + /// std::io::stdin().read_line(&mut input).expect("Failed to read a line"); + /// let num: i32 = input.trim_end().parse().expect("Not a number!"); + /// // ^^^^^^^^^^^ remove the trailing newline + /// assert_eq!(num, 42); + /// ``` + #[clippy::version = "1.72.0"] + pub READ_LINE_WITHOUT_TRIM, + correctness, + "calling `Stdin::read_line`, then trying to parse it without first trimming" +} + +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub struct Methods { avoid_breaking_exported_api: bool, msrv: Msrv, @@ -3751,6 +3905,7 @@ impl_lint_pass!(Methods => [ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD PATH_JOIN_CORRECTION, ======= @@ -3780,6 +3935,15 @@ impl_lint_pass!(Methods => [ JOIN_ABSOLUTE_PATHS, >>>>>>> 85f4cccf4 (renamed lint) MANUAL_NEXT_BACK, +======= + JOIN_ABSOLUTE_PATH, +======= +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) +======= + JOIN_ABSOLUTE_PATHS, +>>>>>>> 85f4cccf4 (renamed lint) + MANUAL_NEXT_BACK, +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) UNNECESSARY_LITERAL_UNWRAP, <<<<<<< HEAD <<<<<<< HEAD @@ -3796,6 +3960,7 @@ impl_lint_pass!(Methods => [ MANUAL_TRY_FOLD, >>>>>>> 354172a18 (New lint `manual_try_fold`) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= @@ -3807,6 +3972,8 @@ impl_lint_pass!(Methods => [ >>>>>>> a8834bc46 (add lint `manual_next_back`) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ]); /// Extracts a method call name, args, and `Span` of the method name. @@ -4155,11 +4322,15 @@ impl Methods { if let Some(("collect", _, _, span, _)) = method_call(recv) { unnecessary_join::check(cx, expr, recv, join_arg, span); } +<<<<<<< HEAD <<<<<<< HEAD else {join_absolute_paths::check(cx, expr, join_arg, span);} ======= else {path_join_correction::check(cx, expr, join_arg, span);} >>>>>>> e4f5d83fa (Fixed formatting.) +======= + else {join_absolute_paths::check(cx, expr, join_arg, span);} +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) }, ("last", []) | ("skip", [_]) => { if let Some((name2, recv2, args2, _span2, _)) = method_call(recv) { diff --git a/clippy_lints/src/needless_bool.rs b/clippy_lints/src/needless_bool.rs index 4727a8fd5cf1..05b5cd01d1b3 100644 --- a/clippy_lints/src/needless_bool.rs +++ b/clippy_lints/src/needless_bool.rs @@ -6,6 +6,7 @@ use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg}; use clippy_utils::source::snippet_with_applicability; use clippy_utils::sugg::Sugg; use clippy_utils::{ +<<<<<<< HEAD <<<<<<< HEAD get_parent_node, higher, is_else_clause, is_expn_of, peel_blocks, peel_blocks_with_stmt, span_extract_comment, SpanlessEq, @@ -15,6 +16,11 @@ use clippy_utils::{ }; use clippy_utils::{higher, SpanlessEq}; >>>>>>> e4f5d83fa (Fixed formatting.) +======= + get_parent_node, higher, is_else_clause, is_expn_of, peel_blocks, peel_blocks_with_stmt, span_extract_comment, + SpanlessEq, +}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_ast::ast::LitKind; use rustc_errors::Applicability; use rustc_hir::{BinOpKind, Block, Expr, ExprKind, HirId, Node, UnOp}; @@ -112,11 +118,15 @@ declare_clippy_lint! { /// # let mut skip: bool; /// skip = !must_keep(x, y); /// ``` +<<<<<<< HEAD <<<<<<< HEAD #[clippy::version = "1.71.0"] ======= #[clippy::version = "1.69.0"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= + #[clippy::version = "1.71.0"] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub NEEDLESS_BOOL_ASSIGN, complexity, "setting the same boolean variable in both branches of an if-statement" @@ -222,27 +232,36 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessBool { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) SpanlessEq::new(cx).eq_expr(lhs_a, lhs_b) ======= SpanlessEq::new(cx).eq_expr(lhs_a, lhs_b) && span_extract_comment(cx.tcx.sess.source_map(), e.span).is_empty() <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 69da902f4 (Detect if expressions with boolean assignments to the same target) ======= SpanlessEq::new(cx).eq_expr(lhs_a, lhs_b) >>>>>>> c5d4b04dd (needless_bool: do not simplify code if it loses comments) ======= +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= SpanlessEq::new(cx).eq_expr(lhs_a, lhs_b) >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= SpanlessEq::new(cx).eq_expr(lhs_a, lhs_b) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) { let mut applicability = Applicability::MachineApplicable; let cond = Sugg::hir_with_applicability(cx, cond, "..", &mut applicability); diff --git a/clippy_lints/src/non_copy_const.rs b/clippy_lints/src/non_copy_const.rs index 850254c7641a..777d4e69c335 100644 --- a/clippy_lints/src/non_copy_const.rs +++ b/clippy_lints/src/non_copy_const.rs @@ -217,6 +217,7 @@ fn is_value_unfrozen_poly<'tcx>(cx: &LateContext<'tcx>, body_id: BodyId, ty: Ty< fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: DefId, ty: Ty<'tcx>) -> bool { let substs = cx.typeck_results().node_substs(hir_id); +<<<<<<< HEAD <<<<<<< HEAD let result = const_eval_resolve(cx.tcx, cx.param_env, ty::UnevaluatedConst::new(def_id, substs), None); ======= @@ -224,6 +225,9 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D .tcx .const_eval_resolve(cx.param_env, mir::UnevaluatedConst::new(def_id, substs), None); >>>>>>> e4f5d83fa (Fixed formatting.) +======= + let result = const_eval_resolve(cx.tcx, cx.param_env, ty::UnevaluatedConst::new(def_id, substs), None); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) is_value_unfrozen_raw(cx, result, ty) } diff --git a/clippy_lints/src/operators/arithmetic_side_effects.rs b/clippy_lints/src/operators/arithmetic_side_effects.rs index ac6d84200dff..e25bed3e2963 100644 --- a/clippy_lints/src/operators/arithmetic_side_effects.rs +++ b/clippy_lints/src/operators/arithmetic_side_effects.rs @@ -1,5 +1,6 @@ use super::ARITHMETIC_SIDE_EFFECTS; <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::consts::{constant, constant_simple, Constant}; use clippy_utils::diagnostics::span_lint; use clippy_utils::{is_from_proc_macro, is_lint_allowed, peel_hir_expr_refs, peel_hir_expr_unary}; @@ -12,11 +13,17 @@ use clippy_utils::{ }; use rustc_ast as ast; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::consts::{constant, constant_simple, Constant}; +use clippy_utils::diagnostics::span_lint; +use clippy_utils::{is_from_proc_macro, is_lint_allowed, peel_hir_expr_refs, peel_hir_expr_unary}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::ty::Ty; use rustc_session::impl_lint_pass; <<<<<<< HEAD +<<<<<<< HEAD use rustc_span::source_map::{Span, Spanned}; use rustc_span::Symbol; use {rustc_ast as ast, rustc_hir as hir}; @@ -26,10 +33,16 @@ use rustc_span::{ Symbol, }; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use rustc_span::source_map::{Span, Spanned}; +use rustc_span::Symbol; +use {rustc_ast as ast, rustc_hir as hir}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) const HARD_CODED_ALLOWED_BINARY: &[[&str; 2]] = &[ ["f32", "f32"], ["f64", "f64"], +<<<<<<< HEAD <<<<<<< HEAD ["std::num::Saturating", "*"], ["std::num::Wrapping", "*"], @@ -37,6 +50,10 @@ const HARD_CODED_ALLOWED_BINARY: &[[&str; 2]] = &[ ["std::num::Saturating", "std::num::Saturating"], ["std::num::Wrapping", "std::num::Wrapping"], >>>>>>> e4f5d83fa (Fixed formatting.) +======= + ["std::num::Saturating", "*"], + ["std::num::Wrapping", "*"], +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ["std::string::String", "str"], ]; const HARD_CODED_ALLOWED_UNARY: &[&str] = &["f32", "f64", "std::num::Saturating", "std::num::Wrapping"]; diff --git a/clippy_lints/src/operators/numeric_arithmetic.rs b/clippy_lints/src/operators/numeric_arithmetic.rs index 7dbe1ef3dd97..c143d50a1e51 100644 --- a/clippy_lints/src/operators/numeric_arithmetic.rs +++ b/clippy_lints/src/operators/numeric_arithmetic.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD use super::FLOAT_ARITHMETIC; use clippy_utils::consts::constant_simple; use clippy_utils::diagnostics::span_lint; @@ -9,6 +10,11 @@ use clippy_utils::diagnostics::span_lint; use clippy_utils::is_from_proc_macro; use clippy_utils::is_integer_literal; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use super::FLOAT_ARITHMETIC; +use clippy_utils::consts::constant_simple; +use clippy_utils::diagnostics::span_lint; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_hir as hir; use rustc_lint::LateContext; use rustc_span::source_map::Span; @@ -51,6 +57,7 @@ impl Context { _ => (), } +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); @@ -141,6 +148,10 @@ impl Context { } else if r_ty.peel_refs().is_floating_point() && r_ty.peel_refs().is_floating_point() { >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + let (_, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); + if r_ty.peel_refs().is_floating_point() && r_ty.peel_refs().is_floating_point() { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); self.expr_id = Some(expr.hir_id); } @@ -152,6 +163,7 @@ impl Context { } let ty = cx.typeck_results().expr_ty(arg); <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD if constant_simple(cx, cx.typeck_results(), expr).is_none() { if ty.is_integral() { @@ -215,6 +227,11 @@ impl Context { } >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + if constant_simple(cx, cx.typeck_results(), expr).is_none() && ty.is_floating_point() { + span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); + self.expr_id = Some(expr.hir_id); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } } diff --git a/clippy_lints/src/renamed_lints.rs b/clippy_lints/src/renamed_lints.rs index 5f3f8cc2459c..4164bbc3d981 100644 --- a/clippy_lints/src/renamed_lints.rs +++ b/clippy_lints/src/renamed_lints.rs @@ -31,6 +31,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[ ("clippy::stutter", "clippy::module_name_repetitions"), ("clippy::to_string_in_display", "clippy::recursive_format_impl"), ("clippy::zero_width_space", "clippy::invisible_characters"), +<<<<<<< HEAD <<<<<<< HEAD ("clippy::cast_ref_to_mut", "cast_ref_to_mut"), ("clippy::clone_double_ref", "suspicious_double_ref_op"), @@ -38,6 +39,11 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[ ======= ("clippy::clone_double_ref", "suspicious_double_ref_op"), >>>>>>> e4f5d83fa (Fixed formatting.) +======= + ("clippy::cast_ref_to_mut", "cast_ref_to_mut"), + ("clippy::clone_double_ref", "suspicious_double_ref_op"), + ("clippy::cmp_nan", "invalid_nan_comparisons"), +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ("clippy::drop_bounds", "drop_bounds"), ("clippy::drop_copy", "dropping_copy_types"), ("clippy::drop_ref", "dropping_references"), diff --git a/clippy_lints/src/trait_bounds.rs b/clippy_lints/src/trait_bounds.rs index 44c0007d5341..ba1314e4532d 100644 --- a/clippy_lints/src/trait_bounds.rs +++ b/clippy_lints/src/trait_bounds.rs @@ -198,6 +198,7 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds { // If we haven't yet seen it, add it to the fixed traits <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= let mut bounds_span = bounds[0].span; @@ -228,6 +229,9 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds { for bound in bounds.iter() { >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + for bound in bounds { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) let Some(def_id) = bound.trait_ref.trait_def_id() else { continue; }; let new_trait = seen_def_ids.insert(def_id); @@ -361,11 +365,16 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds { >>>>>>> 122793b49 (Update trait_bounds.rs) } } +<<<<<<< HEAD <<<<<<< HEAD extract_msrv_attr!(LateContext); ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= + + extract_msrv_attr!(LateContext); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } impl TraitBounds { diff --git a/clippy_lints/src/unnecessary_box_returns.rs b/clippy_lints/src/unnecessary_box_returns.rs index ba0638ced8c9..1e0622c2129b 100644 --- a/clippy_lints/src/unnecessary_box_returns.rs +++ b/clippy_lints/src/unnecessary_box_returns.rs @@ -3,6 +3,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::{diagnostics::span_lint_and_then, ty::approx_ty_size}; ======= use clippy_utils::diagnostics::span_lint_and_then; @@ -24,6 +25,10 @@ use clippy_utils::ty::approx_ty_size; use clippy_utils::{diagnostics::span_lint_and_then, ty::approx_ty_size}; >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +use clippy_utils::diagnostics::span_lint_and_then; +use clippy_utils::ty::approx_ty_size; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_errors::Applicability; use rustc_hir::def_id::LocalDefId; use rustc_hir::{FnDecl, FnRetTy, ImplItemKind, Item, ItemKind, Node, TraitItem, TraitItemKind}; diff --git a/clippy_lints/src/useless_conversion.rs b/clippy_lints/src/useless_conversion.rs index 48b5038e5069..4cdf629219c7 100644 --- a/clippy_lints/src/useless_conversion.rs +++ b/clippy_lints/src/useless_conversion.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_sugg, span_lint_and_then}; use clippy_utils::source::{snippet, snippet_with_applicability, snippet_with_context}; ======= @@ -6,6 +7,10 @@ use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_sugg}; use clippy_utils::is_ty_alias; use clippy_utils::source::{snippet, snippet_with_context}; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_sugg, span_lint_and_then}; +use clippy_utils::source::{snippet, snippet_with_applicability, snippet_with_context}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use clippy_utils::sugg::Sugg; use clippy_utils::ty::{is_copy, is_type_diagnostic_item, same_type_and_consts}; use clippy_utils::{get_parent_expr, is_trait_method, is_ty_alias, match_def_path, path_to_local, paths}; diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index 5417804d4e93..7035b0930f10 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -616,6 +616,7 @@ define_Conf! { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> a3aeec4f7 (config instead of new lint and don't panic) @@ -644,6 +645,8 @@ define_Conf! { ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) /// Lint: MODULE_INCEPTION. /// /// Whether to allow module inception if it's not public. @@ -719,6 +722,7 @@ define_Conf! { (allow_one_hash_in_raw_strings: bool = false), >>>>>>> 8cb6c8699 (change category and refactor) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= @@ -736,6 +740,8 @@ define_Conf! { >>>>>>> 41f6d88be (make cargo test pass) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } /// Search for the configuration file. diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs index 1a828cf5aa4a..80b0e42e8bdf 100644 --- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs +++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs @@ -9,6 +9,7 @@ use crate::renamed_lints::RENAMED_LINTS; <<<<<<< HEAD +<<<<<<< HEAD use crate::utils::internal_lints::lint_without_lint_pass::{extract_clippy_version_value, is_lint_ref_type}; use crate::utils::{collect_configs, ClippyConfiguration}; ======= @@ -18,6 +19,10 @@ use crate::utils::{ ClippyConfiguration, }; >>>>>>> e4f5d83fa (Fixed formatting.) +======= +use crate::utils::internal_lints::lint_without_lint_pass::{extract_clippy_version_value, is_lint_ref_type}; +use crate::utils::{collect_configs, ClippyConfiguration}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use clippy_utils::diagnostics::span_lint; use clippy_utils::ty::{match_type, walk_ptrs_ty_depth}; diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 9fd3bd1dfae4..5b966f51ac12 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -12,12 +12,18 @@ fn to_kebab(config_name: &str) -> String { config_name.replace('_', "-") } +<<<<<<< HEAD <<<<<<< HEAD #[cfg(feature = "internal")] const BOOK_CONFIGS_PATH: &str = "https://doc.rust-lang.org/clippy/lint_configuration.html"; ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#[cfg(feature = "internal")] +const BOOK_CONFIGS_PATH: &str = "https://doc.rust-lang.org/clippy/lint_configuration.html"; + +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // ================================================================== // Configuration // ================================================================== @@ -57,11 +63,15 @@ impl ClippyConfiguration { #[cfg(feature = "internal")] fn to_markdown_paragraph(&self) -> String { format!( +<<<<<<< HEAD <<<<<<< HEAD "## `{}`\n{}\n\n**Default Value:** `{}` (`{}`)\n\n---\n**Affected lints:**\n{}\n\n", ======= "### {}\n{}\n\n**Default Value:** `{}` (`{}`)\n\n{}\n\n", >>>>>>> e4f5d83fa (Fixed formatting.) +======= + "## `{}`\n{}\n\n**Default Value:** `{}` (`{}`)\n\n---\n**Affected lints:**\n{}\n\n", +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) self.name, self.doc .lines() @@ -72,6 +82,7 @@ impl ClippyConfiguration { self.lints .iter() .map(|name| name.to_string().split_whitespace().next().unwrap().to_string()) +<<<<<<< HEAD <<<<<<< HEAD .map(|name| format!("* [`{name}`](https://rust-lang.github.io/rust-clippy/master/index.html#{name})")) .join("\n"), @@ -92,15 +103,29 @@ impl ClippyConfiguration { >>>>>>> d5b2f1134 (Now `cargo collect-metadata` updates the `CHANGELOG.md`) ======= .map(|name| format!("* [{name}](https://rust-lang.github.io/rust-clippy/master/index.html#{name})")) +======= + .map(|name| format!("* [`{name}`](https://rust-lang.github.io/rust-clippy/master/index.html#{name})")) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) .join("\n"), ) } - +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> d5b2f1134 (Now `cargo collect-metadata` updates the `CHANGELOG.md`) #[cfg(feature = "internal")] - fn to_markdown_table_entry(&self) -> String { - format!("| [{}](#{}) | `{}` |", self.name, self.name, self.default) + fn to_markdown_link(&self) -> String { + format!("[`{}`]: {BOOK_CONFIGS_PATH}#{}", self.name, self.name) } +<<<<<<< HEAD >>>>>>> e4f5d83fa (Fixed formatting.) +======= +<<<<<<< HEAD +======= +>>>>>>> b7a605471 (Refresh Lint Configuration's looks) +======= +>>>>>>> d5b2f1134 (Now `cargo collect-metadata` updates the `CHANGELOG.md`) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } #[cfg(feature = "internal")] diff --git a/clippy_lints/src/wildcard_imports.rs b/clippy_lints/src/wildcard_imports.rs index 1c893cafff7c..0bad6744b9aa 100644 --- a/clippy_lints/src/wildcard_imports.rs +++ b/clippy_lints/src/wildcard_imports.rs @@ -5,6 +5,7 @@ use if_chain::if_chain; use rustc_errors::Applicability; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD use rustc_hir::{ def::{DefKind, Res}, Item, ItemKind, PathSegment, UseKind, @@ -30,6 +31,10 @@ use rustc_hir::{ }; >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +use rustc_hir::def::{DefKind, Res}; +use rustc_hir::{Item, ItemKind, PathSegment, UseKind}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_middle::ty; use rustc_session::{declare_tool_lint, impl_lint_pass}; diff --git a/clippy_utils/Cargo.toml b/clippy_utils/Cargo.toml index eeedaebebb45..946517a94f30 100644 --- a/clippy_utils/Cargo.toml +++ b/clippy_utils/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "clippy_utils" <<<<<<< HEAD +<<<<<<< HEAD version = "0.1.73" ======= version = "0.1.71" >>>>>>> e4f5d83fa (Fixed formatting.) +======= +version = "0.1.73" +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) edition = "2021" publish = false diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index eec589689f6a..3b1decf96fd6 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -291,11 +291,15 @@ pub fn is_wild(pat: &Pat<'_>) -> bool { /// Checks if the given `QPath` belongs to a type alias. pub fn is_ty_alias(qpath: &QPath<'_>) -> bool { match *qpath { +<<<<<<< HEAD <<<<<<< HEAD QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), ======= QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias, ..)), >>>>>>> e4f5d83fa (Fixed formatting.) +======= + QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) QPath::TypeRelative(ty, _) if let TyKind::Path(qpath) = ty.kind => { is_ty_alias(&qpath) }, _ => false, } diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs index 50541ed1c1a9..eb8e22280dcc 100644 --- a/clippy_utils/src/paths.rs +++ b/clippy_utils/src/paths.rs @@ -160,7 +160,12 @@ pub const VEC_POP: [&str; 4] = ["alloc", "vec", "Vec", "pop"]; pub const OPTION_UNWRAP: [&str; 4] = ["core", "option", "Option", "unwrap"]; pub const OPTION_EXPECT: [&str; 4] = ["core", "option", "Option", "expect"]; <<<<<<< HEAD +<<<<<<< HEAD pub const FORMATTER: [&str; 3] = ["core", "fmt", "Formatter"]; pub const DEBUG_STRUCT: [&str; 4] = ["core", "fmt", "builders", "DebugStruct"]; ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +pub const FORMATTER: [&str; 3] = ["core", "fmt", "Formatter"]; +pub const DEBUG_STRUCT: [&str; 4] = ["core", "fmt", "builders", "DebugStruct"]; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs index 6a5b2ead54e9..8fa1ac1b91cb 100644 --- a/clippy_utils/src/qualify_min_const_fn.rs +++ b/clippy_utils/src/qualify_min_const_fn.rs @@ -412,9 +412,12 @@ fn check_terminator<'tcx>( >>>>>>> 0e233492d (use trait solver instead; created spaghetti code) TerminatorKind::SwitchInt { discr, targets: _ } => check_operand(tcx, discr, span, body), <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) TerminatorKind::GeneratorDrop | TerminatorKind::Yield { .. } => { Err((span, "const fn generators are unstable".into())) }, diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs index d5b68d700da6..16d1cb173c58 100644 --- a/clippy_utils/src/ty.rs +++ b/clippy_utils/src/ty.rs @@ -105,11 +105,15 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<' match predicate.kind().skip_binder() { // For `impl Trait`, it will register a predicate of `T: Trait`, so we go through // and check substitutions to find `U`. +<<<<<<< HEAD <<<<<<< HEAD ty::ClauseKind::Trait(trait_predicate) => { ======= ty::PredicateKind::Clause(ty::Clause::Trait(trait_predicate)) => { >>>>>>> e4f5d83fa (Fixed formatting.) +======= + ty::ClauseKind::Trait(trait_predicate) => { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if trait_predicate .trait_ref .substs @@ -287,6 +291,7 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { for (predicate, _) in cx.tcx.explicit_item_bounds(def_id).skip_binder() { <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= for (predicate, _) in cx.tcx.bound_explicit_item_bounds(*def_id).skip_binder() { >>>>>>> afa28e630 (change usages of explicit_item_bounds to bound_explicit_item_bounds) @@ -303,6 +308,9 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { if let ty::PredicateKind::Clause(ty::Clause::Trait(trait_predicate)) = predicate.kind().skip_binder() { >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + if let ty::ClauseKind::Trait(trait_predicate) = predicate.kind().skip_binder() { +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) if cx.tcx.has_attr(trait_predicate.trait_ref.def_id, sym::must_use) { return true; } diff --git a/declare_clippy_lint/Cargo.toml b/declare_clippy_lint/Cargo.toml index 6baf671ec19d..eaaaf9e3b074 100644 --- a/declare_clippy_lint/Cargo.toml +++ b/declare_clippy_lint/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "declare_clippy_lint" <<<<<<< HEAD +<<<<<<< HEAD version = "0.1.73" ======= version = "0.1.71" >>>>>>> e4f5d83fa (Fixed formatting.) +======= +version = "0.1.73" +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) edition = "2021" publish = false diff --git a/rust-toolchain b/rust-toolchain index ceb2fc79cc97..bb7e0eba92bc 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,6 +5,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD channel = "nightly-2023-04-23" ======= channel = "nightly-2023-05-05" @@ -21,6 +22,8 @@ channel = "nightly-2023-05-05" ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) channel = "nightly-2023-06-29" ======= channel = "nightly-2023-05-20" @@ -35,6 +38,7 @@ channel = "nightly-2023-06-29" channel = "nightly-2023-07-14" >>>>>>> 753c30f34 (Bump nightly version -> 2023-07-14) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= @@ -44,4 +48,6 @@ channel = "nightly-2023-05-05" >>>>>>> 79656cc95 (Bump nightly version -> 2023-05-05) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) components = ["cargo", "llvm-tools", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"] diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 44516806076e..9e8e8b16fe3b 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -113,6 +113,9 @@ const RUN_INTERNAL_TESTS: bool = cfg!(feature = "internal"); fn base_config(test_dir: &str) -> compiletest::Config { let mut config = compiletest::Config { <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) mode: TestMode::Yolo, stderr_filters: vec![], stdout_filters: vec![], @@ -136,12 +139,15 @@ fn base_config(test_dir: &str) -> compiletest::Config { out_dir: "target/ui_test".into(), >>>>>>> 514b6d04b (Port clippy away from compiletest to ui_test) ..compiletest::Config::rustc(Path::new("tests").join(test_dir)) +<<<<<<< HEAD ======= edition: Some("2021".into()), mode: TestMode::Ui, strict_headers: true, ..Default::default() >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) }; if let Some(_path) = option_env!("RUSTC_LIB_PATH") { diff --git a/tests/ui-internal/custom_ice_message.rs b/tests/ui-internal/custom_ice_message.rs index f9dde56bb0f9..cd07920fc670 100644 --- a/tests/ui-internal/custom_ice_message.rs +++ b/tests/ui-internal/custom_ice_message.rs @@ -4,9 +4,13 @@ //@normalize-stderr-test: "', .*clippy_lints" -> "', clippy_lints" //@normalize-stderr-test: "'rustc'" -> "''" <<<<<<< HEAD +<<<<<<< HEAD //@normalize-stderr-test: "rustc 1\.\d+.* running on .*" -> "rustc running on " ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@normalize-stderr-test: "rustc 1\.\d+.* running on .*" -> "rustc running on " +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@normalize-stderr-test: "(?ms)query stack during panic:\n.*end of query stack\n" -> "" #![deny(clippy::internal)] diff --git a/tests/ui-toml/nonstandard_macro_braces/auxiliary/proc_macro_derive.rs b/tests/ui-toml/nonstandard_macro_braces/auxiliary/proc_macro_derive.rs index 5b9fecef97bf..08d77bf089d1 100644 --- a/tests/ui-toml/nonstandard_macro_braces/auxiliary/proc_macro_derive.rs +++ b/tests/ui-toml/nonstandard_macro_braces/auxiliary/proc_macro_derive.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic @@ -6,6 +7,8 @@ #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) extern crate proc_macro; use proc_macro::TokenStream; diff --git a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.fixed b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.fixed index 8fd51147801b..e7860bbe714e 100644 --- a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.fixed +++ b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.fixed @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::nonstandard_macro_braces)] diff --git a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs index fd7f65d8e3e8..5b66c5544e6f 100644 --- a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs +++ b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::nonstandard_macro_braces)] diff --git a/tests/ui-toml/toml_unknown_key/conf_unknown_key.rs b/tests/ui-toml/toml_unknown_key/conf_unknown_key.rs index 3bb97e48d3db..06c93ecd3620 100644 --- a/tests/ui-toml/toml_unknown_key/conf_unknown_key.rs +++ b/tests/ui-toml/toml_unknown_key/conf_unknown_key.rs @@ -1,7 +1,11 @@ <<<<<<< HEAD +<<<<<<< HEAD //@error-in-other-file: unknown field `foobar`, expected one of ======= //@error-pattern: unknown field `foobar`, expected one of >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@error-in-other-file: unknown field `foobar`, expected one of +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() {} diff --git a/tests/ui/allow_attributes.fixed b/tests/ui/allow_attributes.fixed index 28601f2222a9..8be3b4a46612 100644 --- a/tests/ui/allow_attributes.fixed +++ b/tests/ui/allow_attributes.fixed @@ -2,6 +2,9 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs @@ -9,8 +12,11 @@ ======= //@aux-build:proc_macros.rs:proc-macro >>>>>>> 5bd97ac17 (Update tests) +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::allow_attributes)] #![feature(lint_reasons)] diff --git a/tests/ui/allow_attributes.rs b/tests/ui/allow_attributes.rs index 03a7e39823e8..ec4a4ebff1e9 100644 --- a/tests/ui/allow_attributes.rs +++ b/tests/ui/allow_attributes.rs @@ -2,6 +2,9 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs @@ -9,8 +12,11 @@ ======= //@aux-build:proc_macros.rs:proc-macro >>>>>>> 5bd97ac17 (Update tests) +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::allow_attributes)] #![feature(lint_reasons)] diff --git a/tests/ui/almost_complete_range.fixed b/tests/ui/almost_complete_range.fixed index 882ac8007b3c..dd411e466abf 100644 --- a/tests/ui/almost_complete_range.fixed +++ b/tests/ui/almost_complete_range.fixed @@ -1,10 +1,14 @@ //@run-rustfix //@edition:2018 <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(exclusive_range_pattern)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/almost_complete_range.rs b/tests/ui/almost_complete_range.rs index ccbc8bd55440..2c8235951441 100644 --- a/tests/ui/almost_complete_range.rs +++ b/tests/ui/almost_complete_range.rs @@ -1,10 +1,14 @@ //@run-rustfix //@edition:2018 <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(exclusive_range_pattern)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/arithmetic_side_effects.rs b/tests/ui/arithmetic_side_effects.rs index 22a8dc6bead4..6a88f2e7e74d 100644 --- a/tests/ui/arithmetic_side_effects.rs +++ b/tests/ui/arithmetic_side_effects.rs @@ -5,6 +5,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs ======= // aux-build:proc_macro_derive.rs @@ -38,6 +39,9 @@ >>>>>>> def1705a2 (Update to a compiletest-rs version that requires `//@` for commands) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( clippy::assign_op_pattern, @@ -512,6 +516,7 @@ pub fn issue_10767() { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 6b95029f1 (Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup) ======= @@ -519,6 +524,8 @@ pub fn issue_10767() { ======= ======= >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) pub fn issue_10792() { struct One { a: u32, @@ -539,10 +546,13 @@ pub fn issue_11145() { x += 1; } +<<<<<<< HEAD <<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() {} diff --git a/tests/ui/as_conversions.rs b/tests/ui/as_conversions.rs index 5a6b73a1bb52..f845a8f5f764 100644 --- a/tests/ui/as_conversions.rs +++ b/tests/ui/as_conversions.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::as_conversions)] #![allow(clippy::borrow_as_ptr, unused)] diff --git a/tests/ui/asm_syntax.rs b/tests/ui/asm_syntax.rs index 3289b7ecbb6e..99ffdf16d0ff 100644 --- a/tests/ui/asm_syntax.rs +++ b/tests/ui/asm_syntax.rs @@ -1,10 +1,15 @@ <<<<<<< HEAD +<<<<<<< HEAD //@only-target-x86_64 //@ignore-target-aarch64 ======= //@only-x86_64 //@ignore-aarch64 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@only-target-x86_64 +//@ignore-target-aarch64 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[warn(clippy::inline_asm_x86_intel_syntax)] mod warn_intel { diff --git a/tests/ui/auxiliary/proc_macro_attr.rs b/tests/ui/auxiliary/proc_macro_attr.rs index 7a2d7497b143..ec6bc89301cf 100644 --- a/tests/ui/auxiliary/proc_macro_attr.rs +++ b/tests/ui/auxiliary/proc_macro_attr.rs @@ -1,10 +1,13 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(repr128, proc_macro_hygiene, proc_macro_quote, box_patterns)] #![allow(incomplete_features)] #![allow(clippy::useless_conversion, clippy::uninlined_format_args)] diff --git a/tests/ui/auxiliary/proc_macro_derive.rs b/tests/ui/auxiliary/proc_macro_derive.rs index 8ce4a6a48e09..8d4aadb150f4 100644 --- a/tests/ui/auxiliary/proc_macro_derive.rs +++ b/tests/ui/auxiliary/proc_macro_derive.rs @@ -1,10 +1,13 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(repr128, proc_macro_quote)] #![allow(incomplete_features)] #![allow(clippy::field_reassign_with_default)] @@ -94,6 +97,9 @@ pub fn extra_lifetime(_input: TokenStream) -> TokenStream { #[proc_macro_derive(ArithmeticDerive)] pub fn arithmetic_derive(_: TokenStream) -> TokenStream { <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >::from_iter([ Ident::new("fn", Span::call_site()).into(), Ident::new("_foo", Span::call_site()).into(), @@ -122,6 +128,7 @@ pub fn arithmetic_derive(_: TokenStream) -> TokenStream { ) .into(), ]) +<<<<<<< HEAD ======= >::from_iter( [ @@ -158,12 +165,17 @@ pub fn arithmetic_derive(_: TokenStream) -> TokenStream { .into_iter(), ) >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } #[allow(unused)] #[proc_macro_derive(ShadowDerive)] pub fn shadow_derive(_: TokenStream) -> TokenStream { <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >::from_iter([ Ident::new("fn", Span::call_site()).into(), Ident::new("_foo", Span::call_site()).into(), @@ -185,6 +197,7 @@ pub fn shadow_derive(_: TokenStream) -> TokenStream { ) .into(), ]) +<<<<<<< HEAD ======= >::from_iter( [ @@ -214,4 +227,6 @@ pub fn shadow_derive(_: TokenStream) -> TokenStream { .into_iter(), ) >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } diff --git a/tests/ui/auxiliary/proc_macro_suspicious_else_formatting.rs b/tests/ui/auxiliary/proc_macro_suspicious_else_formatting.rs index fe7247aff9b6..59982e65b8bc 100644 --- a/tests/ui/auxiliary/proc_macro_suspicious_else_formatting.rs +++ b/tests/ui/auxiliary/proc_macro_suspicious_else_formatting.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic @@ -6,6 +7,8 @@ #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) extern crate proc_macro; use proc_macro::{token_stream, Delimiter, Group, Ident, Span, TokenStream, TokenTree}; diff --git a/tests/ui/auxiliary/proc_macro_unsafe.rs b/tests/ui/auxiliary/proc_macro_unsafe.rs index 595ff3df3dec..0d0a8f9ce1a9 100644 --- a/tests/ui/auxiliary/proc_macro_unsafe.rs +++ b/tests/ui/auxiliary/proc_macro_unsafe.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic @@ -6,6 +7,8 @@ #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) extern crate proc_macro; use proc_macro::{Delimiter, Group, Ident, TokenStream, TokenTree}; diff --git a/tests/ui/auxiliary/proc_macros.rs b/tests/ui/auxiliary/proc_macros.rs index 31862a9fe491..dc0be6f0ec01 100644 --- a/tests/ui/auxiliary/proc_macros.rs +++ b/tests/ui/auxiliary/proc_macros.rs @@ -1,10 +1,13 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic #![crate_type = "proc-macro"] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(let_chains)] #![feature(proc_macro_span)] #![allow(clippy::needless_if, dead_code)] diff --git a/tests/ui/borrow_deref_ref.fixed b/tests/ui/borrow_deref_ref.fixed index 0bde3c34df9a..4e4523eda0a5 100644 --- a/tests/ui/borrow_deref_ref.fixed +++ b/tests/ui/borrow_deref_ref.fixed @@ -4,6 +4,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs ======= >>>>>>> a1b75c510 (Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup) @@ -21,6 +22,9 @@ //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(dead_code, unused_variables)] diff --git a/tests/ui/borrow_deref_ref.rs b/tests/ui/borrow_deref_ref.rs index da10d1c77b86..ca423681ca5f 100644 --- a/tests/ui/borrow_deref_ref.rs +++ b/tests/ui/borrow_deref_ref.rs @@ -4,6 +4,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs ======= >>>>>>> a1b75c510 (Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup) @@ -21,6 +22,9 @@ //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(dead_code, unused_variables)] diff --git a/tests/ui/box_default.fixed b/tests/ui/box_default.fixed index 3ca541e0f8d0..b39d30df7ca3 100644 --- a/tests/ui/box_default.fixed +++ b/tests/ui/box_default.fixed @@ -1,10 +1,14 @@ //@run-rustfix #![warn(clippy::box_default)] <<<<<<< HEAD +<<<<<<< HEAD #![allow(unused, clippy::default_constructed_unit_structs)] ======= #![allow(clippy::default_constructed_unit_structs)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(unused, clippy::default_constructed_unit_structs)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[derive(Default)] struct ImplementsDefault; diff --git a/tests/ui/box_default.rs b/tests/ui/box_default.rs index 3b1e40a3435e..2462438af692 100644 --- a/tests/ui/box_default.rs +++ b/tests/ui/box_default.rs @@ -1,10 +1,14 @@ //@run-rustfix #![warn(clippy::box_default)] <<<<<<< HEAD +<<<<<<< HEAD #![allow(unused, clippy::default_constructed_unit_structs)] ======= #![allow(clippy::default_constructed_unit_structs)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(unused, clippy::default_constructed_unit_structs)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[derive(Default)] struct ImplementsDefault; diff --git a/tests/ui/box_default.stderr b/tests/ui/box_default.stderr index 550296204471..17c7017019ab 100644 --- a/tests/ui/box_default.stderr +++ b/tests/ui/box_default.stderr @@ -73,41 +73,57 @@ LL | call_ty_fn(Box::new(u8::default())); | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()` error: `Box::new(_)` of default value +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/box_default.rs:48:5 ======= --> $DIR/box_default.rs:41:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/box_default.rs:48:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | Box::new(bool::default()) | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::::default()` error: `Box::new(_)` of default value +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/box_default.rs:65:28 ======= --> $DIR/box_default.rs:58:28 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/box_default.rs:65:28 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _: Box = Box::new(ImplementsDefault::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::::default()` error: `Box::new(_)` of default value +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/box_default.rs:74:17 ======= --> $DIR/box_default.rs:67:17 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/box_default.rs:74:17 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = Box::new(WeirdPathed::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::::default()` error: `Box::new(_)` of default value +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/box_default.rs:86:18 ======= --> $DIR/box_default.rs:79:18 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/box_default.rs:86:18 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | Some(Box::new(Foo::default())) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::::default()` diff --git a/tests/ui/cmp_owned/asymmetric_partial_eq.fixed b/tests/ui/cmp_owned/asymmetric_partial_eq.fixed index 3ea1cc680cdf..e84a882af563 100644 --- a/tests/ui/cmp_owned/asymmetric_partial_eq.fixed +++ b/tests/ui/cmp_owned/asymmetric_partial_eq.fixed @@ -1,14 +1,20 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( unused, clippy::needless_if, clippy::redundant_clone, clippy::derive_partial_eq_without_eq )] // See #5700 +<<<<<<< HEAD ======= #![allow(unused, clippy::redundant_clone, clippy::derive_partial_eq_without_eq)] // See #5700 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // Define the types in each module to avoid trait impls leaking between modules. macro_rules! impl_types { diff --git a/tests/ui/cmp_owned/asymmetric_partial_eq.rs b/tests/ui/cmp_owned/asymmetric_partial_eq.rs index e6955d75aa9c..13132d638126 100644 --- a/tests/ui/cmp_owned/asymmetric_partial_eq.rs +++ b/tests/ui/cmp_owned/asymmetric_partial_eq.rs @@ -1,14 +1,20 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( unused, clippy::needless_if, clippy::redundant_clone, clippy::derive_partial_eq_without_eq )] // See #5700 +<<<<<<< HEAD ======= #![allow(unused, clippy::redundant_clone, clippy::derive_partial_eq_without_eq)] // See #5700 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // Define the types in each module to avoid trait impls leaking between modules. macro_rules! impl_types { diff --git a/tests/ui/collapsible_else_if.fixed b/tests/ui/collapsible_else_if.fixed index b85df6d73385..2438d31b979d 100644 --- a/tests/ui/collapsible_else_if.fixed +++ b/tests/ui/collapsible_else_if.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_if)] ======= #![allow(clippy::assertions_on_constants, clippy::equatable_if_let)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/collapsible_else_if.rs b/tests/ui/collapsible_else_if.rs index ba024828e347..de6fa2ce6cf8 100644 --- a/tests/ui/collapsible_else_if.rs +++ b/tests/ui/collapsible_else_if.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_if)] ======= #![allow(clippy::assertions_on_constants, clippy::equatable_if_let)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/collapsible_if.fixed b/tests/ui/collapsible_if.fixed index 62bb2d8bf582..6b9634623e23 100644 --- a/tests/ui/collapsible_if.fixed +++ b/tests/ui/collapsible_if.fixed @@ -1,5 +1,8 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( clippy::assertions_on_constants, clippy::equatable_if_let, @@ -14,9 +17,12 @@ clippy::nonminimal_bool, clippy::eq_op )] +<<<<<<< HEAD ======= #![allow(clippy::assertions_on_constants, clippy::equatable_if_let)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs index 6f99ef2a1304..2100873a9128 100644 --- a/tests/ui/collapsible_if.rs +++ b/tests/ui/collapsible_if.rs @@ -1,5 +1,8 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( clippy::assertions_on_constants, clippy::equatable_if_let, @@ -14,9 +17,12 @@ clippy::nonminimal_bool, clippy::eq_op )] +<<<<<<< HEAD ======= #![allow(clippy::assertions_on_constants, clippy::equatable_if_let)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/tests/ui/crashes/auxiliary/proc_macro_crash.rs b/tests/ui/crashes/auxiliary/proc_macro_crash.rs index 92f85a27d7db..85bf8fd8eb4f 100644 --- a/tests/ui/crashes/auxiliary/proc_macro_crash.rs +++ b/tests/ui/crashes/auxiliary/proc_macro_crash.rs @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --emit=link //@no-prefer-dynamic @@ -8,6 +9,8 @@ // contain a proc-macro. >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(repr128)] #![allow(incomplete_features)] diff --git a/tests/ui/crashes/ice-10148.rs b/tests/ui/crashes/ice-10148.rs index 70b85bdc4b6e..51560d9724a0 100644 --- a/tests/ui/crashes/ice-10148.rs +++ b/tests/ui/crashes/ice-10148.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:../auxiliary/proc_macros.rs:proc-macro ======= //@aux-build:../../auxiliary/proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:../auxiliary/proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) extern crate proc_macros; diff --git a/tests/ui/crashes/ice-10645.rs b/tests/ui/crashes/ice-10645.rs index 35b2eb549811..abec2b7b7f32 100644 --- a/tests/ui/crashes/ice-10645.rs +++ b/tests/ui/crashes/ice-10645.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@compile-flags: --cap-lints=warn ======= // compile-flags: --cap-lints=warn >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@compile-flags: --cap-lints=warn +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // https://github.com/rust-lang/rust-clippy/issues/10645 #![warn(clippy::future_not_send)] diff --git a/tests/ui/crashes/ice-10645.stderr b/tests/ui/crashes/ice-10645.stderr index f11150f2b597..7241566a1aaa 100644 --- a/tests/ui/crashes/ice-10645.stderr +++ b/tests/ui/crashes/ice-10645.stderr @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD warning: future cannot be sent between threads safely ======= error: future cannot be sent between threads safely >>>>>>> e4f5d83fa (Fixed formatting.) +======= +warning: future cannot be sent between threads safely +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/ice-10645.rs:5:35 | LL | pub async fn bar<'a, T: 'a>(_: T) {} @@ -16,9 +20,13 @@ LL | pub async fn bar<'a, T: 'a>(_: T) {} = note: `T` doesn't implement `std::marker::Send` = note: `-D clippy::future-not-send` implied by `-D warnings` +<<<<<<< HEAD <<<<<<< HEAD warning: 1 warning emitted ======= error: aborting due to previous error >>>>>>> e4f5d83fa (Fixed formatting.) +======= +warning: 1 warning emitted +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/tests/ui/crashes/ice-3741.rs b/tests/ui/crashes/ice-3741.rs index ac4ed77c2d62..f4323c1eb498 100644 --- a/tests/ui/crashes/ice-3741.rs +++ b/tests/ui/crashes/ice-3741.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_crash.rs:proc-macro ======= //@aux-build:proc_macro_crash.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_crash.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::suspicious_else_formatting)] diff --git a/tests/ui/crashes/ice-4968.rs b/tests/ui/crashes/ice-4968.rs index 87364122a356..bce735e7dd97 100644 --- a/tests/ui/crashes/ice-4968.rs +++ b/tests/ui/crashes/ice-4968.rs @@ -1,8 +1,11 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@check-pass >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) // Test for https://github.com/rust-lang/rust-clippy/issues/4968 #![warn(clippy::unsound_collection_transmute)] diff --git a/tests/ui/crashes/ice-7410.rs b/tests/ui/crashes/ice-7410.rs index d4efa0fcce82..ad245b73c6dd 100644 --- a/tests/ui/crashes/ice-7410.rs +++ b/tests/ui/crashes/ice-7410.rs @@ -1,11 +1,16 @@ //@compile-flags: -Clink-arg=-nostartfiles <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-apple //@ignore-target-windows ======= //@ignore-macos //@ignore-windows >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-apple +//@ignore-target-windows +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(lang_items, start, libc)] #![no_std] diff --git a/tests/ui/crate_level_checks/entrypoint_recursion.rs b/tests/ui/crate_level_checks/entrypoint_recursion.rs index 3a3b42c8d729..437630ff64fb 100644 --- a/tests/ui/crate_level_checks/entrypoint_recursion.rs +++ b/tests/ui/crate_level_checks/entrypoint_recursion.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-apple ======= //@ignore-macos >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-apple +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(rustc_attrs)] diff --git a/tests/ui/crate_level_checks/no_std_main_recursion.rs b/tests/ui/crate_level_checks/no_std_main_recursion.rs index f5e449994e07..d60d33e6f9d1 100644 --- a/tests/ui/crate_level_checks/no_std_main_recursion.rs +++ b/tests/ui/crate_level_checks/no_std_main_recursion.rs @@ -1,9 +1,13 @@ //@compile-flags: -Clink-arg=-nostartfiles <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-apple ======= //@ignore-macos >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-apple +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(lang_items, start, libc)] #![no_std] diff --git a/tests/ui/dbg_macro.rs b/tests/ui/dbg_macro.rs index e04d4b222302..15e73f5fb024 100644 --- a/tests/ui/dbg_macro.rs +++ b/tests/ui/dbg_macro.rs @@ -1,7 +1,10 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --test >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::dbg_macro)] fn foo(n: u32) -> u32 { diff --git a/tests/ui/def_id_nocore.rs b/tests/ui/def_id_nocore.rs index 5a9b0c3bb492..90f04fa2ee32 100644 --- a/tests/ui/def_id_nocore.rs +++ b/tests/ui/def_id_nocore.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-apple ======= //@ignore-macos >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-apple +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(no_core, lang_items, start)] #![no_core] diff --git a/tests/ui/default_constructed_unit_structs.fixed b/tests/ui/default_constructed_unit_structs.fixed index 92a01c30fb9a..9fad5c868702 100644 --- a/tests/ui/default_constructed_unit_structs.fixed +++ b/tests/ui/default_constructed_unit_structs.fixed @@ -102,6 +102,9 @@ struct EmptyStruct {} struct NonExhaustiveStruct; <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) mod issue_10755 { struct Sqlite {} @@ -124,14 +127,18 @@ mod issue_10755 { } } +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { // should lint let _ = PhantomData::; let _: PhantomData = PhantomData; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD let _: PhantomData = std::marker::PhantomData; ======= @@ -141,17 +148,24 @@ fn main() { let _: PhantomData = std::marker::PhantomData; >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +======= + let _: PhantomData = std::marker::PhantomData; +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= let _: PhantomData = std::marker::PhantomData; >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= let _: PhantomData = std::marker::PhantomData; >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) let _ = UnitStruct; // should not lint @@ -166,6 +180,7 @@ fn main() { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= <<<<<<< HEAD >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) @@ -177,6 +192,10 @@ fn main() { ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +======= +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) macro_rules! in_macro { ($i:ident) => {{ @@ -196,19 +215,25 @@ fn main() { let _ = ::default(); <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= <<<<<<< HEAD >>>>>>> 160371550 (add `rustfix` annotation) ======= >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) +======= >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } diff --git a/tests/ui/default_constructed_unit_structs.rs b/tests/ui/default_constructed_unit_structs.rs index dd90195a1cdb..00a2b16860eb 100644 --- a/tests/ui/default_constructed_unit_structs.rs +++ b/tests/ui/default_constructed_unit_structs.rs @@ -142,6 +142,9 @@ struct EmptyStruct {} struct NonExhaustiveStruct; <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) mod issue_10755 { struct Sqlite {} @@ -164,14 +167,18 @@ mod issue_10755 { } } +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { // should lint let _ = PhantomData::::default(); let _: PhantomData = PhantomData::default(); <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD let _: PhantomData = std::marker::PhantomData::default(); ======= @@ -181,17 +188,24 @@ fn main() { let _: PhantomData = std::marker::PhantomData::default(); >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +======= + let _: PhantomData = std::marker::PhantomData::default(); +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= let _: PhantomData = std::marker::PhantomData::default(); >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= let _: PhantomData = std::marker::PhantomData::default(); >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) let _ = UnitStruct::default(); // should not lint @@ -208,10 +222,15 @@ fn main() { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +======= +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) macro_rules! in_macro { ($i:ident) => {{ @@ -231,6 +250,7 @@ fn main() { let _ = ::default(); <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= <<<<<<< HEAD >>>>>>> 4e0490363 (rename to plural form) @@ -242,13 +262,18 @@ fn main() { ======= >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) +======= >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) } diff --git a/tests/ui/default_constructed_unit_structs.stderr b/tests/ui/default_constructed_unit_structs.stderr index fff891e275df..a112144e326e 100644 --- a/tests/ui/default_constructed_unit_structs.stderr +++ b/tests/ui/default_constructed_unit_structs.stderr @@ -43,6 +43,7 @@ error: use of `default` to create a unit struct <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/default_constructed_unit_structs.rs:106:33 ======= @@ -63,6 +64,9 @@ error: use of `default` to create a unit struct --> $DIR/default_constructed_unit_structs.rs:106:33 >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + --> $DIR/default_constructed_unit_structs.rs:128:33 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = PhantomData::::default(); | ^^^^^^^^^^^ help: remove this call to `default` @@ -72,6 +76,7 @@ error: use of `default` to create a unit struct <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/default_constructed_unit_structs.rs:107:42 ======= @@ -92,6 +97,9 @@ error: use of `default` to create a unit struct --> $DIR/default_constructed_unit_structs.rs:107:42 >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= + --> $DIR/default_constructed_unit_structs.rs:129:42 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _: PhantomData = PhantomData::default(); | ^^^^^^^^^^^ help: remove this call to `default` @@ -102,11 +110,16 @@ error: use of `default` to create a unit struct <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= <<<<<<< HEAD >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) +======= +======= +>>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/default_constructed_unit_structs.rs:108:55 ======= @@ -115,9 +128,12 @@ error: use of `default` to create a unit struct ======= --> $DIR/default_constructed_unit_structs.rs:130:55 >>>>>>> 8c82486ea ([`default_constructed_unit_structs`]: do not lint type aliases) +<<<<<<< HEAD ======= --> $DIR/default_constructed_unit_structs.rs:108:55 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _: PhantomData = std::marker::PhantomData::default(); | ^^^^^^^^^^^ help: remove this call to `default` @@ -125,6 +141,7 @@ LL | let _: PhantomData = std::marker::PhantomData::default(); error: use of `default` to create a unit struct <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/default_constructed_unit_structs.rs:109:23 <<<<<<< HEAD @@ -141,6 +158,11 @@ error: use of `default` to create a unit struct ======= >>>>>>> 68eb864c9 (Ignore expressions from macros in default_constructed_unit_structs) ======= +======= + --> $DIR/default_constructed_unit_structs.rs:109:23 +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/default_constructed_unit_structs.rs:108:23 >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= @@ -152,12 +174,15 @@ error: use of `default` to create a unit struct --> $DIR/default_constructed_unit_structs.rs:131:23 >>>>>>> 8c82486ea ([`default_constructed_unit_structs`]: do not lint type aliases) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= --> $DIR/default_constructed_unit_structs.rs:109:23 >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = UnitStruct::default(); | ^^^^^^^^^^^ help: remove this call to `default` @@ -167,6 +192,7 @@ LL | let _ = UnitStruct::default(); <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD error: aborting due to 6 previous errors ======= error: aborting due to 4 previous errors @@ -182,16 +208,23 @@ error: aborting due to 6 previous errors >>>>>>> 4da6e7e06 (rebase attempt) error: aborting due to 6 previous errors ======= +======= +error: aborting due to 6 previous errors +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: aborting due to 5 previous errors >>>>>>> 7e9abb311 (Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup) ======= error: aborting due to 6 previous errors >>>>>>> b76b0aeb6 (Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= error: aborting due to 6 previous errors >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/tests/ui/default_numeric_fallback_f64.fixed b/tests/ui/default_numeric_fallback_f64.fixed index b5fa86fe858d..87c961ed4d3c 100644 --- a/tests/ui/default_numeric_fallback_f64.fixed +++ b/tests/ui/default_numeric_fallback_f64.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::default_numeric_fallback)] #![allow( diff --git a/tests/ui/default_numeric_fallback_f64.rs b/tests/ui/default_numeric_fallback_f64.rs index 31273ed440fb..c354fe2f6f07 100644 --- a/tests/ui/default_numeric_fallback_f64.rs +++ b/tests/ui/default_numeric_fallback_f64.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::default_numeric_fallback)] #![allow( diff --git a/tests/ui/default_numeric_fallback_i32.fixed b/tests/ui/default_numeric_fallback_i32.fixed index 22c1f93a61f1..abb05aad9a0c 100644 --- a/tests/ui/default_numeric_fallback_i32.fixed +++ b/tests/ui/default_numeric_fallback_i32.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(lint_reasons)] #![warn(clippy::default_numeric_fallback)] diff --git a/tests/ui/default_numeric_fallback_i32.rs b/tests/ui/default_numeric_fallback_i32.rs index 7764c46583e9..8e52fc63144e 100644 --- a/tests/ui/default_numeric_fallback_i32.rs +++ b/tests/ui/default_numeric_fallback_i32.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(lint_reasons)] #![warn(clippy::default_numeric_fallback)] diff --git a/tests/ui/default_trait_access.fixed b/tests/ui/default_trait_access.fixed index 242cec0c1d99..69cff0c89a38 100644 --- a/tests/ui/default_trait_access.fixed +++ b/tests/ui/default_trait_access.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![deny(clippy::default_trait_access)] #![allow(dead_code, unused_imports)] #![allow(clippy::uninlined_format_args)] diff --git a/tests/ui/default_trait_access.rs b/tests/ui/default_trait_access.rs index ba8dd40ab13a..17d8fb871492 100644 --- a/tests/ui/default_trait_access.rs +++ b/tests/ui/default_trait_access.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![deny(clippy::default_trait_access)] #![allow(dead_code, unused_imports)] #![allow(clippy::uninlined_format_args)] diff --git a/tests/ui/deref_addrof.fixed b/tests/ui/deref_addrof.fixed index 9ce9733e4cdf..61a58bd1ba39 100644 --- a/tests/ui/deref_addrof.fixed +++ b/tests/ui/deref_addrof.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(clippy::return_self_not_must_use, clippy::useless_vec)] #![warn(clippy::deref_addrof)] diff --git a/tests/ui/deref_addrof.rs b/tests/ui/deref_addrof.rs index 043975810d70..29b363813adc 100644 --- a/tests/ui/deref_addrof.rs +++ b/tests/ui/deref_addrof.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(clippy::return_self_not_must_use, clippy::useless_vec)] #![warn(clippy::deref_addrof)] diff --git a/tests/ui/deref_addrof_macro.rs b/tests/ui/deref_addrof_macro.rs index e03d2634d36c..26cfa33dd294 100644 --- a/tests/ui/deref_addrof_macro.rs +++ b/tests/ui/deref_addrof_macro.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::deref_addrof)] diff --git a/tests/ui/doc_unsafe.rs b/tests/ui/doc_unsafe.rs index 064d1272ad11..782bbfb26db8 100644 --- a/tests/ui/doc_unsafe.rs +++ b/tests/ui/doc_unsafe.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(clippy::let_unit_value)] diff --git a/tests/ui/double_comparison.fixed b/tests/ui/double_comparison.fixed index 5ec2c77de2c1..667e7c300373 100644 --- a/tests/ui/double_comparison.fixed +++ b/tests/ui/double_comparison.fixed @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::needless_if)] ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { let x = 1; diff --git a/tests/ui/double_comparison.rs b/tests/ui/double_comparison.rs index 05a55d7373dd..c2721f1f9a89 100644 --- a/tests/ui/double_comparison.rs +++ b/tests/ui/double_comparison.rs @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::needless_if)] ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { let x = 1; diff --git a/tests/ui/empty_line_after_doc_comments.rs b/tests/ui/empty_line_after_doc_comments.rs index 4e3cb87c6401..681ccf37d838 100644 --- a/tests/ui/empty_line_after_doc_comments.rs +++ b/tests/ui/empty_line_after_doc_comments.rs @@ -1,4 +1,7 @@ <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@aux-build:proc_macro_attr.rs:proc-macro <<<<<<< HEAD // Flaky test, see https://github.com/rust-lang/rust/issues/113585. @@ -6,9 +9,12 @@ //@ignore-64bit ======= >>>>>>> 5bd97ac17 (Update tests) +<<<<<<< HEAD ======= //@aux-build:proc_macro_attr.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::empty_line_after_doc_comments)] #![allow(clippy::assertions_on_constants)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/empty_line_after_outer_attribute.rs b/tests/ui/empty_line_after_outer_attribute.rs index 2f106dbf336d..6057bdd7e422 100644 --- a/tests/ui/empty_line_after_outer_attribute.rs +++ b/tests/ui/empty_line_after_outer_attribute.rs @@ -1,4 +1,7 @@ <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@aux-build:proc_macro_attr.rs:proc-macro <<<<<<< HEAD // Flaky test, see https://github.com/rust-lang/rust/issues/113585. @@ -6,9 +9,12 @@ //@ignore-64bit ======= >>>>>>> 5bd97ac17 (Update tests) +<<<<<<< HEAD ======= //@aux-build:proc_macro_attr.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::empty_line_after_outer_attr)] #![allow(clippy::assertions_on_constants)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/empty_loop.rs b/tests/ui/empty_loop.rs index e07ff4d805d8..b0ca1825a71f 100644 --- a/tests/ui/empty_loop.rs +++ b/tests/ui/empty_loop.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::empty_loop)] diff --git a/tests/ui/empty_loop_no_std.rs b/tests/ui/empty_loop_no_std.rs index edac2a17acf2..90961b58b6b6 100644 --- a/tests/ui/empty_loop_no_std.rs +++ b/tests/ui/empty_loop_no_std.rs @@ -1,9 +1,13 @@ //@compile-flags: -Clink-arg=-nostartfiles <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-apple ======= //@ignore-macos >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-apple +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::empty_loop)] #![feature(lang_items, start, libc)] diff --git a/tests/ui/enum_clike_unportable_variant.rs b/tests/ui/enum_clike_unportable_variant.rs index 31ff6d78b22f..1edc7a488b3c 100644 --- a/tests/ui/enum_clike_unportable_variant.rs +++ b/tests/ui/enum_clike_unportable_variant.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-x86 ======= //@ignore-x86 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-x86 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::enum_clike_unportable_variant)] #![allow(unused, non_upper_case_globals)] diff --git a/tests/ui/eq_op.rs b/tests/ui/eq_op.rs index c34d0126ea6c..f6e9a08b28d3 100644 --- a/tests/ui/eq_op.rs +++ b/tests/ui/eq_op.rs @@ -1,8 +1,11 @@ <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --test >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::eq_op)] #![allow(clippy::double_parens, clippy::identity_op, clippy::nonminimal_bool)] #![allow(clippy::suspicious_xor_used_as_pow)] diff --git a/tests/ui/equatable_if_let.fixed b/tests/ui/equatable_if_let.fixed index 79365dfd6b65..809791151471 100644 --- a/tests/ui/equatable_if_let.fixed +++ b/tests/ui/equatable_if_let.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( unused_variables, diff --git a/tests/ui/equatable_if_let.rs b/tests/ui/equatable_if_let.rs index 898748fbd399..f8918bb09d8d 100644 --- a/tests/ui/equatable_if_let.rs +++ b/tests/ui/equatable_if_let.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( unused_variables, diff --git a/tests/ui/extra_unused_lifetimes.rs b/tests/ui/extra_unused_lifetimes.rs index 53b6e5d243b0..e1c6434311bc 100644 --- a/tests/ui/extra_unused_lifetimes.rs +++ b/tests/ui/extra_unused_lifetimes.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( unused, diff --git a/tests/ui/extra_unused_type_parameters.fixed b/tests/ui/extra_unused_type_parameters.fixed index f324f3512a8b..e043d9683b06 100644 --- a/tests/ui/extra_unused_type_parameters.fixed +++ b/tests/ui/extra_unused_type_parameters.fixed @@ -3,6 +3,7 @@ <<<<<<< HEAD //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD ======= // run-rustfix >>>>>>> 6b95029f1 (Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup) @@ -15,6 +16,8 @@ ======= <<<<<<< HEAD <<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) <<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= @@ -24,11 +27,14 @@ //@aux-build:proc_macros.rs:proc-macro >>>>>>> 5bd97ac17 (Update tests) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused, clippy::needless_lifetimes)] #![warn(clippy::extra_unused_type_parameters)] diff --git a/tests/ui/extra_unused_type_parameters.rs b/tests/ui/extra_unused_type_parameters.rs index 96ed61cbcb9c..500fcedc20e1 100644 --- a/tests/ui/extra_unused_type_parameters.rs +++ b/tests/ui/extra_unused_type_parameters.rs @@ -3,6 +3,7 @@ <<<<<<< HEAD //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD ======= // run-rustfix >>>>>>> 6b95029f1 (Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup) @@ -15,6 +16,8 @@ ======= <<<<<<< HEAD <<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) <<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= @@ -24,11 +27,14 @@ //@aux-build:proc_macros.rs:proc-macro >>>>>>> 5bd97ac17 (Update tests) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused, clippy::needless_lifetimes)] #![warn(clippy::extra_unused_type_parameters)] diff --git a/tests/ui/field_reassign_with_default.rs b/tests/ui/field_reassign_with_default.rs index faddca70a5e9..890e07a316f6 100644 --- a/tests/ui/field_reassign_with_default.rs +++ b/tests/ui/field_reassign_with_default.rs @@ -1,10 +1,15 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::field_reassign_with_default)] diff --git a/tests/ui/for_loop_fixable.fixed b/tests/ui/for_loop_fixable.fixed deleted file mode 100644 index f578c98da153..000000000000 --- a/tests/ui/for_loop_fixable.fixed +++ /dev/null @@ -1,309 +0,0 @@ -//@run-rustfix -#![allow(dead_code, unused)] -#![allow(clippy::uninlined_format_args)] - -use std::collections::*; - -#[warn(clippy::all)] -struct Unrelated(Vec); -impl Unrelated { - fn next(&self) -> std::slice::Iter { - self.0.iter() - } - - fn iter(&self) -> std::slice::Iter { - self.0.iter() - } -} - -#[warn( - clippy::needless_range_loop, - clippy::explicit_iter_loop, - clippy::explicit_into_iter_loop, - clippy::iter_next_loop, - clippy::for_kv_map -)] -#[allow( - clippy::linkedlist, - clippy::unnecessary_mut_passed, - clippy::similar_names, - clippy::needless_borrow -)] -#[allow(unused_variables)] -fn main() { - let mut vec = vec![1, 2, 3, 4]; - - // See #601 - for i in 0..10 { - // no error, id_col does not exist outside the loop - let mut id_col = vec![0f64; 10]; - id_col[i] = 1f64; - } - - for _v in &vec {} - - for _v in &mut vec {} - - let out_vec = vec![1, 2, 3]; - for _v in out_vec {} - - for _v in &vec {} // these are fine - for _v in &mut vec {} // these are fine - - for _v in &[1, 2, 3] {} - - for _v in (&mut [1, 2, 3]).iter() {} // no error - - for _v in &[0; 32] {} - - for _v in [0; 33].iter() {} // no error - - let ll: LinkedList<()> = LinkedList::new(); - for _v in &ll {} - - let vd: VecDeque<()> = VecDeque::new(); - for _v in &vd {} - - let bh: BinaryHeap<()> = BinaryHeap::new(); - for _v in &bh {} - - let hm: HashMap<(), ()> = HashMap::new(); - for _v in &hm {} - - let bt: BTreeMap<(), ()> = BTreeMap::new(); - for _v in &bt {} - - let hs: HashSet<()> = HashSet::new(); - for _v in &hs {} - - let bs: BTreeSet<()> = BTreeSet::new(); - for _v in &bs {} - - let u = Unrelated(vec![]); - for _v in u.next() {} // no error - for _v in u.iter() {} // no error - - let mut out = vec![]; - vec.iter().cloned().map(|x| out.push(x)).collect::>(); - let _y = vec.iter().cloned().map(|x| out.push(x)).collect::>(); // this is fine - - // Loop with explicit counter variable - - // Potential false positives - let mut _index = 0; - _index = 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - _index += 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - if true { - _index = 1 - } - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - let mut _index = 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index += 1; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index *= 2; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index = 1; - _index += 1 - } - - let mut _index = 0; - - for _v in &vec { - let mut _index = 0; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index += 1; - _index = 0; - } - - let mut _index = 0; - for _v in &vec { - for _x in 0..1 { - _index += 1; - } - _index += 1 - } - - let mut _index = 0; - for x in &vec { - if *x == 1 { - _index += 1 - } - } - - let mut _index = 0; - if true { - _index = 1 - }; - for _v in &vec { - _index += 1 - } - - let mut _index = 1; - if false { - _index = 0 - }; - for _v in &vec { - _index += 1 - } - - let mut index = 0; - { - let mut _x = &mut index; - } - for _v in &vec { - _index += 1 - } - - let mut index = 0; - for _v in &vec { - index += 1 - } - println!("index: {}", index); - - fn f(_: &T, _: &T) -> bool { - unimplemented!() - } - fn g(_: &mut [T], _: usize, _: usize) { - unimplemented!() - } - for i in 1..vec.len() { - if f(&vec[i - 1], &vec[i]) { - g(&mut vec, i - 1, i); - } - } - - for mid in 1..vec.len() { - let (_, _) = vec.split_at(mid); - } -} - -fn partition(v: &mut [T]) -> usize { - let pivot = v.len() - 1; - let mut i = 0; - for j in 0..pivot { - if v[j] <= v[pivot] { - v.swap(i, j); - i += 1; - } - } - v.swap(i, pivot); - i -} - -#[warn(clippy::needless_range_loop)] -pub fn manual_copy_same_destination(dst: &mut [i32], d: usize, s: usize) { - // Same source and destination - don't trigger lint - for i in 0..dst.len() { - dst[d + i] = dst[s + i]; - } -} - -mod issue_2496 { - pub trait Handle { - fn new_for_index(index: usize) -> Self; - fn index(&self) -> usize; - } - - pub fn test() -> H { - for x in 0..5 { - let next_handle = H::new_for_index(x); - println!("{}", next_handle.index()); - } - unimplemented!() - } -} - -// explicit_into_iter_loop bad suggestions -#[warn(clippy::explicit_into_iter_loop, clippy::explicit_iter_loop)] -mod issue_4958 { - fn takes_iterator(iterator: &T) - where - for<'a> &'a T: IntoIterator, - { - for i in iterator { - println!("{}", i); - } - } - - struct T; - impl IntoIterator for &T { - type Item = (); - type IntoIter = std::vec::IntoIter; - fn into_iter(self) -> Self::IntoIter { - vec![].into_iter() - } - } - - fn more_tests() { - let t = T; - let r = &t; - let rr = &&t; - - // This case is handled by `explicit_iter_loop`. No idea why. - for _ in &t {} - - for _ in r {} - - // No suggestion for this. - // We'd have to suggest `for _ in *rr {}` which is less clear. - for _ in rr.into_iter() {} - } -} - -// explicit_into_iter_loop -#[warn(clippy::explicit_into_iter_loop)] -mod issue_6900 { - struct S; - impl S { - #[allow(clippy::should_implement_trait)] - pub fn into_iter(self) -> I { - unimplemented!() - } - } - - struct I(T); - impl Iterator for I { - type Item = T; - fn next(&mut self) -> Option { - unimplemented!() - } - } - - fn f() { - for _ in S.into_iter::() { - unimplemented!() - } - } -} diff --git a/tests/ui/for_loop_fixable.rs b/tests/ui/for_loop_fixable.rs deleted file mode 100644 index 42bc6de0c7dd..000000000000 --- a/tests/ui/for_loop_fixable.rs +++ /dev/null @@ -1,309 +0,0 @@ -//@run-rustfix -#![allow(dead_code, unused)] -#![allow(clippy::uninlined_format_args)] - -use std::collections::*; - -#[warn(clippy::all)] -struct Unrelated(Vec); -impl Unrelated { - fn next(&self) -> std::slice::Iter { - self.0.iter() - } - - fn iter(&self) -> std::slice::Iter { - self.0.iter() - } -} - -#[warn( - clippy::needless_range_loop, - clippy::explicit_iter_loop, - clippy::explicit_into_iter_loop, - clippy::iter_next_loop, - clippy::for_kv_map -)] -#[allow( - clippy::linkedlist, - clippy::unnecessary_mut_passed, - clippy::similar_names, - clippy::needless_borrow -)] -#[allow(unused_variables)] -fn main() { - let mut vec = vec![1, 2, 3, 4]; - - // See #601 - for i in 0..10 { - // no error, id_col does not exist outside the loop - let mut id_col = vec![0f64; 10]; - id_col[i] = 1f64; - } - - for _v in vec.iter() {} - - for _v in vec.iter_mut() {} - - let out_vec = vec![1, 2, 3]; - for _v in out_vec.into_iter() {} - - for _v in &vec {} // these are fine - for _v in &mut vec {} // these are fine - - for _v in [1, 2, 3].iter() {} - - for _v in (&mut [1, 2, 3]).iter() {} // no error - - for _v in [0; 32].iter() {} - - for _v in [0; 33].iter() {} // no error - - let ll: LinkedList<()> = LinkedList::new(); - for _v in ll.iter() {} - - let vd: VecDeque<()> = VecDeque::new(); - for _v in vd.iter() {} - - let bh: BinaryHeap<()> = BinaryHeap::new(); - for _v in bh.iter() {} - - let hm: HashMap<(), ()> = HashMap::new(); - for _v in hm.iter() {} - - let bt: BTreeMap<(), ()> = BTreeMap::new(); - for _v in bt.iter() {} - - let hs: HashSet<()> = HashSet::new(); - for _v in hs.iter() {} - - let bs: BTreeSet<()> = BTreeSet::new(); - for _v in bs.iter() {} - - let u = Unrelated(vec![]); - for _v in u.next() {} // no error - for _v in u.iter() {} // no error - - let mut out = vec![]; - vec.iter().cloned().map(|x| out.push(x)).collect::>(); - let _y = vec.iter().cloned().map(|x| out.push(x)).collect::>(); // this is fine - - // Loop with explicit counter variable - - // Potential false positives - let mut _index = 0; - _index = 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - _index += 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - if true { - _index = 1 - } - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - let mut _index = 1; - for _v in &vec { - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index += 1; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index *= 2; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index = 1; - _index += 1 - } - - let mut _index = 0; - - for _v in &vec { - let mut _index = 0; - _index += 1 - } - - let mut _index = 0; - for _v in &vec { - _index += 1; - _index = 0; - } - - let mut _index = 0; - for _v in &vec { - for _x in 0..1 { - _index += 1; - } - _index += 1 - } - - let mut _index = 0; - for x in &vec { - if *x == 1 { - _index += 1 - } - } - - let mut _index = 0; - if true { - _index = 1 - }; - for _v in &vec { - _index += 1 - } - - let mut _index = 1; - if false { - _index = 0 - }; - for _v in &vec { - _index += 1 - } - - let mut index = 0; - { - let mut _x = &mut index; - } - for _v in &vec { - _index += 1 - } - - let mut index = 0; - for _v in &vec { - index += 1 - } - println!("index: {}", index); - - fn f(_: &T, _: &T) -> bool { - unimplemented!() - } - fn g(_: &mut [T], _: usize, _: usize) { - unimplemented!() - } - for i in 1..vec.len() { - if f(&vec[i - 1], &vec[i]) { - g(&mut vec, i - 1, i); - } - } - - for mid in 1..vec.len() { - let (_, _) = vec.split_at(mid); - } -} - -fn partition(v: &mut [T]) -> usize { - let pivot = v.len() - 1; - let mut i = 0; - for j in 0..pivot { - if v[j] <= v[pivot] { - v.swap(i, j); - i += 1; - } - } - v.swap(i, pivot); - i -} - -#[warn(clippy::needless_range_loop)] -pub fn manual_copy_same_destination(dst: &mut [i32], d: usize, s: usize) { - // Same source and destination - don't trigger lint - for i in 0..dst.len() { - dst[d + i] = dst[s + i]; - } -} - -mod issue_2496 { - pub trait Handle { - fn new_for_index(index: usize) -> Self; - fn index(&self) -> usize; - } - - pub fn test() -> H { - for x in 0..5 { - let next_handle = H::new_for_index(x); - println!("{}", next_handle.index()); - } - unimplemented!() - } -} - -// explicit_into_iter_loop bad suggestions -#[warn(clippy::explicit_into_iter_loop, clippy::explicit_iter_loop)] -mod issue_4958 { - fn takes_iterator(iterator: &T) - where - for<'a> &'a T: IntoIterator, - { - for i in iterator.into_iter() { - println!("{}", i); - } - } - - struct T; - impl IntoIterator for &T { - type Item = (); - type IntoIter = std::vec::IntoIter; - fn into_iter(self) -> Self::IntoIter { - vec![].into_iter() - } - } - - fn more_tests() { - let t = T; - let r = &t; - let rr = &&t; - - // This case is handled by `explicit_iter_loop`. No idea why. - for _ in t.into_iter() {} - - for _ in r.into_iter() {} - - // No suggestion for this. - // We'd have to suggest `for _ in *rr {}` which is less clear. - for _ in rr.into_iter() {} - } -} - -// explicit_into_iter_loop -#[warn(clippy::explicit_into_iter_loop)] -mod issue_6900 { - struct S; - impl S { - #[allow(clippy::should_implement_trait)] - pub fn into_iter(self) -> I { - unimplemented!() - } - } - - struct I(T); - impl Iterator for I { - type Item = T; - fn next(&mut self) -> Option { - unimplemented!() - } - } - - fn f() { - for _ in S.into_iter::() { - unimplemented!() - } - } -} diff --git a/tests/ui/implicit_hasher.rs b/tests/ui/implicit_hasher.rs index 19cbbed4bb45..cc0751908e1f 100644 --- a/tests/ui/implicit_hasher.rs +++ b/tests/ui/implicit_hasher.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![deny(clippy::implicit_hasher)] #![allow(unused)] diff --git a/tests/ui/inconsistent_struct_constructor.fixed b/tests/ui/inconsistent_struct_constructor.fixed index 6571e1a82adc..094f9eb7708e 100644 --- a/tests/ui/inconsistent_struct_constructor.fixed +++ b/tests/ui/inconsistent_struct_constructor.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::inconsistent_struct_constructor)] #![allow(clippy::redundant_field_names)] diff --git a/tests/ui/inconsistent_struct_constructor.rs b/tests/ui/inconsistent_struct_constructor.rs index 4e6e5bcfeb4f..6215d9b050e8 100644 --- a/tests/ui/inconsistent_struct_constructor.rs +++ b/tests/ui/inconsistent_struct_constructor.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::inconsistent_struct_constructor)] #![allow(clippy::redundant_field_names)] diff --git a/tests/ui/integer_arithmetic.stderr b/tests/ui/integer_arithmetic.stderr deleted file mode 100644 index add3b6b90fa2..000000000000 --- a/tests/ui/integer_arithmetic.stderr +++ /dev/null @@ -1,169 +0,0 @@ -error: this operation will panic at runtime - --> $DIR/integer_arithmetic.rs:37:5 - | -LL | i /= 0; - | ^^^^^^ attempt to divide `_` by zero - | - = note: `#[deny(unconditional_panic)]` on by default - -error: this operation will panic at runtime - --> $DIR/integer_arithmetic.rs:42:5 - | -LL | i %= 0; - | ^^^^^^ attempt to calculate the remainder of `_` with a divisor of zero - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:16:5 - | -LL | 1 + i; - | ^^^^^ - | - = note: `-D clippy::integer-arithmetic` implied by `-D warnings` - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:17:5 - | -LL | i * 2; - | ^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:18:5 - | -LL | / 1 % -LL | | i / 2; // no error, this is part of the expression in the preceding line - | |_____^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:20:5 - | -LL | i - 2 + 2 - i; - | ^^^^^^^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:21:5 - | -LL | -i; - | ^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:22:5 - | -LL | i >> 1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:23:5 - | -LL | i << 1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:33:5 - | -LL | i += 1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:34:5 - | -LL | i -= 1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:35:5 - | -LL | i *= 2; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:38:11 - | -LL | i /= -1; - | ^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:39:5 - | -LL | i /= var1; - | ^^^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:40:5 - | -LL | i /= var2; - | ^^^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:43:11 - | -LL | i %= -1; - | ^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:44:5 - | -LL | i %= var1; - | ^^^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:45:5 - | -LL | i %= var2; - | ^^^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:46:5 - | -LL | i <<= 3; - | ^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:47:5 - | -LL | i >>= 2; - | ^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:89:5 - | -LL | 3 + &1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:90:5 - | -LL | &3 + 1; - | ^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:91:5 - | -LL | &3 + &1; - | ^^^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:96:5 - | -LL | a + x - | ^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:100:5 - | -LL | x + y - | ^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:104:5 - | -LL | x + y - | ^^^^^ - -error: integer arithmetic detected - --> $DIR/integer_arithmetic.rs:108:5 - | -LL | (&x + &y) - | ^^^^^^^^^ - -error: aborting due to 27 previous errors - diff --git a/tests/ui/items_after_test_module/block_module.stderr b/tests/ui/items_after_test_module/block_module.stderr index c9ce5d2103b1..f31db617eb25 100644 --- a/tests/ui/items_after_test_module/block_module.stderr +++ b/tests/ui/items_after_test_module/block_module.stderr @@ -1,5 +1,6 @@ <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= error: Option 'test' given more than once ======= @@ -63,4 +64,7 @@ error: Option 'test' given more than once ======= >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +error: Option 'test' given more than once +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/tests/ui/large_enum_variant.rs b/tests/ui/large_enum_variant.rs index 7bea57c1f9b1..9297b66d025a 100644 --- a/tests/ui/large_enum_variant.rs +++ b/tests/ui/large_enum_variant.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/let_underscore_untyped.rs b/tests/ui/let_underscore_untyped.rs index c248d2811b99..dc119b94e838 100644 --- a/tests/ui/let_underscore_untyped.rs +++ b/tests/ui/let_underscore_untyped.rs @@ -48,6 +48,9 @@ fn g() -> impl Fn() { } <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) with_span!( span @@ -56,8 +59,11 @@ with_span!( } ); +<<<<<<< HEAD ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { let _ = a(); let _ = b(1); @@ -66,10 +72,14 @@ fn main() { let _ = e(); let _ = f(); let _ = g(); +<<<<<<< HEAD <<<<<<< HEAD let closure = || {}; ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= + let closure = || {}; +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) _ = a(); _ = b(1); diff --git a/tests/ui/let_underscore_untyped.stderr b/tests/ui/let_underscore_untyped.stderr index 42404b3f9d49..8118de9110d2 100644 --- a/tests/ui/let_underscore_untyped.stderr +++ b/tests/ui/let_underscore_untyped.stderr @@ -1,19 +1,27 @@ error: non-binding `let` without a type annotation +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/let_underscore_untyped.rs:51:5 ======= --> $DIR/let_underscore_untyped.rs:36:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/let_underscore_untyped.rs:51:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = a(); | ^^^^^^^^^^^^ | help: consider adding a type annotation +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/let_underscore_untyped.rs:51:10 ======= --> $DIR/let_underscore_untyped.rs:36:10 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/let_underscore_untyped.rs:51:10 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = a(); | ^ @@ -21,6 +29,7 @@ LL | let _ = a(); error: non-binding `let` without a type annotation <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/let_underscore_untyped.rs:37:5 <<<<<<< HEAD @@ -72,41 +81,45 @@ error: non-binding `let` without a type annotation --> $DIR/let_underscore_untyped.rs:41:5 <<<<<<< HEAD >>>>>>> a1b75c510 (Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup) +======= + --> $DIR/let_underscore_untyped.rs:52:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = b(1); | ^^^^^^^^^^^^^ | help: consider adding a type annotation - --> $DIR/let_underscore_untyped.rs:37:10 + --> $DIR/let_underscore_untyped.rs:52:10 | LL | let _ = b(1); | ^ error: non-binding `let` without a type annotation - --> $DIR/let_underscore_untyped.rs:39:5 + --> $DIR/let_underscore_untyped.rs:54:5 | LL | let _ = d(&1); | ^^^^^^^^^^^^^^ | help: consider adding a type annotation - --> $DIR/let_underscore_untyped.rs:39:10 + --> $DIR/let_underscore_untyped.rs:54:10 | LL | let _ = d(&1); | ^ error: non-binding `let` without a type annotation - --> $DIR/let_underscore_untyped.rs:40:5 + --> $DIR/let_underscore_untyped.rs:55:5 | LL | let _ = e(); | ^^^^^^^^^^^^ | help: consider adding a type annotation - --> $DIR/let_underscore_untyped.rs:40:10 + --> $DIR/let_underscore_untyped.rs:55:10 | LL | let _ = e(); | ^ error: non-binding `let` without a type annotation +<<<<<<< HEAD --> $DIR/let_underscore_untyped.rs:41:5 ======= >>>>>>> bdd05456b (Ignore `impl Trait`(s)) @@ -155,16 +168,23 @@ LL | let _ = e(); error: non-binding `let` without a type annotation --> $DIR/let_underscore_untyped.rs:41:5 >>>>>>> 4da6e7e06 (rebase attempt) +======= + --> $DIR/let_underscore_untyped.rs:56:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = f(); | ^^^^^^^^^^^^ | help: consider adding a type annotation +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/let_underscore_untyped.rs:56:10 ======= --> $DIR/let_underscore_untyped.rs:41:10 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/let_underscore_untyped.rs:56:10 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _ = f(); | ^ diff --git a/tests/ui/macro_use_imports.fixed b/tests/ui/macro_use_imports.fixed index 1de021e0687f..332378e57431 100644 --- a/tests/ui/macro_use_imports.fixed +++ b/tests/ui/macro_use_imports.fixed @@ -1,10 +1,14 @@ //@aux-build:macro_rules.rs //@aux-build:macro_use_helper.rs <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix //@ignore-32bit diff --git a/tests/ui/macro_use_imports.rs b/tests/ui/macro_use_imports.rs index 0402c0617638..1a28d6a74c79 100644 --- a/tests/ui/macro_use_imports.rs +++ b/tests/ui/macro_use_imports.rs @@ -1,10 +1,14 @@ //@aux-build:macro_rules.rs //@aux-build:macro_use_helper.rs <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix //@ignore-32bit diff --git a/tests/ui/macro_use_imports.stderr b/tests/ui/macro_use_imports.stderr index 4abbbef2ca6f..fe22dff979eb 100644 --- a/tests/ui/macro_use_imports.stderr +++ b/tests/ui/macro_use_imports.stderr @@ -17,6 +17,9 @@ error: `macro_use` attributes are no longer needed in the Rust 2018 edition | LL | #[macro_use] <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::inner::nested::string_add;` error: `macro_use` attributes are no longer needed in the Rust 2018 edition @@ -24,9 +27,12 @@ error: `macro_use` attributes are no longer needed in the Rust 2018 edition | LL | #[macro_use] | ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mini_mac::ClippyMiniMacroTest;` +<<<<<<< HEAD ======= | ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{pub_macro, inner_mod_macro, function_macro, ty_macro, pub_in_private_macro};` >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: aborting due to 4 previous errors diff --git a/tests/ui/macro_use_imports_expect.rs b/tests/ui/macro_use_imports_expect.rs index e09fc5f99939..d367b4273bfa 100644 --- a/tests/ui/macro_use_imports_expect.rs +++ b/tests/ui/macro_use_imports_expect.rs @@ -1,10 +1,14 @@ //@aux-build:macro_rules.rs //@aux-build:macro_use_helper.rs <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@ignore-32bit #![feature(lint_reasons)] diff --git a/tests/ui/manual_rem_euclid.fixed b/tests/ui/manual_rem_euclid.fixed index a3938ee95abb..34f114591ec3 100644 --- a/tests/ui/manual_rem_euclid.fixed +++ b/tests/ui/manual_rem_euclid.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::manual_rem_euclid)] #![allow(clippy::let_with_type_underscore)] diff --git a/tests/ui/manual_rem_euclid.rs b/tests/ui/manual_rem_euclid.rs index 4c7473434c45..994faaf486ec 100644 --- a/tests/ui/manual_rem_euclid.rs +++ b/tests/ui/manual_rem_euclid.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::manual_rem_euclid)] #![allow(clippy::let_with_type_underscore)] diff --git a/tests/ui/manual_slice_size_calculation.fixed b/tests/ui/manual_slice_size_calculation.fixed index 11cb7de1886d..64106687a3e0 100644 --- a/tests/ui/manual_slice_size_calculation.fixed +++ b/tests/ui/manual_slice_size_calculation.fixed @@ -14,8 +14,12 @@ <<<<<<< HEAD <<<<<<< HEAD //@run-rustfix +<<<<<<< HEAD //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::manual_slice_size_calculation)] diff --git a/tests/ui/manual_slice_size_calculation.rs b/tests/ui/manual_slice_size_calculation.rs index 7e60e3f5ec2d..efcf52a7ff38 100644 --- a/tests/ui/manual_slice_size_calculation.rs +++ b/tests/ui/manual_slice_size_calculation.rs @@ -20,6 +20,7 @@ >>>>>>> 2f4f798f9 (Ignore `manual_slice_size_calculation` in code from macro expansions) ======= //@run-rustfix +<<<<<<< HEAD //@aux-build:proc_macros.rs >>>>>>> def1705a2 (Update to a compiletest-rs version that requires `//@` for commands) ======= @@ -55,6 +56,9 @@ >>>>>>> def1705a2 (Update to a compiletest-rs version that requires `//@` for commands) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::manual_slice_size_calculation)] diff --git a/tests/ui/mem_replace_macro.rs b/tests/ui/mem_replace_macro.rs index aae073a09690..ab5826a8e50c 100644 --- a/tests/ui/mem_replace_macro.rs +++ b/tests/ui/mem_replace_macro.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::mem_replace_with_default)] extern crate proc_macros; diff --git a/tests/ui/missing_const_for_fn/cant_be_const.rs b/tests/ui/missing_const_for_fn/cant_be_const.rs index 2ad28ed4b8eb..708d45406c9e 100644 --- a/tests/ui/missing_const_for_fn/cant_be_const.rs +++ b/tests/ui/missing_const_for_fn/cant_be_const.rs @@ -4,10 +4,14 @@ //@aux-build:helper.rs <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:../auxiliary/proc_macros.rs:proc-macro ======= //@aux-build:../../auxiliary/proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:../auxiliary/proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::missing_const_for_fn)] #![feature(start)] diff --git a/tests/ui/missing_doc.rs b/tests/ui/missing_doc.rs index 7ac91d352f38..2451b1d408f1 100644 --- a/tests/ui/missing_doc.rs +++ b/tests/ui/missing_doc.rs @@ -1,9 +1,13 @@ //@needs-asm-support <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::missing_docs_in_private_items)] // When denying at the crate level, be sure to not get random warnings from the diff --git a/tests/ui/missing_doc_impl.rs b/tests/ui/missing_doc_impl.rs index e82c111ac831..9f1ddc14efc1 100644 --- a/tests/ui/missing_doc_impl.rs +++ b/tests/ui/missing_doc_impl.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::missing_docs_in_private_items)] #![allow(dead_code)] diff --git a/tests/ui/mistyped_literal_suffix.fixed b/tests/ui/mistyped_literal_suffix.fixed index 3cb1ee05f094..aaaab51554d1 100644 --- a/tests/ui/mistyped_literal_suffix.fixed +++ b/tests/ui/mistyped_literal_suffix.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( dead_code, diff --git a/tests/ui/mistyped_literal_suffix.rs b/tests/ui/mistyped_literal_suffix.rs index 4ea006c870cc..07126d0f692c 100644 --- a/tests/ui/mistyped_literal_suffix.rs +++ b/tests/ui/mistyped_literal_suffix.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow( dead_code, diff --git a/tests/ui/multiple_unsafe_ops_per_block.rs b/tests/ui/multiple_unsafe_ops_per_block.rs index 78390e652428..b99a2119e9a8 100644 --- a/tests/ui/multiple_unsafe_ops_per_block.rs +++ b/tests/ui/multiple_unsafe_ops_per_block.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![allow(deref_nullptr)] #![allow(clippy::unnecessary_operation)] diff --git a/tests/ui/must_use_unit.fixed b/tests/ui/must_use_unit.fixed index 9cd90d56306c..b932726e094c 100644 --- a/tests/ui/must_use_unit.fixed +++ b/tests/ui/must_use_unit.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::must_use_unit)] #![allow(clippy::unused_unit)] diff --git a/tests/ui/must_use_unit.rs b/tests/ui/must_use_unit.rs index e37fcd68308e..7b10becc1a74 100644 --- a/tests/ui/must_use_unit.rs +++ b/tests/ui/must_use_unit.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::must_use_unit)] #![allow(clippy::unused_unit)] diff --git a/tests/ui/mut_mut.rs b/tests/ui/mut_mut.rs index 5c4e70c3072b..b65b19629762 100644 --- a/tests/ui/mut_mut.rs +++ b/tests/ui/mut_mut.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::mut_mut)] #![allow(unused)] #![allow( diff --git a/tests/ui/needless_arbitrary_self_type_unfixable.rs b/tests/ui/needless_arbitrary_self_type_unfixable.rs index a42bc298d32f..b5ead6675a5e 100644 --- a/tests/ui/needless_arbitrary_self_type_unfixable.rs +++ b/tests/ui/needless_arbitrary_self_type_unfixable.rs @@ -1,4 +1,7 @@ <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@aux-build:proc_macro_attr.rs:proc-macro <<<<<<< HEAD // Flaky test, see https://github.com/rust-lang/rust/issues/113585. @@ -6,9 +9,12 @@ //@ignore-64bit ======= >>>>>>> 5bd97ac17 (Update tests) +<<<<<<< HEAD ======= //@aux-build:proc_macro_attr.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::needless_arbitrary_self_type)] diff --git a/tests/ui/needless_bool/fixable.stderr b/tests/ui/needless_bool/fixable.stderr index f9c842970f7b..de45df19a68e 100644 --- a/tests/ui/needless_bool/fixable.stderr +++ b/tests/ui/needless_bool/fixable.stderr @@ -91,11 +91,15 @@ LL | | }; | |_____^ help: you can reduce it to: `a < b` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:113:5 ======= --> $DIR/fixable.rs:112:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:113:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / if x { LL | | return true; @@ -105,11 +109,15 @@ LL | | }; | |_____^ help: you can reduce it to: `return x` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:121:5 ======= --> $DIR/fixable.rs:120:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:121:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / if x { LL | | return false; @@ -119,11 +127,15 @@ LL | | }; | |_____^ help: you can reduce it to: `return !x` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:129:5 ======= --> $DIR/fixable.rs:128:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:129:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / if x && y { LL | | return true; @@ -133,11 +145,15 @@ LL | | }; | |_____^ help: you can reduce it to: `return x && y` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:137:5 ======= --> $DIR/fixable.rs:136:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:137:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / if x && y { LL | | return false; @@ -147,11 +163,15 @@ LL | | }; | |_____^ help: you can reduce it to: `return !(x && y)` error: equality checks against true are unnecessary +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:145:8 ======= --> $DIR/fixable.rs:144:8 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:145:8 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if x == true {}; | ^^^^^^^^^ help: try simplifying it as shown: `x` @@ -159,41 +179,57 @@ LL | if x == true {}; = note: `-D clippy::bool-comparison` implied by `-D warnings` error: equality checks against false can be replaced by a negation +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:149:8 ======= --> $DIR/fixable.rs:148:8 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:149:8 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if x == false {}; | ^^^^^^^^^^ help: try simplifying it as shown: `!x` error: equality checks against true are unnecessary +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:159:8 ======= --> $DIR/fixable.rs:158:8 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:159:8 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if x == true {}; | ^^^^^^^^^ help: try simplifying it as shown: `x` error: equality checks against false can be replaced by a negation +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:160:8 ======= --> $DIR/fixable.rs:159:8 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:160:8 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if x == false {}; | ^^^^^^^^^^ help: try simplifying it as shown: `!x` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:169:12 ======= --> $DIR/fixable.rs:168:12 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:169:12 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | } else if returns_bool() { | ____________^ @@ -204,11 +240,15 @@ LL | | }; | |_____^ help: you can reduce it to: `{ !returns_bool() }` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:182:5 ======= --> $DIR/fixable.rs:181:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:182:5 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / if unsafe { no(4) } & 1 != 0 { LL | | true @@ -218,21 +258,29 @@ LL | | }; | |_____^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:187:30 ======= --> $DIR/fixable.rs:186:30 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:187:30 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | let _brackets_unneeded = if unsafe { no(4) } & 1 != 0 { true } else { false }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `unsafe { no(4) } & 1 != 0` error: this if-then-else expression returns a bool literal +<<<<<<< HEAD <<<<<<< HEAD --> $DIR/fixable.rs:190:9 ======= --> $DIR/fixable.rs:189:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= + --> $DIR/fixable.rs:190:9 +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if unsafe { no(4) } & 1 != 0 { true } else { false } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `(unsafe { no(4) } & 1 != 0)` diff --git a/tests/ui/needless_late_init.fixed b/tests/ui/needless_late_init.fixed index 6b40595a8946..9391e82739f2 100644 --- a/tests/ui/needless_late_init.fixed +++ b/tests/ui/needless_late_init.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(let_chains)] #![allow(unused)] #![allow( diff --git a/tests/ui/needless_late_init.rs b/tests/ui/needless_late_init.rs index 3a3f5223d18d..31a70b6605e2 100644 --- a/tests/ui/needless_late_init.rs +++ b/tests/ui/needless_late_init.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(let_chains)] #![allow(unused)] #![allow( diff --git a/tests/ui/needless_lifetimes.fixed b/tests/ui/needless_lifetimes.fixed index 471003ff4259..578d3cb585b2 100644 --- a/tests/ui/needless_lifetimes.fixed +++ b/tests/ui/needless_lifetimes.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::needless_lifetimes)] #![allow( diff --git a/tests/ui/needless_lifetimes.rs b/tests/ui/needless_lifetimes.rs index 32b4a49b8768..9ef4c8451c84 100644 --- a/tests/ui/needless_lifetimes.rs +++ b/tests/ui/needless_lifetimes.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::needless_lifetimes)] #![allow( diff --git a/tests/ui/non_octal_unix_permissions.fixed b/tests/ui/non_octal_unix_permissions.fixed index e7ca71a325d0..530dc0a095e9 100644 --- a/tests/ui/non_octal_unix_permissions.fixed +++ b/tests/ui/non_octal_unix_permissions.fixed @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-windows ======= //@ignore-windows >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-windows +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::non_octal_unix_permissions)] use std::fs::{DirBuilder, File, OpenOptions, Permissions}; diff --git a/tests/ui/non_octal_unix_permissions.rs b/tests/ui/non_octal_unix_permissions.rs index 20a562ecaed5..80ea06c26f03 100644 --- a/tests/ui/non_octal_unix_permissions.rs +++ b/tests/ui/non_octal_unix_permissions.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@ignore-target-windows ======= //@ignore-windows >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@ignore-target-windows +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::non_octal_unix_permissions)] use std::fs::{DirBuilder, File, OpenOptions, Permissions}; diff --git a/tests/ui/nonminimal_bool_methods.fixed b/tests/ui/nonminimal_bool_methods.fixed index fbeaba14b120..31659fe28d94 100644 --- a/tests/ui/nonminimal_bool_methods.fixed +++ b/tests/ui/nonminimal_bool_methods.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(unused, clippy::diverging_sub_expression, clippy::needless_if)] ======= #![allow(unused, clippy::diverging_sub_expression)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(unused, clippy::diverging_sub_expression, clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::nonminimal_bool)] fn methods_with_negation() { diff --git a/tests/ui/nonminimal_bool_methods.rs b/tests/ui/nonminimal_bool_methods.rs index e475f46f18f9..208217380785 100644 --- a/tests/ui/nonminimal_bool_methods.rs +++ b/tests/ui/nonminimal_bool_methods.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(unused, clippy::diverging_sub_expression, clippy::needless_if)] ======= #![allow(unused, clippy::diverging_sub_expression)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(unused, clippy::diverging_sub_expression, clippy::needless_if)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::nonminimal_bool)] fn methods_with_negation() { diff --git a/tests/ui/option_env_unwrap.rs b/tests/ui/option_env_unwrap.rs index 9e1964b57ec3..276035391e05 100644 --- a/tests/ui/option_env_unwrap.rs +++ b/tests/ui/option_env_unwrap.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::option_env_unwrap)] #![allow(clippy::map_flatten)] diff --git a/tests/ui/patterns.fixed b/tests/ui/patterns.fixed index 5b2a32f201c6..f149741a950c 100644 --- a/tests/ui/patterns.fixed +++ b/tests/ui/patterns.fixed @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::all)] #![allow(unused)] #![allow(clippy::uninlined_format_args)] diff --git a/tests/ui/patterns.rs b/tests/ui/patterns.rs index 5c2a21521323..70dd3bc2a222 100644 --- a/tests/ui/patterns.rs +++ b/tests/ui/patterns.rs @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::all)] #![allow(unused)] #![allow(clippy::uninlined_format_args)] diff --git a/tests/ui/ptr_as_ptr.fixed b/tests/ui/ptr_as_ptr.fixed index 0ee8fe9487e6..555db22649f7 100644 --- a/tests/ui/ptr_as_ptr.fixed +++ b/tests/ui/ptr_as_ptr.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::ptr_as_ptr)] diff --git a/tests/ui/ptr_as_ptr.rs b/tests/ui/ptr_as_ptr.rs index b3d84eb6e891..bbdc3f581c92 100644 --- a/tests/ui/ptr_as_ptr.rs +++ b/tests/ui/ptr_as_ptr.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::ptr_as_ptr)] diff --git a/tests/ui/ptr_offset_with_cast.fixed b/tests/ui/ptr_offset_with_cast.fixed index cc3313b93005..809f41237257 100644 --- a/tests/ui/ptr_offset_with_cast.fixed +++ b/tests/ui/ptr_offset_with_cast.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::unnecessary_cast, clippy::useless_vec)] ======= #![allow(clippy::unnecessary_cast)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::unnecessary_cast, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { let vec = vec![b'a', b'b', b'c']; diff --git a/tests/ui/ptr_offset_with_cast.rs b/tests/ui/ptr_offset_with_cast.rs index 54944342e26e..4686fe9954ff 100644 --- a/tests/ui/ptr_offset_with_cast.rs +++ b/tests/ui/ptr_offset_with_cast.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::unnecessary_cast, clippy::useless_vec)] ======= #![allow(clippy::unnecessary_cast)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::unnecessary_cast, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() { let vec = vec![b'a', b'b', b'c']; diff --git a/tests/ui/question_mark.fixed b/tests/ui/question_mark.fixed index 93ee3fad2212..52753d6420c8 100644 --- a/tests/ui/question_mark.fixed +++ b/tests/ui/question_mark.fixed @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![feature(try_blocks)] ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![feature(try_blocks)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unreachable_code)] #![allow(dead_code)] #![allow(clippy::unnecessary_wraps)] diff --git a/tests/ui/question_mark.rs b/tests/ui/question_mark.rs index 3322bc2f3989..62ad1e3b7651 100644 --- a/tests/ui/question_mark.rs +++ b/tests/ui/question_mark.rs @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![feature(try_blocks)] ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![feature(try_blocks)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unreachable_code)] #![allow(dead_code)] #![allow(clippy::unnecessary_wraps)] diff --git a/tests/ui/redundant_pattern_matching_option.stderr b/tests/ui/redundant_pattern_matching_option.stderr index 93f9de315812..6dc593f424e2 100644 --- a/tests/ui/redundant_pattern_matching_option.stderr +++ b/tests/ui/redundant_pattern_matching_option.stderr @@ -117,6 +117,9 @@ error: redundant pattern matching, consider using `is_some()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:70:12 ======= --> $DIR/redundant_pattern_matching_option.rs:68:12 @@ -127,6 +130,7 @@ error: redundant pattern matching, consider using `is_some()` ======= --> $DIR/redundant_pattern_matching_option.rs:70:12 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD | LL | if let Some(..) = gen_opt() {} | -------^^^^^^^^------------ help: try: `if gen_opt().is_some()` @@ -147,13 +151,31 @@ error: redundant pattern matching, consider using `is_some()` >>>>>>> 26f50395b (Add `needless_if` lint) ======= --> $DIR/redundant_pattern_matching_option.rs:67:12 +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if let Some(..) = gen_opt() {} - | -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()` + | -------^^^^^^^^------------ help: try: `if gen_opt().is_some()` error: redundant pattern matching, consider using `is_some()` +<<<<<<< HEAD --> $DIR/redundant_pattern_matching_option.rs:82:12 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +<<<<<<< HEAD +<<<<<<< HEAD +<<<<<<< HEAD + --> $DIR/redundant_pattern_matching_option.rs:85:12 +======= + --> $DIR/redundant_pattern_matching_option.rs:83:12 +>>>>>>> afa2741e6 (redundant_pattern_matching) +======= + --> $DIR/redundant_pattern_matching_option.rs:84:12 +>>>>>>> 0b507c6f0 (redundant pattern matches! result) +======= + --> $DIR/redundant_pattern_matching_option.rs:85:12 +>>>>>>> 26f50395b (Add `needless_if` lint) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if let Some(_) = Some(42) {} | -------^^^^^^^----------- help: try: `if Some(42).is_some()` @@ -163,6 +185,9 @@ error: redundant pattern matching, consider using `is_none()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:87:12 ======= --> $DIR/redundant_pattern_matching_option.rs:85:12 @@ -173,9 +198,12 @@ error: redundant pattern matching, consider using `is_none()` ======= --> $DIR/redundant_pattern_matching_option.rs:87:12 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:84:12 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if let None = None::<()> {} | -------^^^^------------- help: try: `if None::<()>.is_none()` @@ -185,6 +213,9 @@ error: redundant pattern matching, consider using `is_some()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:89:15 ======= --> $DIR/redundant_pattern_matching_option.rs:87:15 @@ -195,9 +226,12 @@ error: redundant pattern matching, consider using `is_some()` ======= --> $DIR/redundant_pattern_matching_option.rs:89:15 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:86:15 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | while let Some(_) = Some(42) {} | ----------^^^^^^^----------- help: try: `while Some(42).is_some()` @@ -207,6 +241,9 @@ error: redundant pattern matching, consider using `is_none()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:91:15 ======= --> $DIR/redundant_pattern_matching_option.rs:89:15 @@ -217,9 +254,12 @@ error: redundant pattern matching, consider using `is_none()` ======= --> $DIR/redundant_pattern_matching_option.rs:91:15 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:88:15 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | while let None = None::<()> {} | ----------^^^^------------- help: try: `while None::<()>.is_none()` @@ -229,6 +269,9 @@ error: redundant pattern matching, consider using `is_some()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:93:5 ======= --> $DIR/redundant_pattern_matching_option.rs:91:5 @@ -239,9 +282,12 @@ error: redundant pattern matching, consider using `is_some()` ======= --> $DIR/redundant_pattern_matching_option.rs:93:5 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:90:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / match Some(42) { LL | | Some(_) => true, @@ -254,6 +300,9 @@ error: redundant pattern matching, consider using `is_none()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:98:5 ======= --> $DIR/redundant_pattern_matching_option.rs:96:5 @@ -264,9 +313,12 @@ error: redundant pattern matching, consider using `is_none()` ======= --> $DIR/redundant_pattern_matching_option.rs:98:5 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:95:5 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | / match None::<()> { LL | | Some(_) => false, @@ -279,6 +331,9 @@ error: redundant pattern matching, consider using `is_none()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:106:12 ======= --> $DIR/redundant_pattern_matching_option.rs:104:12 @@ -289,9 +344,12 @@ error: redundant pattern matching, consider using `is_none()` ======= --> $DIR/redundant_pattern_matching_option.rs:106:12 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:103:12 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if let None = *(&None::<()>) {} | -------^^^^----------------- help: try: `if (&None::<()>).is_none()` @@ -301,6 +359,9 @@ error: redundant pattern matching, consider using `is_none()` <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/redundant_pattern_matching_option.rs:107:12 ======= --> $DIR/redundant_pattern_matching_option.rs:105:12 @@ -311,14 +372,20 @@ error: redundant pattern matching, consider using `is_none()` ======= --> $DIR/redundant_pattern_matching_option.rs:107:12 >>>>>>> 26f50395b (Add `needless_if` lint) +<<<<<<< HEAD ======= --> $DIR/redundant_pattern_matching_option.rs:104:12 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | if let None = *&None::<()> {} | -------^^^^--------------- help: try: `if (&None::<()>).is_none()` <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: redundant pattern matching, consider using `is_some()` <<<<<<< HEAD <<<<<<< HEAD @@ -455,7 +522,10 @@ LL | let _ = matches!(x, None); error: aborting due to 28 previous errors >>>>>>> 0b507c6f0 (redundant pattern matches! result) +<<<<<<< HEAD ======= error: aborting due to 22 previous errors >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/tests/ui/rename.fixed b/tests/ui/rename.fixed index 73a92f923a26..42d57aa29d4b 100644 --- a/tests/ui/rename.fixed +++ b/tests/ui/rename.fixed @@ -29,6 +29,12 @@ #![allow(clippy::recursive_format_impl)] #![allow(clippy::invisible_characters)] <<<<<<< HEAD +<<<<<<< HEAD +======= +#![allow(cast_ref_to_mut)] +#![allow(suspicious_double_ref_op)] +#![allow(invalid_nan_comparisons)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= #![allow(cast_ref_to_mut)] #![allow(suspicious_double_ref_op)] @@ -84,12 +90,18 @@ #![warn(clippy::recursive_format_impl)] #![warn(clippy::invisible_characters)] <<<<<<< HEAD +<<<<<<< HEAD #![warn(cast_ref_to_mut)] #![warn(suspicious_double_ref_op)] #![warn(invalid_nan_comparisons)] ======= #![warn(suspicious_double_ref_op)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![warn(cast_ref_to_mut)] +#![warn(suspicious_double_ref_op)] +#![warn(invalid_nan_comparisons)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(drop_bounds)] #![warn(dropping_copy_types)] #![warn(dropping_references)] diff --git a/tests/ui/rename.rs b/tests/ui/rename.rs index b9d135e3b63b..614525b2391a 100644 --- a/tests/ui/rename.rs +++ b/tests/ui/rename.rs @@ -29,6 +29,12 @@ #![allow(clippy::recursive_format_impl)] #![allow(clippy::invisible_characters)] <<<<<<< HEAD +<<<<<<< HEAD +======= +#![allow(cast_ref_to_mut)] +#![allow(suspicious_double_ref_op)] +#![allow(invalid_nan_comparisons)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) ======= #![allow(cast_ref_to_mut)] #![allow(suspicious_double_ref_op)] @@ -84,12 +90,18 @@ #![warn(clippy::to_string_in_display)] #![warn(clippy::zero_width_space)] <<<<<<< HEAD +<<<<<<< HEAD #![warn(clippy::cast_ref_to_mut)] #![warn(clippy::clone_double_ref)] #![warn(clippy::cmp_nan)] ======= #![warn(clippy::clone_double_ref)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![warn(clippy::cast_ref_to_mut)] +#![warn(clippy::clone_double_ref)] +#![warn(clippy::cmp_nan)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::drop_bounds)] #![warn(clippy::drop_copy)] #![warn(clippy::drop_ref)] diff --git a/tests/ui/rename.stderr b/tests/ui/rename.stderr index ed662fe5a180..fa366c83c0a6 100644 --- a/tests/ui/rename.stderr +++ b/tests/ui/rename.stderr @@ -1,13 +1,19 @@ error: lint `clippy::almost_complete_letter_range` has been renamed to `clippy::almost_complete_range` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:53:9 ======= --> $DIR/rename.rs:44:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:43:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::almost_complete_letter_range)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::almost_complete_range` @@ -17,13 +23,19 @@ LL | #![warn(clippy::almost_complete_letter_range)] error: lint `clippy::blacklisted_name` has been renamed to `clippy::disallowed_names` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:54:9 ======= --> $DIR/rename.rs:45:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:44:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::blacklisted_name)] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_names` @@ -31,13 +43,19 @@ LL | #![warn(clippy::blacklisted_name)] error: lint `clippy::block_in_if_condition_expr` has been renamed to `clippy::blocks_in_if_conditions` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:55:9 ======= --> $DIR/rename.rs:46:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:45:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::block_in_if_condition_expr)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions` @@ -45,13 +63,19 @@ LL | #![warn(clippy::block_in_if_condition_expr)] error: lint `clippy::block_in_if_condition_stmt` has been renamed to `clippy::blocks_in_if_conditions` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:56:9 ======= --> $DIR/rename.rs:47:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:46:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::block_in_if_condition_stmt)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions` @@ -59,13 +83,19 @@ LL | #![warn(clippy::block_in_if_condition_stmt)] error: lint `clippy::box_vec` has been renamed to `clippy::box_collection` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:57:9 ======= --> $DIR/rename.rs:48:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:47:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::box_vec)] | ^^^^^^^^^^^^^^^ help: use the new name: `clippy::box_collection` @@ -73,13 +103,19 @@ LL | #![warn(clippy::box_vec)] error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:58:9 ======= --> $DIR/rename.rs:49:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:48:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::const_static_lifetime)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes` @@ -87,13 +123,19 @@ LL | #![warn(clippy::const_static_lifetime)] error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:59:9 ======= --> $DIR/rename.rs:50:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:49:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::cyclomatic_complexity)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity` @@ -101,13 +143,19 @@ LL | #![warn(clippy::cyclomatic_complexity)] error: lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:60:9 ======= --> $DIR/rename.rs:51:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:50:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::derive_hash_xor_eq)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::derived_hash_with_manual_eq` @@ -115,13 +163,19 @@ LL | #![warn(clippy::derive_hash_xor_eq)] error: lint `clippy::disallowed_method` has been renamed to `clippy::disallowed_methods` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:61:9 ======= --> $DIR/rename.rs:52:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:51:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::disallowed_method)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_methods` @@ -129,13 +183,19 @@ LL | #![warn(clippy::disallowed_method)] error: lint `clippy::disallowed_type` has been renamed to `clippy::disallowed_types` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:62:9 ======= --> $DIR/rename.rs:53:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:52:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::disallowed_type)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_types` @@ -143,13 +203,19 @@ LL | #![warn(clippy::disallowed_type)] error: lint `clippy::eval_order_dependence` has been renamed to `clippy::mixed_read_write_in_expression` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:63:9 ======= --> $DIR/rename.rs:54:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:53:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::eval_order_dependence)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::mixed_read_write_in_expression` @@ -157,13 +223,19 @@ LL | #![warn(clippy::eval_order_dependence)] error: lint `clippy::identity_conversion` has been renamed to `clippy::useless_conversion` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:64:9 ======= --> $DIR/rename.rs:55:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:54:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::identity_conversion)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::useless_conversion` @@ -171,13 +243,19 @@ LL | #![warn(clippy::identity_conversion)] error: lint `clippy::if_let_some_result` has been renamed to `clippy::match_result_ok` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:65:9 ======= --> $DIR/rename.rs:56:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:55:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::if_let_some_result)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::match_result_ok` @@ -195,13 +273,19 @@ LL | #![warn(clippy::integer_arithmetic)] error: lint `clippy::logic_bug` has been renamed to `clippy::overly_complex_bool_expr` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:67:9 ======= --> $DIR/rename.rs:58:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:56:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::logic_bug)] | ^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::overly_complex_bool_expr` @@ -209,13 +293,19 @@ LL | #![warn(clippy::logic_bug)] error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:68:9 ======= --> $DIR/rename.rs:59:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:57:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::new_without_default_derive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default` @@ -223,13 +313,19 @@ LL | #![warn(clippy::new_without_default_derive)] error: lint `clippy::option_and_then_some` has been renamed to `clippy::bind_instead_of_map` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:69:9 ======= --> $DIR/rename.rs:60:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:58:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::option_and_then_some)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::bind_instead_of_map` @@ -237,13 +333,19 @@ LL | #![warn(clippy::option_and_then_some)] error: lint `clippy::option_expect_used` has been renamed to `clippy::expect_used` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:70:9 ======= --> $DIR/rename.rs:61:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:59:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::option_expect_used)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used` @@ -251,13 +353,19 @@ LL | #![warn(clippy::option_expect_used)] error: lint `clippy::option_map_unwrap_or` has been renamed to `clippy::map_unwrap_or` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:71:9 ======= --> $DIR/rename.rs:62:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:60:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::option_map_unwrap_or)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or` @@ -265,13 +373,19 @@ LL | #![warn(clippy::option_map_unwrap_or)] error: lint `clippy::option_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:72:9 ======= --> $DIR/rename.rs:63:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:61:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::option_map_unwrap_or_else)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or` @@ -279,13 +393,19 @@ LL | #![warn(clippy::option_map_unwrap_or_else)] error: lint `clippy::option_unwrap_used` has been renamed to `clippy::unwrap_used` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:73:9 ======= --> $DIR/rename.rs:64:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:62:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::option_unwrap_used)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used` @@ -293,13 +413,19 @@ LL | #![warn(clippy::option_unwrap_used)] error: lint `clippy::ref_in_deref` has been renamed to `clippy::needless_borrow` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:74:9 ======= --> $DIR/rename.rs:65:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:63:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::ref_in_deref)] | ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::needless_borrow` @@ -307,13 +433,19 @@ LL | #![warn(clippy::ref_in_deref)] error: lint `clippy::result_expect_used` has been renamed to `clippy::expect_used` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:75:9 ======= --> $DIR/rename.rs:66:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:64:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::result_expect_used)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used` @@ -321,13 +453,19 @@ LL | #![warn(clippy::result_expect_used)] error: lint `clippy::result_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:76:9 ======= --> $DIR/rename.rs:67:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:65:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::result_map_unwrap_or_else)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or` @@ -335,13 +473,19 @@ LL | #![warn(clippy::result_map_unwrap_or_else)] error: lint `clippy::result_unwrap_used` has been renamed to `clippy::unwrap_used` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:77:9 ======= --> $DIR/rename.rs:68:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:66:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::result_unwrap_used)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used` @@ -349,13 +493,19 @@ LL | #![warn(clippy::result_unwrap_used)] error: lint `clippy::single_char_push_str` has been renamed to `clippy::single_char_add_str` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:78:9 ======= --> $DIR/rename.rs:69:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:67:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::single_char_push_str)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::single_char_add_str` @@ -363,13 +513,19 @@ LL | #![warn(clippy::single_char_push_str)] error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:79:9 ======= --> $DIR/rename.rs:70:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:68:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::stutter)] | ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions` @@ -377,13 +533,19 @@ LL | #![warn(clippy::stutter)] error: lint `clippy::to_string_in_display` has been renamed to `clippy::recursive_format_impl` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:80:9 ======= --> $DIR/rename.rs:71:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:69:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::to_string_in_display)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::recursive_format_impl` @@ -391,24 +553,34 @@ LL | #![warn(clippy::to_string_in_display)] error: lint `clippy::zero_width_space` has been renamed to `clippy::invisible_characters` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:81:9 ======= --> $DIR/rename.rs:72:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:70:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::zero_width_space)] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::invisible_characters` <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: lint `clippy::cast_ref_to_mut` has been renamed to `cast_ref_to_mut` --> $DIR/rename.rs:82:9 | LL | #![warn(clippy::cast_ref_to_mut)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `cast_ref_to_mut` +<<<<<<< HEAD error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_ref_op` <<<<<<< HEAD --> $DIR/rename.rs:83:9 @@ -419,17 +591,29 @@ error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_re error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_ref_op` --> $DIR/rename.rs:71:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_ref_op` +<<<<<<< HEAD + --> $DIR/rename.rs:83:9 +======= + --> $DIR/rename.rs:73:9 +>>>>>>> 493b2ae8d (Rename integer_arithmetic) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::clone_double_ref)] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `suspicious_double_ref_op` <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: lint `clippy::cmp_nan` has been renamed to `invalid_nan_comparisons` --> $DIR/rename.rs:84:9 | LL | #![warn(clippy::cmp_nan)] | ^^^^^^^^^^^^^^^ help: use the new name: `invalid_nan_comparisons` +<<<<<<< HEAD error: lint `clippy::drop_bounds` has been renamed to `drop_bounds` <<<<<<< HEAD --> $DIR/rename.rs:85:9 @@ -440,6 +624,14 @@ error: lint `clippy::drop_bounds` has been renamed to `drop_bounds` error: lint `clippy::drop_bounds` has been renamed to `drop_bounds` --> $DIR/rename.rs:72:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +error: lint `clippy::drop_bounds` has been renamed to `drop_bounds` +<<<<<<< HEAD + --> $DIR/rename.rs:85:9 +======= + --> $DIR/rename.rs:74:9 +>>>>>>> 493b2ae8d (Rename integer_arithmetic) +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::drop_bounds)] | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds` @@ -459,13 +651,19 @@ LL | #![warn(clippy::drop_ref)] error: lint `clippy::for_loop_over_option` has been renamed to `for_loops_over_fallibles` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:88:9 ======= --> $DIR/rename.rs:75:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:73:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::for_loop_over_option)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles` @@ -473,13 +671,19 @@ LL | #![warn(clippy::for_loop_over_option)] error: lint `clippy::for_loop_over_result` has been renamed to `for_loops_over_fallibles` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:89:9 ======= --> $DIR/rename.rs:76:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:74:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::for_loop_over_result)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles` @@ -487,13 +691,19 @@ LL | #![warn(clippy::for_loop_over_result)] error: lint `clippy::for_loops_over_fallibles` has been renamed to `for_loops_over_fallibles` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:90:9 ======= --> $DIR/rename.rs:77:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:75:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::for_loops_over_fallibles)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles` @@ -519,13 +729,19 @@ LL | #![warn(clippy::fn_null_check)] error: lint `clippy::into_iter_on_array` has been renamed to `array_into_iter` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:94:9 ======= --> $DIR/rename.rs:78:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:76:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::into_iter_on_array)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `array_into_iter` @@ -533,13 +749,19 @@ LL | #![warn(clippy::into_iter_on_array)] error: lint `clippy::invalid_atomic_ordering` has been renamed to `invalid_atomic_ordering` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:95:9 ======= --> $DIR/rename.rs:79:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:77:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::invalid_atomic_ordering)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_atomic_ordering` @@ -547,13 +769,19 @@ LL | #![warn(clippy::invalid_atomic_ordering)] error: lint `clippy::invalid_ref` has been renamed to `invalid_value` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:96:9 ======= --> $DIR/rename.rs:80:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:78:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::invalid_ref)] | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_value` @@ -567,13 +795,19 @@ LL | #![warn(clippy::invalid_utf8_in_unchecked)] error: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:98:9 ======= --> $DIR/rename.rs:81:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:79:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::let_underscore_drop)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop` @@ -581,13 +815,19 @@ LL | #![warn(clippy::let_underscore_drop)] error: lint `clippy::mem_discriminant_non_enum` has been renamed to `enum_intrinsics_non_enums` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:99:9 ======= --> $DIR/rename.rs:82:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:80:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::mem_discriminant_non_enum)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `enum_intrinsics_non_enums` @@ -595,13 +835,19 @@ LL | #![warn(clippy::mem_discriminant_non_enum)] error: lint `clippy::panic_params` has been renamed to `non_fmt_panics` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:100:9 ======= --> $DIR/rename.rs:83:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:81:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::panic_params)] | ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `non_fmt_panics` @@ -609,13 +855,19 @@ LL | #![warn(clippy::panic_params)] error: lint `clippy::positional_named_format_parameters` has been renamed to `named_arguments_used_positionally` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:101:9 ======= --> $DIR/rename.rs:84:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:82:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::positional_named_format_parameters)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `named_arguments_used_positionally` @@ -623,13 +875,19 @@ LL | #![warn(clippy::positional_named_format_parameters)] error: lint `clippy::temporary_cstring_as_ptr` has been renamed to `temporary_cstring_as_ptr` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:102:9 ======= --> $DIR/rename.rs:85:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:83:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::temporary_cstring_as_ptr)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `temporary_cstring_as_ptr` @@ -643,13 +901,19 @@ LL | #![warn(clippy::undropped_manually_drops)] error: lint `clippy::unknown_clippy_lints` has been renamed to `unknown_lints` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:104:9 ======= --> $DIR/rename.rs:86:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:84:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::unknown_clippy_lints)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unknown_lints` @@ -657,24 +921,36 @@ LL | #![warn(clippy::unknown_clippy_lints)] error: lint `clippy::unused_label` has been renamed to `unused_labels` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) --> $DIR/rename.rs:105:9 ======= --> $DIR/rename.rs:87:9 >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= --> $DIR/rename.rs:85:9 >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | LL | #![warn(clippy::unused_label)] | ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unused_labels` <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) error: aborting due to 53 previous errors ======= error: aborting due to 44 previous errors >>>>>>> 493b2ae8d (Rename integer_arithmetic) +<<<<<<< HEAD ======= error: aborting due to 43 previous errors >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) diff --git a/tests/ui/search_is_some_fixable_none.fixed b/tests/ui/search_is_some_fixable_none.fixed index b245202f3b7f..8f03d4b8f9ae 100644 --- a/tests/ui/search_is_some_fixable_none.fixed +++ b/tests/ui/search_is_some_fixable_none.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] ======= #![allow(dead_code, clippy::explicit_auto_deref)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::search_is_some)] fn main() { diff --git a/tests/ui/search_is_some_fixable_none.rs b/tests/ui/search_is_some_fixable_none.rs index 80dec6623c69..15cfb2e337c5 100644 --- a/tests/ui/search_is_some_fixable_none.rs +++ b/tests/ui/search_is_some_fixable_none.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] ======= #![allow(dead_code, clippy::explicit_auto_deref)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::search_is_some)] fn main() { diff --git a/tests/ui/search_is_some_fixable_some.fixed b/tests/ui/search_is_some_fixable_some.fixed index 13599fe427af..1f44ba46f7d0 100644 --- a/tests/ui/search_is_some_fixable_some.fixed +++ b/tests/ui/search_is_some_fixable_some.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] ======= #![allow(dead_code, clippy::explicit_auto_deref)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::search_is_some)] fn main() { diff --git a/tests/ui/search_is_some_fixable_some.rs b/tests/ui/search_is_some_fixable_some.rs index 8c5d1d9d1c26..e69cfe6043bb 100644 --- a/tests/ui/search_is_some_fixable_some.rs +++ b/tests/ui/search_is_some_fixable_some.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] ======= #![allow(dead_code, clippy::explicit_auto_deref)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(dead_code, clippy::explicit_auto_deref, clippy::useless_vec)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::search_is_some)] fn main() { diff --git a/tests/ui/shadow.rs b/tests/ui/shadow.rs index ef25e7fbac3b..786602d2fc78 100644 --- a/tests/ui/shadow.rs +++ b/tests/ui/shadow.rs @@ -5,6 +5,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs ======= // aux-build:proc_macro_derive.rs @@ -38,6 +39,9 @@ >>>>>>> def1705a2 (Update to a compiletest-rs version that requires `//@` for commands) >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::shadow_same, clippy::shadow_reuse, clippy::shadow_unrelated)] #![allow(clippy::let_unit_value, clippy::needless_if)] diff --git a/tests/ui/single_match_else.rs b/tests/ui/single_match_else.rs index 4e4d029abc5b..95da1e208213 100644 --- a/tests/ui/single_match_else.rs +++ b/tests/ui/single_match_else.rs @@ -1,11 +1,17 @@ <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix <<<<<<< HEAD <<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro +<<<<<<< HEAD ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::single_match_else)] #![allow(unused, clippy::needless_return, clippy::no_effect, clippy::uninlined_format_args)] <<<<<<< HEAD diff --git a/tests/ui/starts_ends_with.fixed b/tests/ui/starts_ends_with.fixed index d62e12a6f973..ff742b2b912b 100644 --- a/tests/ui/starts_ends_with.fixed +++ b/tests/ui/starts_ends_with.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::needless_if, dead_code, unused_must_use)] ======= #![allow(dead_code, unused_must_use)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::needless_if, dead_code, unused_must_use)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() {} diff --git a/tests/ui/starts_ends_with.rs b/tests/ui/starts_ends_with.rs index 36de2e6240fb..ab4309d44856 100644 --- a/tests/ui/starts_ends_with.rs +++ b/tests/ui/starts_ends_with.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD #![allow(clippy::needless_if, dead_code, unused_must_use)] ======= #![allow(dead_code, unused_must_use)] >>>>>>> e4f5d83fa (Fixed formatting.) +======= +#![allow(clippy::needless_if, dead_code, unused_must_use)] +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) fn main() {} diff --git a/tests/ui/string_add.rs b/tests/ui/string_add.rs index 1431cc8e6e12..fc40b90eb4ac 100644 --- a/tests/ui/string_add.rs +++ b/tests/ui/string_add.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) extern crate proc_macros; use proc_macros::external; diff --git a/tests/ui/suspicious_else_formatting.rs b/tests/ui/suspicious_else_formatting.rs index 8ffffd62e3f0..fc2c5a1d0a81 100644 --- a/tests/ui/suspicious_else_formatting.rs +++ b/tests/ui/suspicious_else_formatting.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_suspicious_else_formatting.rs:proc-macro ======= //@aux-build:proc_macro_suspicious_else_formatting.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_suspicious_else_formatting.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::suspicious_else_formatting)] <<<<<<< HEAD diff --git a/tests/ui/tests_outside_test_module.rs b/tests/ui/tests_outside_test_module.rs index 2a1d04779d80..dd30f66b0dbf 100644 --- a/tests/ui/tests_outside_test_module.rs +++ b/tests/ui/tests_outside_test_module.rs @@ -3,6 +3,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD //@compile-flags: --test ======= // compile-flags: --test @@ -20,6 +21,8 @@ //@compile-flags: --test >>>>>>> e4f5d83fa (Fixed formatting.) >>>>>>> 4da6e7e06 (rebase attempt) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::tests_outside_test_module)] diff --git a/tests/ui/toplevel_ref_arg.fixed b/tests/ui/toplevel_ref_arg.fixed index 98b0ff88aabf..0332d20976c3 100644 --- a/tests/ui/toplevel_ref_arg.fixed +++ b/tests/ui/toplevel_ref_arg.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::toplevel_ref_arg)] #![allow(clippy::uninlined_format_args, unused, clippy::useless_vec)] diff --git a/tests/ui/toplevel_ref_arg.rs b/tests/ui/toplevel_ref_arg.rs index 674a68b19e17..9028492d1d0b 100644 --- a/tests/ui/toplevel_ref_arg.rs +++ b/tests/ui/toplevel_ref_arg.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::toplevel_ref_arg)] #![allow(clippy::uninlined_format_args, unused, clippy::useless_vec)] diff --git a/tests/ui/toplevel_ref_arg_non_rustfix.rs b/tests/ui/toplevel_ref_arg_non_rustfix.rs index 8022003380a2..bd69a325b208 100644 --- a/tests/ui/toplevel_ref_arg_non_rustfix.rs +++ b/tests/ui/toplevel_ref_arg_non_rustfix.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::toplevel_ref_arg)] #![allow(unused)] diff --git a/tests/ui/try_err.fixed b/tests/ui/try_err.fixed index b176d3e7cbfe..fdb5f4be4c3a 100644 --- a/tests/ui/try_err.fixed +++ b/tests/ui/try_err.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![deny(clippy::try_err)] #![allow(clippy::unnecessary_wraps, clippy::needless_question_mark)] diff --git a/tests/ui/try_err.rs b/tests/ui/try_err.rs index e7be60c32cad..d25078254493 100644 --- a/tests/ui/try_err.rs +++ b/tests/ui/try_err.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![deny(clippy::try_err)] #![allow(clippy::unnecessary_wraps, clippy::needless_question_mark)] diff --git a/tests/ui/undocumented_unsafe_blocks.rs b/tests/ui/undocumented_unsafe_blocks.rs index 546d26ecf928..6ce461ad3b61 100644 --- a/tests/ui/undocumented_unsafe_blocks.rs +++ b/tests/ui/undocumented_unsafe_blocks.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_unsafe.rs:proc-macro ======= //@aux-build:proc_macro_unsafe.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_unsafe.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::undocumented_unsafe_blocks, clippy::unnecessary_safety_comment)] #![allow(clippy::let_unit_value, clippy::missing_safety_doc)] diff --git a/tests/ui/unicode.fixed b/tests/ui/unicode.fixed index 9dcdf14bb132..162de0364c8d 100644 --- a/tests/ui/unicode.fixed +++ b/tests/ui/unicode.fixed @@ -1,8 +1,11 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --test >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(dead_code)] #[warn(clippy::invisible_characters)] diff --git a/tests/ui/unicode.rs b/tests/ui/unicode.rs index f9a815a5180e..14647aba62ce 100644 --- a/tests/ui/unicode.rs +++ b/tests/ui/unicode.rs @@ -1,8 +1,11 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD ======= //@compile-flags: --test >>>>>>> e4f5d83fa (Fixed formatting.) +======= +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(dead_code)] #[warn(clippy::invisible_characters)] diff --git a/tests/ui/uninlined_format_args.fixed b/tests/ui/uninlined_format_args.fixed index 7662effda893..330fdafebe23 100644 --- a/tests/ui/uninlined_format_args.fixed +++ b/tests/ui/uninlined_format_args.fixed @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::uninlined_format_args)] #![allow(named_arguments_used_positionally, unused)] diff --git a/tests/ui/uninlined_format_args.rs b/tests/ui/uninlined_format_args.rs index 07b2bb6cb40c..e0d21f36059c 100644 --- a/tests/ui/uninlined_format_args.rs +++ b/tests/ui/uninlined_format_args.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) //@run-rustfix #![warn(clippy::uninlined_format_args)] #![allow(named_arguments_used_positionally, unused)] diff --git a/tests/ui/unit_arg.rs b/tests/ui/unit_arg.rs index 122a7c202bc3..657f60a2434b 100644 --- a/tests/ui/unit_arg.rs +++ b/tests/ui/unit_arg.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unit_arg)] #![allow(unused_must_use, unused_variables)] #![allow( diff --git a/tests/ui/unnecessary_cast.fixed b/tests/ui/unnecessary_cast.fixed index 7343142b7948..1f2ef58a7847 100644 --- a/tests/ui/unnecessary_cast.fixed +++ b/tests/ui/unnecessary_cast.fixed @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:extern_fake_libc.rs ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:extern_fake_libc.rs +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unnecessary_cast)] #![allow( <<<<<<< HEAD diff --git a/tests/ui/unnecessary_cast.rs b/tests/ui/unnecessary_cast.rs index a16bd2b6cca1..d650c067bb63 100644 --- a/tests/ui/unnecessary_cast.rs +++ b/tests/ui/unnecessary_cast.rs @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:extern_fake_libc.rs ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:extern_fake_libc.rs +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unnecessary_cast)] #![allow( <<<<<<< HEAD diff --git a/tests/ui/unnecessary_lazy_eval.fixed b/tests/ui/unnecessary_lazy_eval.fixed index 5d954211043f..b4e8b5a6ae10 100644 --- a/tests/ui/unnecessary_lazy_eval.fixed +++ b/tests/ui/unnecessary_lazy_eval.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unnecessary_lazy_evaluations)] #![allow(clippy::redundant_closure)] #![allow(clippy::bind_instead_of_map)] diff --git a/tests/ui/unnecessary_lazy_eval.rs b/tests/ui/unnecessary_lazy_eval.rs index a6a51fe852a1..2368fffb7f86 100644 --- a/tests/ui/unnecessary_lazy_eval.rs +++ b/tests/ui/unnecessary_lazy_eval.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build: proc_macros.rs:proc-macro ======= //@aux-build: proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build: proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unnecessary_lazy_evaluations)] #![allow(clippy::redundant_closure)] #![allow(clippy::bind_instead_of_map)] diff --git a/tests/ui/unnecessary_unsafety_doc.rs b/tests/ui/unnecessary_unsafety_doc.rs index 2f247908d37f..2a0d740fdccc 100644 --- a/tests/ui/unnecessary_unsafety_doc.rs +++ b/tests/ui/unnecessary_unsafety_doc.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= //@aux-build:proc_macros.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(clippy::let_unit_value)] #![warn(clippy::unnecessary_safety_doc)] diff --git a/tests/ui/unneeded_wildcard_pattern.fixed b/tests/ui/unneeded_wildcard_pattern.fixed index 019588ca5107..373c4393ce27 100644 --- a/tests/ui/unneeded_wildcard_pattern.fixed +++ b/tests/ui/unneeded_wildcard_pattern.fixed @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(stmt_expr_attributes)] #![deny(clippy::unneeded_wildcard_pattern)] #![allow(clippy::needless_if)] diff --git a/tests/ui/unneeded_wildcard_pattern.rs b/tests/ui/unneeded_wildcard_pattern.rs index 2df9a3f9fc65..7bee395c8eb7 100644 --- a/tests/ui/unneeded_wildcard_pattern.rs +++ b/tests/ui/unneeded_wildcard_pattern.rs @@ -1,8 +1,12 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macros.rs:proc-macro ======= >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macros.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(stmt_expr_attributes)] #![deny(clippy::unneeded_wildcard_pattern)] #![allow(clippy::needless_if)] diff --git a/tests/ui/unseparated_prefix_literals.fixed b/tests/ui/unseparated_prefix_literals.fixed index d81722685f36..788b94405bba 100644 --- a/tests/ui/unseparated_prefix_literals.fixed +++ b/tests/ui/unseparated_prefix_literals.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unseparated_literal_suffix)] #![allow(dead_code)] diff --git a/tests/ui/unseparated_prefix_literals.rs b/tests/ui/unseparated_prefix_literals.rs index 5204d4ac201d..69af016a5823 100644 --- a/tests/ui/unseparated_prefix_literals.rs +++ b/tests/ui/unseparated_prefix_literals.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::unseparated_literal_suffix)] #![allow(dead_code)] diff --git a/tests/ui/use_self.fixed b/tests/ui/use_self.fixed index 284911743450..5896b7f2795c 100644 --- a/tests/ui/use_self.fixed +++ b/tests/ui/use_self.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::use_self)] #![allow(dead_code, unreachable_code)] diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index ff3b7e369560..af3836b2156d 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![warn(clippy::use_self)] #![allow(dead_code, unreachable_code)] diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs index 2ad2b5a99d10..6b99f17158e1 100644 --- a/tests/ui/used_underscore_binding.rs +++ b/tests/ui/used_underscore_binding.rs @@ -1,8 +1,12 @@ <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![feature(rustc_private)] #![warn(clippy::all)] #![warn(clippy::used_underscore_binding)] diff --git a/tests/ui/useless_attribute.fixed b/tests/ui/useless_attribute.fixed index 2ecf70103b0b..09b91b1e3e8b 100644 --- a/tests/ui/useless_attribute.fixed +++ b/tests/ui/useless_attribute.fixed @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::useless_attribute)] diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs index 67cf1f53e3a9..cc3398878cc7 100644 --- a/tests/ui/useless_attribute.rs +++ b/tests/ui/useless_attribute.rs @@ -1,9 +1,13 @@ //@run-rustfix <<<<<<< HEAD +<<<<<<< HEAD //@aux-build:proc_macro_derive.rs:proc-macro ======= //@aux-build:proc_macro_derive.rs >>>>>>> e4f5d83fa (Fixed formatting.) +======= +//@aux-build:proc_macro_derive.rs:proc-macro +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) #![allow(unused)] #![warn(clippy::useless_attribute)] diff --git a/tests/ui/write_with_newline.stderr b/tests/ui/write_with_newline.stderr index 9b8c3a5892c3..9f74236b42ed 100644 --- a/tests/ui/write_with_newline.stderr +++ b/tests/ui/write_with_newline.stderr @@ -107,21 +107,30 @@ error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:57:5 | <<<<<<< HEAD +<<<<<<< HEAD LL | write!(v, "//r/n"); ======= LL | write!(v, "/r/n"); >>>>>>> e4f5d83fa (Fixed formatting.) +======= +LL | write!(v, "//r/n"); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | ^^^^^^^^^^^^^^^^^^ | help: use `writeln!` instead | <<<<<<< HEAD +<<<<<<< HEAD LL - write!(v, "//r/n"); LL + writeln!(v, "//r"); ======= LL - write!(v, "/r/n"); LL + writeln!(v, "/r"); >>>>>>> e4f5d83fa (Fixed formatting.) +======= +LL - write!(v, "//r/n"); +LL + writeln!(v, "//r"); +>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.) | error: aborting due to 9 previous errors