summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-08-04bump channelBoxy-1/+1
2025-08-02Revert "`return_and_then`: only lint returning expressions (#14783)"Philipp Krones-165/+9
This reverts commit 459364b971c717462e99848ceba3eb545867ee33, reversing changes made to 62ba9969a4969574716e52dac1a28a11202c0ea2.
2025-08-02Revert "Extend `manual_is_variant_and lint` to check for boolean map ↵Philipp Krones-240/+15
comparisons (#14646)" This reverts commit 551870df96213c423c94a012c1981fc0cdc06fc2, reversing changes made to 3927a61a546b0f134b3790d66ef73f1960e8bc8b.
2025-08-02Consider deref'ed argument as non-temporary (#15172)Timo-16/+166
If there are more than one dereference (there is one corresponding matched with a borrow in any case), consider that the argument might point to a place expression, which is the safest choice. Also, use an appropriate number of dereferences in suggestions involving arguments using themselves multiple dereferences. Fixes rust-lang/rust-clippy#15166 changelog: [`swap_with_temporary`]: fix false positive leading to different semantics being suggested, and use the right number of dereferences in suggestion r? y21 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> ### Summary Notes - [beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15172#issuecomment-3016752569) by [samueltardieu](https://github.com/samueltardieu) *Managed by `@rustbot`—see [help](https://forge.rust-lang.org/triagebot/note.html) for details* <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
2025-08-02Move `uninlined_format_args` to `pedantic` (#15287)dswij-1/+1
Fixes https://github.com/rust-lang/rust-clippy/issues/15151 See also https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/uninlined_format_args.20is.20contentious/ changelog: Move [`uninlined_format_args`] to `pedantic`
2025-08-01rustdoc: don't treat methods under const impls or traits as constDeadbeef-1/+14
2025-07-24Mitigate `#[align]` name resolution ambiguity regression with a renameJieyou Xu-3/+7
From `#[align]` -> `#[rustc_align]`. Attributes starting with `rustc` are always perma-unstable and feature-gated by `feature(rustc_attrs)`. See regression RUST-143834. For the underlying problem where even introducing new feature-gated unstable built-in attributes can break user code such as ```rs macro_rules! align { () => { /* .. */ }; } pub(crate) use align; // `use` here becomes ambiguous ``` refer to RUST-134963. Since the `#[align]` attribute is still feature-gated by `feature(fn_align)`, we can rename it as a mitigation. Note that `#[rustc_align]` will obviously mean that current unstable user code using `feature(fn_aling)` will need additionally `feature(rustc_attrs)`, but this is a short-term mitigation to buy time, and is expected to be changed to a better name with less collision potential. See <https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-07-17/near/529290371> where mitigation options were considered. (cherry picked from commit 69b71e44107b4905ec7ad84ccb3edf4f14b3df69)
2025-07-24Reword mismatched-lifetime-syntaxes text based on feedbackJake Goulding-6/+7
Key changes include: - Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier. - The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds. - Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects. - Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion. (cherry picked from commit 553074431875701f66107049339dc1e67f0cdeba)
2025-07-17Fix rustdoc not correctly showing attributes with re-exportsJonathan Brouwer-1/+2
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com> (cherry picked from commit 58418d881a91e9f37b0c8fd07f0218850725efda)
2025-07-12Auto merge of #143794 - lnicola:ra-backports, r=cuviperbors-110/+562
`rust-analyzer` backports Closes https://github.com/rust-lang/rust-analyzer/issues/20182
2025-07-11fix: Use `ROOT` hygiene for `args` inside new `format_args!` expansionShoyu Vanilla-27/+36
2025-07-11Backport new sized-hierarchy trait bounds in old waysShoyu Vanilla-24/+78
2025-07-11Adjust minicore for Sized Hierarchy changesLukas Wirth-52/+75
2025-07-11Minic rustc's new `format_args!` expansionShoyu Vanilla-41/+366
2025-07-11Implement region negation to minicore and add a flag `fmt_before_1_89_0`Shoyu Vanilla-8/+49
2025-07-11Auto merge of #143757 - cuviper:beta-next, r=cuviperbors-4/+6
[beta] backports - Beta backport: null terminate UNICODE_STRINGs rust-lang/rust#143275 - Fix hang in --print=file-names in bootstrap rust-lang/rust#142928 - Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect rust-lang/rust#142980 - Update LLVM submodule rust-lang/rust#143126 - Do not unify borrowed locals in CopyProp. rust-lang/rust#143509 - Disable docs for `compiler-builtins` and `sysroot` rust-lang/rust#143660 - Update version placeholders in stdarch rust-lang/stdarch#1840 r? cuviper
2025-07-10Disable docs for `compiler-builtins` and `sysroot`Josh Stone-4/+0
Bootstrap already had a manual doc filter for the `sysroot` crate, but other library crates keep themselves out of the public docs by setting `[lib] doc = false` in their manifest. This seems like a better solution to hide `compiler-builtins` docs, and removes the `sysroot` hack too. (cherry picked from commit 87e7539fcdfa45b2aab618c044f888432c5d097d)
2025-07-10Update LLVM submoduledianqk-0/+0
(cherry picked from commit 1339b905505917725c3f1cd1bb52d7ff4f5eea9a)
2025-07-10Fix hang in --print=file-names in bootstrapNoratrieb-0/+6
In an interactive context, the subprocess inherited a real tty stdin, which lead it it waiting for something to happen, even though nothing happened. By explicitly passing null as stdin we make sure an empty file is passed, which achieves the desired behavior. (cherry picked from commit 3003050d473abd13d56c7e7966b971bd7443194f)
2025-06-26stage0 bump to 1.88.0Josh Stone-462/+356
2025-06-24[beta] Update src/doc/referenceEric Huss-0/+0
2025-06-24[beta] Update cargoEric Huss-0/+0
2025-06-23Update channel to betaJosh Stone-1/+1
2025-06-23Auto merge of #142901 - matthiaskrgr:rollup-topt4p6, r=matthiaskrgrbors-24/+52
Rollup of 5 pull requests Successful merges: - rust-lang/rust#141597 (Document subdirectories of UI tests with README files) - rust-lang/rust#142823 (Port `#[no_mangle]` to new attribute parsing infrastructure) - rust-lang/rust#142828 (1.88.0 release notes) - rust-lang/rust#142854 (centralize `-Zmin-function-alignment` logic) - rust-lang/rust#142875 (Check rustdoc-json-types FORMAT_VERSION is correctly updated) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-23Rollup merge of #142875 - GuillaumeGomez:rustdoc-json-types-version-update, ↵Matthias Krüger-0/+25
r=Kobzol Check rustdoc-json-types FORMAT_VERSION is correctly updated Follow-up of https://github.com/rust-lang/rust/pull/142677. ``@nnethercote`` suggested that we should also ensure that the `FORMAT_VERSION` was only increased by 1 and we should check for it, this PR does it. cc ``@aDotInTheVoid`` r? ghost
2025-06-23Rollup merge of #142823 - JonathanBrouwer:no_mangle_parser, r=jdonszelmannMatthias Krüger-24/+22
Port `#[no_mangle]` to new attribute parsing infrastructure Ports `no_mangle` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? ``@jdonszelmann``
2025-06-23Rollup merge of #141597 - Oneirical:unquestionable-instruction, r=jieyouxuMatthias Krüger-0/+5
Document subdirectories of UI tests with README files Part of rust-lang/rust#133895 and the [2025 Google Summer of Code](https://blog.rust-lang.org/2025/05/08/gsoc-2025-selected-projects/) associated project. When adding a new UI test, one is faced with hundreds of subdirectories in `tests/ui` reflecting various categories. Knowing where to put the new test is not trivial, as many of the categories have slightly misleading names. For example, `moves` does not only refer to the `move` keyword but to functions taking ownership in general, whereas `allocator` does not refer to allocation in general but rather to the very specific `allocator_api` and `global_allocator` features. Many contributors will therefore place their test at the top level of ̀`tests/ui` where it will be mixed with hundreds of unrelated tests. This PR is a tentative move towards more clearly defined tag/categories, with a SUMMARY.md file documenting the true purpose of each subdirectory, placed inside `tests/ui`. r? ``@jieyouxu``
2025-06-22Update cargoEric Huss-0/+0
2025-06-22Port `#[no_mangle]` to new attribute parsing infrastructureJonathan Brouwer-24/+22
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22Add a SUMMARY.md outlining immediate subdirectories of the ui test suiteOneirical-0/+5
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2025-06-22Rollup merge of #142877 - ↵Guillaume Gomez-0/+3
yotamofek:pr/rustdoc/comment-eslint-installation-req, r=GuillaumeGomez Document why tidy checks if `eslint` is installed via `npm` Discussion here: rust-lang/rust#142851
2025-06-22Rollup merge of #142868 - klensy:dc, r=oli-obkGuillaume Gomez-2/+1
remove few allow(dead_code) Few from serial/parallel compiler leftovers and few from bootstrap.
2025-06-22Document why tidy checks if `eslint` is installed via `npm`Yotam Ofek-0/+3
2025-06-22Check rustdoc-json-types FORMAT_VERSION correct changeGuillaume Gomez-0/+25
2025-06-22Port `#[must_use]` to new attribute parsing infrastructureJonathan Brouwer-22/+42
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22remove few from bootstrap tooklensy-2/+1
2025-06-22Rollup merge of #142776 - dtolnay:hirattrstyle2, r=jdonszelmannJacob Pratt-3/+10
All HIR attributes are outer Fixes https://github.com/rust-lang/rust/issues/142649. Closes https://github.com/rust-lang/rust/pull/142759. All HIR attributes, including parsed and not yet parsed, will now be rendered as outer attributes by `rustc_hir_pretty`. The original style of the corresponding AST attribute(s) is not relevant for pretty printing, only for diagnostics. r? ````@jdonszelmann````
2025-06-22Rollup merge of #142747 - nnethercote:json-conversion-cleanups, r=aDotInTheVoidJacob Pratt-189/+169
rustdoc_json: conversion cleanups A bunch of clean-to-types conversion cleanups I found while working on perf-related stuff in rustdoc_json. r? ```@aDotInTheVoid```
2025-06-22Rollup merge of #140254 - bjorn3:rustc_panic_abort_abort, r=petrochenkovJacob Pratt-12/+0
Pass -Cpanic=abort for the panic_abort crate The panic_abort crate must be compiled with panic=abort, but cargo doesn't allow setting the panic strategy for a single crate the usual way using `panic="abort"`, but luckily per-package rustflags do allow this. Bootstrap previously handled this in its rustc wrapper, but for example the build systems of cg_clif and cg_gcc don't use the rustc wrapper, so they would either need to add one, patch the standard library or be unable to build a sysroot suitable for both panic=abort and panic=unwind (as is currently the case). Required for https://github.com/rust-lang/rustc_codegen_cranelift/issues/1567
2025-06-22Auto merge of #141856 - folkertdev:run-make-forward-compiletest-runner, ↵bors-1/+28
r=jieyouxu forward the bootstrap `runner` to `run-make` The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions. The configuration can look like this ```toml # in bootstrap.toml [target.s390x-unknown-linux-gnu] runner = "qemu-s390x -L /usr/s390x-linux-gnu" ``` Any C compilation automatically sets the correct target. Calls to rustc must use `.target(target())`. Then, a command like below will work by cross-compiling to the given target, and using the given runner for that target to execute the binary: ``` ./x test tests/run-make/c-link-to-rust-va-list-fn --target s390x-unknown-linux-gnu ``` The runner can also be used for e.g. running with `valgrind`. This PR also enables its use in the test case that I care about, hopefully that actually does work on the platforms that CI uses. We should probably run some try jobs to be sure? r? `@jieyouxu` try-job: test-various try-job: armhf-gnu
2025-06-22forward the bootstrap `runner` to `run-make`Folkert de Vries-1/+28
The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions.
2025-06-21Auto merge of #142667 - yotamofek:pr/rustdoc/more-write-shared-perf, ↵bors-27/+12
r=nnethercote Avoid a few more allocations in `write_shared.rs` Inspired by rust-lang/rust#141421 , avoids a few `Vec`, `PathBuf` and `String` allocations in `write_shared.rs`. I don't think these will show up on benchmarks, but are still worthwhile IMHO. Also includes a few small cleanups. r? nnethercote - if you'd like :)
2025-06-22Rename some methods.Nicholas Nethercote-8/+12
- `convert_static` -> `from_clean_static` - `from_function` -> `from_clean_function` To match the pre-existing `from_clean_item` and `FromClean::from_clean`. I left `JsonRenderer::convert_item` unchanged because it's a bit different.
2025-06-22Use `FromClean` more.Nicholas Nethercote-121/+156
The `FromClean` trait is used a lot for converting to rustdoc-json format. But it's not used universally; there are still some ad hoc functions and methods for converting. This commit fixes this inconsistency by using `FromClean` more. The commit also introduces `FromClean` for `Box` and `Option`. This lets a lot of `as_ref` and `map` calls be removed in favour of simple `into_json` calls.
2025-06-22Remove some code.Nicholas Nethercote-32/+1
It's just replicating exactly what is done by `<Vec<GenericParamDef> as FromClean>::into_json`
2025-06-22Remove some dead code.Nicholas Nethercote-25/+0
We currently have both `FromClean<clean::Constant> for Constant` and `FromClean<clean::ConstantKind> for Constant` which are basically identical, but the former is unused.
2025-06-22Use `sym::asterisk` to avoid a `Symbol::intern` call.Nicholas Nethercote-5/+2
2025-06-21All HIR attributes are outerDavid Tolnay-3/+10
2025-06-21Rollup merge of #142804 - zachs18:rename-layouts-to-layoutdata-in-comments, ↵Matthias Krüger-1/+1
r=saethlin Rename `LayoutS` to `LayoutData` in comments `LayoutS` was renamed to `LayoutData`, but some comments in the compiler were not changed. This updates comments in the compiler (and one section of commented-out code in rust-analyzer) to refer to `LayoutData` instead of `LayoutS`. cc <https://github.com/rust-lang/rust/pull/132252>, `@workingjubilee`
2025-06-21Rollup merge of #142787 - samueltardieu:diag-items-for-clippy, ↵Matthias Krüger-24/+16
r=Manishearth,Urgau Add diagnostic items for Clippy Clippy still uses some paths to access items from the standard library. Adding the missing diagnostic items allows removing the last remaining paths. Closes rust-lang/rust-clippy#5393