about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-05-03Remove some low-value `use` renamings.Nicholas Nethercote-15/+10
There are a few common abbreviations like `use rustc_ast as ast` and `use rust_hir as hir` for names that are used a lot. But there are also some cases where a crate is renamed just once in the whole codebase, and that ends up making things harder to read rather than easier. This commit removes them.
2024-05-03Remove some unneeded `Cargo.toml` dependencies.Nicholas Nethercote-8/+0
I found these with a hacky shell script.
2024-05-02Auto merge of #124629 - matthiaskrgr:rollup-gttvzrg, r=matthiaskrgrbors-203/+135
Rollup of 7 pull requests Successful merges: - #124138 (Ignore LLVM ABI in dlltool tests since those targets don't use dlltool) - #124414 (remove extraneous note on `UnableToRunDsymutil` diagnostic) - #124579 (Align: add bytes_usize and bits_usize) - #124622 (Cleanup: Rid the `rmake` test runners of `extern crate run_make_support;`) - #124623 (shallow resolve in orphan check) - #124624 (Use `tcx.types.unit` instead of `Ty::new_unit(tcx)`) - #124627 (interpret: hide some reexports in rustdoc) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-02Rollup merge of #124627 - RalfJung:interpret-doc-no-inline, r=fmeaseMatthias Krüger-0/+3
interpret: hide some reexports in rustdoc Cc https://github.com/rust-lang/rust/issues/124608
2024-05-02Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmeaseMatthias Krüger-57/+51
Use `tcx.types.unit` instead of `Ty::new_unit(tcx)` I don't think there is any need for the function, given that we can just access the `.types`, similarly to all other primitives?
2024-05-02Rollup merge of #124623 - lcnr:coherence-uwu, r=compiler-errorsMatthias Krüger-36/+44
shallow resolve in orphan check r? ``@compiler-errors`` cc https://github.com/rust-lang/rust/pull/124588#pullrequestreview-2036012292
2024-05-02Rollup merge of #124622 - fmease:yeet-extern-crate-run_make_support, r=jieyouxuMatthias Krüger-55/+0
Cleanup: Rid the `rmake` test runners of `extern crate run_make_support;` `run_make_support` is part of the *extern prelude* of `rmake` test runners rendering `extern crate run_make_support` redundant: https://github.com/rust-lang/rust/blob/80451a485b006bd32732c003a54ee7de457d8266/src/tools/compiletest/src/runtest.rs#L3826-L3827 ~~Contains some fmt'ing changes because I've enabled format-on-save in my editor and because we don't run `x fmt` for `rmake` test runners yet (this gets addressed by #124613). I can revert those if you'd like me to.~~ (reverted) r? jieyouxu or testing-devex(?) or boostrap(?)
2024-05-02Rollup merge of #124579 - RalfJung:align-bytes-usize, r=fmeaseMatthias Krüger-1/+11
Align: add bytes_usize and bits_usize This matches `Size::bytes/bits_usize`. I recently wanted this in Miri as well.
2024-05-02Rollup merge of #124414 - lqd:subdiagnostics, r=davidtwcoMatthias Krüger-1/+0
remove extraneous note on `UnableToRunDsymutil` diagnostic If I understand [this FIXME](https://github.com/rust-lang/rust/blob/1367827eac3d813a261a4c444037af9736996daa/compiler/rustc_macros/src/diagnostics/diagnostic.rs#L205) correctly, it seems we don't yet validate subdiagnostics, so `#[note]` and co in the `#[derive(Diagnostic]` item could be out-of-sync with the fluent message, without causing compile errors. It was the case for `rustc_codegen_ssa::errors::UnableToRunDsymutil`, causing the ICE in #124392. I've grepped and scripted my way through most of our diagnostics structs and fluent bundles and the above was the only such extraneous `#[note]`/`#[note(name)]`/`#[help]`/`#[warning]` I could find, so hopefully there aren't many others like it. I haven't checked if the opposite can happen, a `.note = ` in a fluent message that is lacking a corresponding `#[note]` on the struct and not causing an error, but maybe it's possible? r? ``@davidtwco`` fixes #124392
2024-05-02Rollup merge of #124138 - mati865:ignore-llvm-abi-in-dlltool-tests, r=davidtwcoMatthias Krüger-53/+26
Ignore LLVM ABI in dlltool tests since those targets don't use dlltool Otherwise those two tests fail when running `./x.py test` with this target.
2024-05-02interpret: hide some reexports in rustdocRalf Jung-0/+3
2024-05-02Auto merge of #124621 - flip1995:clippy-subtree-update, r=Manishearthbors-767/+1686
Clippy subtree update r? `@Manishearth`
2024-05-02Cleanup: Rid the `rmake` test runners of `extern crate run_make_support;`León Orell Valerian Liehr-55/+0
2024-05-02Don't use `Ty::new_unit` in miriWaffle Lapkin-1/+1
2024-05-02Inline & delete `Ty::new_unit`, since it's just a field accessWaffle Lapkin-56/+50
2024-05-02shallow resolve in orphan checklcnr-36/+44
2024-05-02Update Cargo.lockPhilipp Krones-12/+22
2024-05-02Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into ↵Philipp Krones-755/+1664
clippy-subtree-update
2024-05-02Auto merge of #124617 - GuillaumeGomez:rollup-eihxh6v, r=GuillaumeGomezbors-33/+84
Rollup of 3 pull requests Successful merges: - #124568 (Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint) - #124582 (always print nice 'std not found' error when std is not found) - #124597 (Use an explicit x86-64 cpu in tests that are sensitive to it) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-02Rollup merge of #124597 - cuviper:x86-64-v3, r=workingjubileeGuillaume Gomez-25/+34
Use an explicit x86-64 cpu in tests that are sensitive to it There are a few tests that depend on some target features **not** being enabled by default, and usually they are correct with the default x86-64 target CPU. However, in downstream builds we have modified the default to fit our distros -- `x86-64-v2` in RHEL 9 and `x86-64-v3` in RHEL 10 -- and the latter especially trips tests that expect not to have AVX. These cases are few enough that we can just set them back explicitly.
2024-05-02Rollup merge of #124582 - RalfJung:std-not-found, r=NilstriebGuillaume Gomez-4/+1
always print nice 'std not found' error when std is not found Fixes https://github.com/rust-lang/miri/issues/3529 Arguably Miri is doing something odd by letting people create no-std sysroots for arbitrary targets -- but equally arguably, there's no good reason for rustc to special-case the host triple here. Being a non-host triple does not imply the target is a no-std target, after all.
2024-05-02Rollup merge of #124568 - Urgau:non-local-defs-doctest, ↵Guillaume Gomez-4/+49
r=michaelwoerister,GuillaumeGomez Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint This PR adjust the help suggestion of the `non_local_definitions` lint when encountering a `#[macro_export]` at top-level doctest. So instead of a non-sentential help suggestion to move the `macro_rules!` up above the `rustdoc`-generated function. We now suggest users to declare their own function. Fixes *(partially, needs backport)* #124534
2024-05-02Auto merge of #12745 - y21:collapsible_match_or_pat, r=llogiqbors-81/+134
Suggest collapsing nested or patterns if the MSRV allows it Nested `or` patterns have been stable since 1.53, so we should be able to suggest `Some(1 | 2)` if the MSRV isn't set below that. This change adds an msrv check and also moves it to `matches/mod.rs`, because it's also needed by `redundant_guards`. changelog: [`collapsible_match`]: suggest collapsing nested or patterns if the MSRV allows it
2024-05-02Auto merge of #12743 - CBSpeir:remove-paths-vec_resize, r=y21bors-3/+0
Remove `dead_code` paths The following paths are `dead_code` and can be removed: ### `clippy_utils::paths::VEC_RESIZE` * Introduced when `vec_resize_to_zero` lint added in PR https://github.com/rust-lang/rust-clippy/pull/5637 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/8acc4d2f1e255e0e97e48b7a285a7d6db4a03bd6 ### `clippy_utils::paths::SLICE_GET` * Introduced when `get_first` lint added in PR https://github.com/rust-lang/rust-clippy/pull/8882 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/a8d80d531f1d358c26295eb3d81624594544dd4b ### `clippy_utils::paths::STR_BYTES` * Introduced when `bytes_count_to_len` lint added in PR https://github.com/rust-lang/rust-clippy/pull/8711 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/ba6a4595285e38f35970e66db903475989e0be6f When the lints were moved into the `Methods` lint pass, they switched from using paths to diagnostic items. However, the paths were never removed. This occurred in PR https://github.com/rust-lang/rust-clippy/pull/8957. This relates to issue https://github.com/rust-lang/rust-clippy/issues/5393 changelog: none
2024-05-02Auto merge of #12515 - bend-n:🦀, r=llogiqbors-2/+22
fix `for x in y unsafe { }` fixes #12514 ---- changelog: [`needless_for_each`]: unsafe block in for loop body suggestion
2024-05-02Auto merge of #12748 - flip1995:rustup, r=flip1995bors-276/+275
Rustup r? `@ghost` changelog: none
2024-05-02Bump nightly version -> 2024-05-02Philipp Krones-1/+1
2024-05-02Bump Clippy version -> 0.1.80Philipp Krones-5/+5
2024-05-02Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-688/+1548
2024-05-02Auto merge of #12746 - oli-obk:bump_ui_test, r=blyxyasbors-7/+8
Bump ui_test to 0.23 Notable changes: more control over run/rustfix/... and other rustc-specific features. All of these can in theory now be implemented entirely out of tree changelog: none
2024-05-02Auto merge of #124419 - WaffleLapkin:never-type-fallback-docs, r=workingjubileebors-0/+47
Document never type fallback in `!`'s docs Pulled the documentation I've written for #123939. I want a single place where never type fallback is explained, which can be referred in all the lints and migration materials.
2024-05-02Bump ui_test to 0.23Oliver Scherer-7/+8
2024-05-02Auto merge of #12735 - xFrednet:changelog-1-78, r=dswijbors-9/+60
Changelog for Clippy 1.78 :magic_wand: Roses and Violets have colors, Red and Blue are the two, I'm getting to the end of my masters, what a cool goal to pursue --- ### The cat of this release is: *Shadow* submitted by `@benwh1:` <img height=500 src="https://github.com/rust-lang/rust-clippy/assets/32911992/c56af314-4644-482a-a08e-f32f4c7d7b22" alt="The cats of this Clippy release" /> Cats for the next release can be nominated in the comments :D --- changelog: none
2024-05-02Apply suggestions from code review <3Fridtjof Stoldt-15/+2
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
2024-05-02Auto merge of #124521 - Mark-Simulacrum:bootstrap-bump, r=albertlarsan68bors-784/+552
Bump bootstrap compiler to latest beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday This also cherry-picks d716d72586548963f32e5c8d57c41db0065fa6e0 from the beta branching, to continue to workaround #122758. r? bootstrap
2024-05-02fixup links in never type docsWaffle Maybe-3/+3
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-05-01Remove clippy_utils::paths::{SLICE_GET, STR_BYTES}Christopher B. Speir-2/+0
Both clippy_utils::paths::SLICE_GET and clippy_utils::paths::STR_BYTES are dead_code and can therefore be removed.
2024-05-01Workaround rustfmt bug replacing type ascriptionMark Rousskov-0/+1
2024-05-02check for `matches!` macro directly in `redundant_guards`y21-34/+48
2024-05-02allow or patterns for a high enough MSRV in `collapsible_match`y21-49/+88
2024-05-02Auto merge of #123939 - WaffleLapkin:never-fallback-unsafe-lint, ↵bors-21/+574
r=compiler-errors Add a lint against never type fallback affecting unsafe code ~~I'm not very happy with the code quality... `VecGraph` not allowing you to get predecessors is very annoying. This should work though, so there is that.~~ (ended up updating `VecGraph` to support getting predecessors) ~~First few commits are from https://github.com/rust-lang/rust/pull/123934 https://github.com/rust-lang/rust/pull/123980~~
2024-05-02Slightly reformat !'s docs after applying github suggestionsWaffle Lapkin-5/+7
2024-05-01Step bootstrap cfgsMark Rousskov-282/+38
2024-05-02Apply suggestions from code reviewWaffle Maybe-8/+7
Co-authored-by: Kevin Reid <kpreid@switchb.org> Co-authored-by: Herman Skogseth <herman.skogseth@me.com> Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-05-02Split `hir_typeck_never_type_fallback_flowing_into_unsafe` into 5 slugsWaffle Lapkin-30/+44
2024-05-02Add proper support for all kinds of unsafe ops to the lintWaffle Lapkin-49/+321
(never_type_fallback_flowing_into_unsafe)
2024-05-02Add `UnordMap::try_insert`Waffle Lapkin-0/+7
2024-05-02Reorganize `use`sWaffle Lapkin-13/+11
2024-05-02Add an explanation about never type fallbackMaybe Waffle-2/+38
2024-05-02Add a lint against never type fallback affecting unsafe codeMaybe Waffle-10/+241