-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Clippy #111255
Update Clippy #111255
Commits on Mar 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8889587 - Browse repository at this point
Copy the full SHA 8889587View commit details
Commits on Mar 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 95bb486 - Browse repository at this point
Copy the full SHA 95bb486View commit details
Commits on Mar 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b6495af - Browse repository at this point
Copy the full SHA b6495afView commit details
Commits on Apr 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a937f49 - Browse repository at this point
Copy the full SHA a937f49View commit details
Commits on Apr 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f5ac844 - Browse repository at this point
Copy the full SHA f5ac844View commit details -
Configuration menu - View commit details
-
Copy full SHA for 293c1a1 - Browse repository at this point
Copy the full SHA 293c1a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0963a66 - Browse repository at this point
Copy the full SHA 0963a66View commit details
Commits on Apr 9, 2023
-
Auto merge of rust-lang#110031 - compiler-errors:generic-elaboration,…
… r=b-naber Make elaboration generic over input Combines all the `elaborate_*` family of functions into just one, which is an iterator over the same type that you pass in (e.g. elaborating `Predicate` gives `Predicate`s, elaborating `Obligation`s gives `Obligation`s, etc.)
Configuration menu - View commit details
-
Copy full SHA for d048c11 - Browse repository at this point
Copy the full SHA d048c11View commit details
Commits on Apr 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fe129a0 - Browse repository at this point
Copy the full SHA fe129a0View commit details
Commits on Apr 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6b95029 - Browse repository at this point
Copy the full SHA 6b95029View commit details
Commits on Apr 12, 2023
-
resolve: Pre-compute non-reexport module children
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
Configuration menu - View commit details
-
Copy full SHA for 5989400 - Browse repository at this point
Copy the full SHA 5989400View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a0fb90 - Browse repository at this point
Copy the full SHA 7a0fb90View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4680aa2 - Browse repository at this point
Copy the full SHA 4680aa2View commit details
Commits on Apr 14, 2023
-
Auto merge of rust-lang#110160 - petrochenkov:notagain2, r=cjgillot
resolve: Pre-compute non-reexport module children Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
Configuration menu - View commit details
-
Copy full SHA for d61570c - Browse repository at this point
Copy the full SHA d61570cView commit details
Commits on Apr 16, 2023
-
Alloc
hir::Lit
in an arena to remove the destructor fromExpr
This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena. This is something I'm working on.
Configuration menu - View commit details
-
Copy full SHA for 8f53926 - Browse repository at this point
Copy the full SHA 8f53926View commit details
Commits on Apr 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0a81f82 - Browse repository at this point
Copy the full SHA 0a81f82View commit details -
Configuration menu - View commit details
-
Copy full SHA for dfccebe - Browse repository at this point
Copy the full SHA dfccebeView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7c3301 - Browse repository at this point
Copy the full SHA a7c3301View commit details -
Configuration menu - View commit details
-
Copy full SHA for a57445d - Browse repository at this point
Copy the full SHA a57445dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80707aa - Browse repository at this point
Copy the full SHA 80707aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for f85928f - Browse repository at this point
Copy the full SHA f85928fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89f0aaa - Browse repository at this point
Copy the full SHA 89f0aaaView commit details
Commits on Apr 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fa1efa8 - Browse repository at this point
Copy the full SHA fa1efa8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ebfbc5 - Browse repository at this point
Copy the full SHA 2ebfbc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1dfc231 - Browse repository at this point
Copy the full SHA 1dfc231View commit details
Commits on Apr 19, 2023
-
Auto merge of rust-lang#110496 - WaffleLapkin:🏳️⚧️sound, r=compiler-…
…errors Don't transmute `&List<GenericArg>` <-> `&List<Ty>` In rust-lang#93505 we allowed safely transmuting between `&List<GenericArg<'_>>` and `&List<Ty<'_>>`. This was possible because `GenericArg` is a tagged pointer and the tag for types is `0b00`, such that a `GenericArg` with a type inside has the same layout as `Ty`. While this was meant as an optimization, it doesn't look like it was actually any perf or max-rss win (see rust-lang#94799 (comment), rust-lang#94841, rust-lang#110496 (comment)). Additionally the way it was done is quite fragile — `unsafe` code was not properly documented or contained in a module, types were not marked as `repr(C)` (making the transmutes possibly unsound). All of this makes the code maintenance harder and blocks other possible optimizations (as an example I've found out about these `transmutes` when my change caused them to sigsegv compiler). Thus, I think we can safely (pun intended) remove those transmutes, making maintenance easier, optimizations possible, code less cursed, etc. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for d3b1001 - Browse repository at this point
Copy the full SHA d3b1001View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2745c87 - Browse repository at this point
Copy the full SHA 2745c87View commit details
Commits on Apr 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a3aeec4 - Browse repository at this point
Copy the full SHA a3aeec4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41f6d88 - Browse repository at this point
Copy the full SHA 41f6d88View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ead58c - Browse repository at this point
Copy the full SHA 8ead58cView commit details -
Configuration menu - View commit details
-
Copy full SHA for afa28e6 - Browse repository at this point
Copy the full SHA afa28e6View commit details -
add EarlyBinder to output of explicit_item_bounds; replace bound_expl…
…icit_item_bounds usages; remove bound_explicit_item_bounds query
Configuration menu - View commit details
-
Copy full SHA for 097309c - Browse repository at this point
Copy the full SHA 097309cView commit details -
add subst_identity_iter and subst_identity_iter_copied methods on Ear…
…lyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
Configuration menu - View commit details
-
Copy full SHA for 55d8146 - Browse repository at this point
Copy the full SHA 55d8146View commit details -
Configuration menu - View commit details
-
Copy full SHA for 654d12f - Browse repository at this point
Copy the full SHA 654d12fView commit details -
Auto merge of rust-lang#109999 - m-ou-se:flatten-format-args, r=oli-obk
Enable flatten-format-args by default. Part of rust-lang#99012. This enables the `flatten-format-args` feature that was added by rust-lang#106824: > This change inlines string literals, integer literals and nested format_args!() into format_args!() during ast lowering, making all of the following pairs result in equivalent hir: > > ```rust > println!("Hello, {}!", "World"); > println!("Hello, World!"); > ``` > > ```rust > println!("[info] {}", format_args!("error")); > println!("[info] error"); > ``` > > ```rust > println!("[{}] {}", status, format_args!("error: {}", msg)); > println!("[{}] error: {}", status, msg); > ``` > > ```rust > println!("{} + {} = {}", 1, 2, 1 + 2); > println!("1 + 2 = {}", 1 + 2); > ``` > > And so on. > > This is useful for macros. E.g. a `log::info!()` macro could just pass the tokens from the user directly into a `format_args!()` that gets efficiently flattened/inlined into a `format_args!("info: {}")`. > > It also means that `dbg!(x)` will have its file, line, and expression name inlined: > > ```rust > eprintln!("[{}:{}] {} = {:#?}", file!(), line!(), stringify!(x), x); // before > eprintln!("[example.rs:1] x = {:#?}", x); // after > ``` > > Which can be nice in some cases, but also means a lot more unique static strings than before if dbg!() is used a lot. This is mostly an optimization, except that it will be visible through [`fmt::Arguments::as_str()`](https://doc.rust-lang.org/nightly/std/fmt/struct.Arguments.html#method.as_str). In rust-lang#106823, there was already a libs-api FCP about the documentation of `fmt::Arguments::as_str()` to allow it to give `Some` rather than `None` depending on optimizations like this. That was just a documentation update though. This PR is the one that actually makes the user visible change: ```rust assert_eq!(format_args!("abc").as_str(), Some("abc")); // Unchanged. assert_eq!(format_args!("ab{}", "c").as_str(), Some("abc")); // Was `None` before! ```
Configuration menu - View commit details
-
Copy full SHA for e8197b1 - Browse repository at this point
Copy the full SHA e8197b1View commit details
Commits on Apr 21, 2023
-
Auto merge of rust-lang#96840 - cjgillot:query-feed, r=oli-obk
Allow to feed a value in another query's cache and remove `WithOptConstParam` I used it to remove `WithOptConstParam` queries, as an example. The idea is that a query (here `typeck(function)`) can write into another query's cache (here `type_of(anon const)`). The dependency node for `type_of` would depend on all the current dependencies of `typeck`. There is still an issue with cycles: if `type_of(anon const)` is accessed before `typeck(function)`, we will still have the usual cycle. The way around this issue is to `ensure` that `typeck(function)` is called before accessing `type_of(anon const)`. When replayed, we may the following cases: - `typeck` is green, in that case `type_of` is green too, and all is right; - `type_of` is green, `typeck` may still be marked as red (it depends on strictly more things than `type_of`) -> we verify that the saved value and the re-computed value of `type_of` have the same hash; - `type_of` is red, then `typeck` is red -> it's the caller responsibility to ensure `typeck` is recomputed *before* `type_of`. As `anon consts` have their own `DefPathData`, it's not possible to have the def-id of the anon-const point to something outside the original function, but the general case may have to be resolved before using this device more broadly. There is an open question about loading from the on-disk cache. If `typeck` is loaded from the on-disk cache, the side-effect does not happen. The regular `type_of` implementation can go and fetch the correct value from the decoded `typeck` results, and the dep-graph will check that the hashes match, but I'm not sure we want to rely on this behaviour. I specifically allowed to feed the value to `type_of` from inside a call to `type_of`. In that case, the dep-graph will check that the fingerprints of both values match. This implementation is still very sensitive to cycles, and requires that we call `typeck(function)` before `typeck(anon const)`. The reason is that `typeck(anon const)` calls `type_of(anon const)`, which calls `typeck(function)`, which feeds `type_of(anon const)`, and needs to build the MIR so needs `typeck(anon const)`. The latter call would not cycle, since `type_of(anon const)` has been set, but I'd rather not remove the cycle check.
Configuration menu - View commit details
-
Copy full SHA for 84bab31 - Browse repository at this point
Copy the full SHA 84bab31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68c4776 - Browse repository at this point
Copy the full SHA 68c4776View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85d7de2 - Browse repository at this point
Copy the full SHA 85d7de2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb3e0fb - Browse repository at this point
Copy the full SHA cb3e0fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f13e6d - Browse repository at this point
Copy the full SHA 7f13e6dView commit details
Commits on Apr 22, 2023
-
Auto merge of rust-lang#106934 - DrMeepster:offset_of, r=WaffleLapkin
Add offset_of! macro (RFC 3308) Implements rust-lang/rfcs#3308 (tracking issue rust-lang#106655) by adding the built in macro `core::mem::offset_of`. Two of the future possibilities are also implemented: * Nested field accesses (without array indexing) * DST support (for `Sized` fields) I wrote this a few months ago, before the RFC merged. Now that it's merged, I decided to rebase and finish it. cc `@thomcc` (RFC author)
Configuration menu - View commit details
-
Copy full SHA for 86d8f12 - Browse repository at this point
Copy the full SHA 86d8f12View commit details -
Configuration menu - View commit details
-
Copy full SHA for a43708a - Browse repository at this point
Copy the full SHA a43708aView commit details -
Auto merge of rust-lang#104844 - cjgillot:mention-eval-place, r=jackh…
…726,RalfJung Evaluate place expression in `PlaceMention` rust-lang#102256 introduces a `PlaceMention(place)` MIR statement which keep trace of `let _ = place` statements from surface rust, but without semantics. This PR proposes to change the behaviour of `let _ =` patterns with respect to the borrow-checker to verify that the bound place is live. Specifically, consider this code: ```rust let _ = { let a = 5; &a }; ``` This passes borrowck without error on stable. Meanwhile, replacing `_` by `_: _` or `_p` errors with "error[E0597]: `a` does not live long enough", [see playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c448d25a7c205dc95a0967fe96bccce8). This PR *does not* change how `_` patterns behave with respect to initializedness: it remains ok to bind a moved-from place to `_`. The relevant test is `tests/ui/borrowck/let_underscore_temporary.rs`. Crater check found no regression. For consistency, this PR changes miri to evaluate the place found in `PlaceMention`, and report eventual dangling pointers found within it. r? `@RalfJung`
Configuration menu - View commit details
-
Copy full SHA for f30fc0a - Browse repository at this point
Copy the full SHA f30fc0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 628605e - Browse repository at this point
Copy the full SHA 628605eView commit details
Commits on Apr 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 583c97e - Browse repository at this point
Copy the full SHA 583c97eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0add5bb - Browse repository at this point
Copy the full SHA 0add5bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5a2c2b - Browse repository at this point
Copy the full SHA d5a2c2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36bf3ef - Browse repository at this point
Copy the full SHA 36bf3efView commit details -
Configuration menu - View commit details
-
Copy full SHA for acf50a7 - Browse repository at this point
Copy the full SHA acf50a7View commit details -
Auto merge of rust-lang#10703 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Configuration menu - View commit details
-
Copy full SHA for f16bfa4 - Browse repository at this point
Copy the full SHA f16bfa4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1b75c5 - Browse repository at this point
Copy the full SHA a1b75c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69da902 - Browse repository at this point
Copy the full SHA 69da902View commit details -
Configuration menu - View commit details
-
Copy full SHA for 572eecd - Browse repository at this point
Copy the full SHA 572eecdView commit details -
Auto merge of rust-lang#10670 - lukaslueg:issue10634, r=Jarcho
Don't suggest `suboptimal_flops` unavailable in nostd Fixes rust-lang#10634 changelog: Enhancement: [`suboptimal_flops`]: Do not suggest `{f32,f64}::abs()` or `{f32,f64}::mul_add()` in a `no_std`-environment.
Configuration menu - View commit details
-
Copy full SHA for 316d83a - Browse repository at this point
Copy the full SHA 316d83aView commit details -
Auto merge of rust-lang#10679 - y21:better-const-ctx-check, r=Jarcho
use `is_inside_const_context` for `in_constant` util fn Fixes rust-lang#10452. This PR improves the `in_constant` util function to detect more cases of const contexts. Previously this function would not detect cases like expressions in array length position or expression in an inline const block `const { .. }`. changelog: [`bool_to_int_with_if`]: recognize array length operand as being in a const context and don't suggest `usize::from` there
Configuration menu - View commit details
-
Copy full SHA for 496c110 - Browse repository at this point
Copy the full SHA 496c110View commit details -
Auto merge of rust-lang#108118 - oli-obk:lazy_typeck, r=cjgillot
Run various queries from other queries instead of explicitly in phases These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps. This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
Configuration menu - View commit details
-
Copy full SHA for 4ed4869 - Browse repository at this point
Copy the full SHA 4ed4869View commit details -
Auto merge of rust-lang#10704 - matthiaskrgr:splitest, r=llogiq
split test into 2 changelog: none
Configuration menu - View commit details
-
Copy full SHA for e1f6305 - Browse repository at this point
Copy the full SHA e1f6305View commit details -
Remove check for
lib.register_*
andsrc/docs*
in `cargo dev updat……e_lints` This reverts commit 22d435b.
Configuration menu - View commit details
-
Copy full SHA for 022baa5 - Browse repository at this point
Copy the full SHA 022baa5View commit details -
Auto merge of rust-lang#10706 - Alexendoo:remove-old-generated-files-…
…check, r=llogiq Remove check for `lib.register_*` and `src/docs*` in `cargo dev update_lints` The transition period has well passed changelog: none
Configuration menu - View commit details
-
Copy full SHA for 797a7fe - Browse repository at this point
Copy the full SHA 797a7feView commit details -
* applying * binding * complex * constituent * demonstrate * desugaring * exact * expression * for * functionalities * github * implementation * infers * multiple conflicting traits * mutable * necessarily * nightly * nonexistent * optional * parameter * reassignments * resources * substitution * suggestion * that * that array is * using the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d2061fa - Browse repository at this point
Copy the full SHA d2061faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f7801f - Browse repository at this point
Copy the full SHA 6f7801fView commit details -
Auto merge of rust-lang#10432 - samueltardieu:issue-10430, r=Manishearth
New lint: detect `if` expressions with simple boolean assignments to the same target Closes rust-lang#10430 changelog: [`needless_bool_assign`] new lint to detect simple boolean assignment to the same target in `if` branches
Configuration menu - View commit details
-
Copy full SHA for 7a870ae - Browse repository at this point
Copy the full SHA 7a870aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8726b2 - Browse repository at this point
Copy the full SHA e8726b2View commit details -
Auto merge of rust-lang#10649 - jsoref:spelling, r=Jarcho
Spelling This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling). The misspellings have been reported at https://github.com/jsoref/rust-clippy/actions/runs/4710771873#summary-12776860721 The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-clippy/actions/runs/4710771874#summary-12776860722 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 96f8471 - Browse repository at this point
Copy the full SHA 96f8471View commit details
Commits on Apr 24, 2023
-
Auto merge of rust-lang#10697 - lochetti:fix_9757, r=dswij
Ignore `shadow` warns in code from macro expansions This PR fixes rust-lang/rust-clippy#9757 I am in doubt if just looking for `pat.span.from_expansion()` would be sufficient instead of looking for both `pat.span.desugaring_kind().is_some()` or `pat.span.from_expansion()`. The tests (including the new one) passes if I leave the only `if pat.span.from_expansion()`. Any feedbacks? Also, this is my first PR here, sorry for anything and thanks for the patience! changelog: [`shadow_same`, `shadow_reuse`, `shadow_unrelated`]: avoiding warns in macro-generated code
Configuration menu - View commit details
-
Copy full SHA for 5161c4c - Browse repository at this point
Copy the full SHA 5161c4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c859b6 - Browse repository at this point
Copy the full SHA 6c859b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26f9fce - Browse repository at this point
Copy the full SHA 26f9fceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3045998 - Browse repository at this point
Copy the full SHA 3045998View commit details -
Auto merge of rust-lang#10683 - Centri3:allow-attributes, r=Alexendoo
Fix false positive in `allow_attributes` This would emit a warning if used in a proc-macro with the feature `lint_reasons` enabled. This is now fixed. changelog: [`allow_attributes`]: Don't lint if in external macro
Configuration menu - View commit details
-
Copy full SHA for 4b6fdb4 - Browse repository at this point
Copy the full SHA 4b6fdb4View commit details -
Auto merge of rust-lang#10707 - y21:redudant_pattern_matching_rest_pa…
…t, r=Manishearth check for `..` pattern in `redundant_pattern_matching` The `redundant_pattern_matching` lint currently checks for `if let Some(_) = ...`, but not for `if let Some(..) = ...`. This PR makes sure to also check for the `..` pattern in tuple structs. It also found one such instance in clippy itself so that shows it's worth checking for this pattern as well 😅 changelog: [`redundant_pattern_matching`]: check for `..` pattern in tuple structs
Configuration menu - View commit details
-
Copy full SHA for 30db6ed - Browse repository at this point
Copy the full SHA 30db6edView commit details -
Auto merge of rust-lang#10702 - blyxyas:fix-let_underscore_untyped_he…
…lp_message, r=Manishearth Improve the help message + add a help span This would close rust-lang#10410, because it applies the general consensus achieved in that issue (that replacing `let _ = ...` to `_ = ...` doesn't present any benefits). I also added a little help message span. changelog:[`let_underscore_untyped`]: Fix the help message confusion + add a help message span.
Configuration menu - View commit details
-
Copy full SHA for c4f2c48 - Browse repository at this point
Copy the full SHA c4f2c48View commit details -
Auto merge of rust-lang#110718 - flip1995:clippyup, r=Manishearth
Update Clippy r? `@Manishearth` A few days late, I was on a business trip, sorry.
Configuration menu - View commit details
-
Copy full SHA for 5514d9f - Browse repository at this point
Copy the full SHA 5514d9fView commit details
Commits on Apr 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4a76b6f - Browse repository at this point
Copy the full SHA 4a76b6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for acfb2c4 - Browse repository at this point
Copy the full SHA acfb2c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8efe9ff - Browse repository at this point
Copy the full SHA 8efe9ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ac30d3 - Browse repository at this point
Copy the full SHA 1ac30d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14a6fa4 - Browse repository at this point
Copy the full SHA 14a6fa4View commit details -
Auto merge of rust-lang#10665 - Centri3:string_lit_as_bytes_changes, …
…r=giraffate Don't apply `string_lit_as_bytes` if in macro expansion The following code will emit a warning on both w! and h!, despite there being nothing the user (or library author) could do about it: ```rust #![warn(clippy::string_lit_as_bytes)] use windows::w; use windows::h; fn main() { let _w = w!("example"); let _h = h!("example"); } ``` This is because windows-rs will create a binding `const INPUT: &[u8] = $s.as_bytes()`, and changing this to b"$s" is, well, suboptimal. I don't know enough about Rust to know if this is something that can be detected though if it can be I'm happy with closing this in favor of implementing that. I'm not sure whether this is how it should be done though, as this simply tells clippy to not invoke this even if it's applicable (this also affects the other string lints, but didn't cause any tests to fail). changelog: [`string_lit_as_bytes`]: Don't lint if in external macro
Configuration menu - View commit details
-
Copy full SHA for abd2c1e - Browse repository at this point
Copy the full SHA abd2c1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 637d10b - Browse repository at this point
Copy the full SHA 637d10bView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa6c27a - Browse repository at this point
Copy the full SHA aa6c27aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3ee10d - Browse repository at this point
Copy the full SHA e3ee10dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cf9642 - Browse repository at this point
Copy the full SHA 9cf9642View commit details -
Auto merge of rust-lang#10715 - xFrednet:changelog-1-69, r=llogiq
Catching, stray, commas, (I'll, never, learn, to, use, them, correctly) 😅 Roses are red, Violets are blue, Fixing commas, Is the completed todo. (It's always impressive, that the poems are getting worse) --- Follow-up from: rust-lang/rust-clippy#10668 changelog: none
Configuration menu - View commit details
-
Copy full SHA for 19465c9 - Browse repository at this point
Copy the full SHA 19465c9View commit details -
Auto merge of rust-lang#10712 - blyxyas:fix-fixflag_implies_all_targe…
…ts, r=llogiq Document that `cargo clippy --fix` implies `--all-targets` In [`cargo fix`'s documentation](https://doc.rust-lang.org/cargo/commands/cargo-fix.html) they indicate that `fix` implies `--all-targets` if no target is supplied. As Clippy uses Cargo under the hood, this also applies to Clippy, but we didn't document that behaviour. This PR changes that Fixes rust-lang#10690 changelog: Add to documentation that `--fix` implies `--all-targets`
Configuration menu - View commit details
-
Copy full SHA for a7335cb - Browse repository at this point
Copy the full SHA a7335cbView commit details -
Rollup merge of rust-lang#110556 - kylematsuda:earlybinder-explicit-i…
…tem-bounds, r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish rust-lang#105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed rust-lang#110299 and rust-lang#110498 😃)
Configuration menu - View commit details
-
Copy full SHA for 331c547 - Browse repository at this point
Copy the full SHA 331c547View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c8cf40 - Browse repository at this point
Copy the full SHA 8c8cf40View commit details -
Auto merge of rust-lang#10656 - Centri3:master, r=xFrednet
Add configuration for `semicolon_block` lints Does exactly what it says on the tin, suggests moving a block's final semicolon inside if it's multiline and outside if it's singleline. I don't really like how this is implemented so I'm not too sure if this is ready yet. Alas, it might be ok. --- fixes rust-lang#10654 changelog: Enhancement: [`semicolon_inside_block`]: Added `semicolon-inside-block-ignore-singleline` as a new config value. [rust-lang#10656](rust-lang/rust-clippy#10656) changelog: Enhancement: [`semicolon_outside_block`]: Added `semicolon-outside-block-ignore-multiline` as a new config value. [rust-lang#10656](rust-lang/rust-clippy#10656) <!-- changelog_checked -->
Configuration menu - View commit details
-
Copy full SHA for 990bbdc - Browse repository at this point
Copy the full SHA 990bbdcView commit details
Commits on Apr 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 92645b0 - Browse repository at this point
Copy the full SHA 92645b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9564895 - Browse repository at this point
Copy the full SHA 9564895View commit details -
adds lint to detect construction of unit struct using
default
Using `default` to construct a unit struct increases code complexity and adds a function call. This can be avoided by simply removing the call to `default` and simply construct by name.
Configuration menu - View commit details
-
Copy full SHA for 9428138 - Browse repository at this point
Copy the full SHA 9428138View commit details
Commits on Apr 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0339d4e - Browse repository at this point
Copy the full SHA 0339d4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 273c898 - Browse repository at this point
Copy the full SHA 273c898View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83504fa - Browse repository at this point
Copy the full SHA 83504faView commit details
Commits on Apr 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 19b3b22 - Browse repository at this point
Copy the full SHA 19b3b22View commit details -
fix new lints link install nightly rust-docs run linkcheck without nightly toolchain remove nightly toolchain, add rust-docs component Test Remark Update basics.md Update basics.md Update basics.md update workflow add rust docs toolchain Update remark.yml workflow test manual test update book path add linkcheck book to CI Update lint_passes.md
Configuration menu - View commit details
-
Copy full SHA for d1f55e6 - Browse repository at this point
Copy the full SHA d1f55e6View commit details -
Auto merge of rust-lang#10720 - SergenKaraoglan:personal, r=flip1995
run linkcheck in clippy ci fixes rust-lang#10711 changelog: Run [linkcheck.sh](https://github.com/rust-lang/rust/blob/master/src/tools/linkchecker/linkcheck.sh) from rustc repo in Remark.yml to check Clippy book.
Configuration menu - View commit details
-
Copy full SHA for b7939f4 - Browse repository at this point
Copy the full SHA b7939f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81a6141 - Browse repository at this point
Copy the full SHA 81a6141View commit details -
Configuration menu - View commit details
-
Copy full SHA for f37054b - Browse repository at this point
Copy the full SHA f37054bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b5820d - Browse repository at this point
Copy the full SHA 2b5820dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 395b1f5 - Browse repository at this point
Copy the full SHA 395b1f5View commit details -
Auto merge of rust-lang#10719 - blyxyas:fix-items_after_test_mod_impo…
…rted_modules, r=Alexendoo Fix `items_after_test_module`: Ignore imported modules Fixes rust-lang#10713. It does a little bit of dark magic, but intention is what really counts. changelog:[`items_after_test_module`]: Ignore imported modules (`mod foo;`) with no body.
Configuration menu - View commit details
-
Copy full SHA for 3594d55 - Browse repository at this point
Copy the full SHA 3594d55View commit details
Commits on Apr 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2ed254e - Browse repository at this point
Copy the full SHA 2ed254eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb58083 - Browse repository at this point
Copy the full SHA bb58083View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcdcc34 - Browse repository at this point
Copy the full SHA bcdcc34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d08325 - Browse repository at this point
Copy the full SHA 1d08325View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab9b7a5 - Browse repository at this point
Copy the full SHA ab9b7a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f10e39f - Browse repository at this point
Copy the full SHA f10e39fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d8178f - Browse repository at this point
Copy the full SHA 8d8178fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9613ea8 - Browse repository at this point
Copy the full SHA 9613ea8View commit details -
Auto merge of rust-lang#10647 - y21:while_pop_unwrap, r=llogiq
new lint: `manual_while_let_some` This PR implements the lint I suggested [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/lint.20on.20while.20pop.20unwrap). It looks for while loops like these: ```rs let mut numbers = vec![0, 1, 2]; while !numbers.is_empty() { let number = numbers.pop().unwrap(); // use `number` } ``` and suggests replacing it with a while-let loop, like this: ```rs let mut numbers = vec![0, 1, 2]; while let Some(number) = numbers.pop() { // use `number` } ``` ... which is more concise and idiomatic. It only looks for `Vec::pop()` calls in the first statement of the loop body in an attempt to not trigger FPs (as pop might only be called conditionally). changelog: new lint [`manual_while_let_some`]
Configuration menu - View commit details
-
Copy full SHA for 7bc3da9 - Browse repository at this point
Copy the full SHA 7bc3da9View commit details -
Co-authored-by: Ruby Lazuli <general@patchmixolydic.com>
Configuration menu - View commit details
-
Copy full SHA for 032bc11 - Browse repository at this point
Copy the full SHA 032bc11View commit details
Commits on Apr 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for de4bc66 - Browse repository at this point
Copy the full SHA de4bc66View commit details
Commits on May 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d4baabe - Browse repository at this point
Copy the full SHA d4baabeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5749054 - Browse repository at this point
Copy the full SHA 5749054View commit details -
Auto merge of rust-lang#111036 - RalfJung:miri, r=RalfJung
update Miri r? `@ghost`
Configuration menu - View commit details
-
Copy full SHA for 8354b34 - Browse repository at this point
Copy the full SHA 8354b34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 220a9db - Browse repository at this point
Copy the full SHA 220a9dbView commit details
Commits on May 2, 2023
-
Auto merge of rust-lang#10724 - lukaslueg:largeerrdocs, r=giraffate
Clarify docs for `RESULT_LARGE_ERR` Adds a paragraph to address rust-lang/rust-clippy#10211 (comment) changelog: [`result_large_err`]: Update the document
Configuration menu - View commit details
-
Copy full SHA for 824f2e7 - Browse repository at this point
Copy the full SHA 824f2e7View commit details -
Rollup merge of rust-lang#110955 - fee1-dead-contrib:sus-operation, r…
…=compiler-errors uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from rust-lang#109842. r? ``@compiler-errors``
Configuration menu - View commit details
-
Copy full SHA for eac589b - Browse repository at this point
Copy the full SHA eac589bView commit details -
Auto merge of rust-lang#109128 - chenyukang:yukang/remove-type-ascrip…
…tion, r=estebank Remove type ascription from parser and diagnostics Mostly based on rust-lang#106826 Part of rust-lang#101728 r? `@estebank`
Configuration menu - View commit details
-
Copy full SHA for d36bde7 - Browse repository at this point
Copy the full SHA d36bde7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dd2501 - Browse repository at this point
Copy the full SHA 0dd2501View commit details -
Restrict
From<S>
for{D,Subd}iagnosticMessage
.Currently a `{D,Subd}iagnosticMessage` can be created from any type that impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static, str>`, which are reasonable. It also includes `&String`, which is pretty weird, and results in many places making unnecessary allocations for patterns like this: ``` self.fatal(&format!(...)) ``` This creates a string with `format!`, takes a reference, passes the reference to `fatal`, which does an `into()`, which clones the reference, doing a second allocation. Two allocations for a single string, bleh. This commit changes the `From` impls so that you can only create a `{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static, str>`. This requires changing all the places that currently create one from a `&String`. Most of these are of the `&format!(...)` form described above; each one removes an unnecessary static `&`, plus an allocation when executed. There are also a few places where the existing use of `&String` was more reasonable; these now just use `clone()` at the call site. As well as making the code nicer and more efficient, this is a step towards possibly using `Cow<'static, str>` in `{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing the `From<&'a str>` impls to `From<&'static str>`, which is doable, but I'm not yet sure if it's worthwhile.
Configuration menu - View commit details
-
Copy full SHA for 431cce1 - Browse repository at this point
Copy the full SHA 431cce1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e24ff3 - Browse repository at this point
Copy the full SHA 7e24ff3View commit details
Commits on May 3, 2023
-
Auto merge of rust-lang#10730 - blyxyas:no_std_mul_add, r=Jarcho
`imprecise_flops`: Globally ignore `#[no_std]` crates Really small fix. Fixes rust-lang#10728 changelog: [`imprecise_flops`]: Fix false positives with `#[no_std]`
Configuration menu - View commit details
-
Copy full SHA for 9353170 - Browse repository at this point
Copy the full SHA 9353170View commit details -
Auto merge of rust-lang#10734 - smoelius:patch-2, r=Alexendoo
Update macros.rs (typo) r? `@Alexendoo` changelog: none
Configuration menu - View commit details
-
Copy full SHA for c2e0d43 - Browse repository at this point
Copy the full SHA c2e0d43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e04903 - Browse repository at this point
Copy the full SHA 4e04903View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8701009 - Browse repository at this point
Copy the full SHA 8701009View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ed7fd1 - Browse repository at this point
Copy the full SHA 4ed7fd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1603715 - Browse repository at this point
Copy the full SHA 1603715View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48ae5a0 - Browse repository at this point
Copy the full SHA 48ae5a0View commit details -
Auto merge of rust-lang#10716 - Icxolu:unitstruct_default_constructio…
…n, r=Manishearth Fixes rust-lang#10609: Adds lint to detect construction of unit struct using `default` Using `default` to construct a unit struct increases code complexity and adds a function call. This can be avoided by simply removing the call to `default` and simply construct by name. changelog: [`default_constructed_unit_structs`]: detects construction of unit structs using `default` fixes rust-lang#10609
Configuration menu - View commit details
-
Copy full SHA for f9c1d15 - Browse repository at this point
Copy the full SHA f9c1d15View commit details
Commits on May 4, 2023
-
Auto merge of rust-lang#110806 - WaffleLapkin:unmkI, r=lcnr
Replace `tcx.mk_trait_ref` with `TraitRef::new` First step in implementing rust-lang/compiler-team#616 r? `@lcnr`
Configuration menu - View commit details
-
Copy full SHA for 8518391 - Browse repository at this point
Copy the full SHA 8518391View commit details
Commits on May 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0f7b61d - Browse repository at this point
Copy the full SHA 0f7b61dView commit details -
Auto merge of rust-lang#10747 - Alexendoo:cargo-dev-dogfood-stdout, r…
…=flip1995 Inherit stdout/stderr for `cargo dev dogfood` changelog: none Prints progress as it happens and in colour, and will also show anything printed to stderr
Configuration menu - View commit details
-
Copy full SHA for d7173e2 - Browse repository at this point
Copy the full SHA d7173e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88c7632 - Browse repository at this point
Copy the full SHA 88c7632View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79656cc - Browse repository at this point
Copy the full SHA 79656ccView commit details -
Auto merge of rust-lang#10749 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Configuration menu - View commit details
-
Copy full SHA for 371120b - Browse repository at this point
Copy the full SHA 371120bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cb0519 - Browse repository at this point
Copy the full SHA 4cb0519View commit details -
Configuration menu - View commit details
-
Copy full SHA for b53c1bb - Browse repository at this point
Copy the full SHA b53c1bbView commit details