| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This reverts commit 459364b971c717462e99848ceba3eb545867ee33, reversing
changes made to 62ba9969a4969574716e52dac1a28a11202c0ea2.
|
|
comparisons (#14646)"
This reverts commit 551870df96213c423c94a012c1981fc0cdc06fc2, reversing
changes made to 3927a61a546b0f134b3790d66ef73f1960e8bc8b.
|
|
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 -->
|
|
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`
|
|
|
|
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)
|
|
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)
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
(cherry picked from commit 58418d881a91e9f37b0c8fd07f0218850725efda)
|
|
`rust-analyzer` backports
Closes https://github.com/rust-lang/rust-analyzer/issues/20182
|
|
|
|
|
|
|
|
|
|
|
|
[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
|
|
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)
|
|
(cherry picked from commit 1339b905505917725c3f1cd1bb52d7ff4f5eea9a)
|
|
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)
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
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``
|
|
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``
|
|
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
|
|
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
|
|
remove few allow(dead_code)
Few from serial/parallel compiler leftovers and few from bootstrap.
|
|
|
|
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
|
|
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````
|
|
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```
|
|
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
|
|
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
|
|
The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions.
|
|
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 :)
|
|
- `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.
|
|
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.
|
|
It's just replicating exactly what is done by `<Vec<GenericParamDef> as
FromClean>::into_json`
|
|
We currently have both `FromClean<clean::Constant> for Constant` and
`FromClean<clean::ConstantKind> for Constant` which are basically
identical, but the former is unused.
|
|
|
|
|
|
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`
|
|
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
|