| Age | Commit message (Collapse) | Author | Lines |
|
|
|
(cherry picked from commit 036b5fcb0241c3dc28823c43b52a80376a4c040a)
|
|
The `mir_drops_elaborated_and_const_checked` query result has been
stolen already and cannot be borrowed again. Use the `optimized_mir`
query result instead.
changelog: [`missing_const_for_fn`]: fix ICE with some compilation
options
Fixes rust-lang/rust-clippy#14774
r? @Jarcho
|
|
(rust-lang/rust-clippy#14810)
Rust 1.88 introduces the `dangerous_implicit_autorefs` lint which warns
about using implicit autorefs on a place obtained from a raw pointer, as
this may create aliasing issues.
Prevent `clippy::needless_borrow` from triggering in this case, by
disabling the lint when taking a reference on a raw pointer dereference.
There might be a better way for doing this in the long run with a finer
way of distinguish the problematic cases, but this will prevent Clippy
from contradicting the compiler in the meantime.
Fixes rust-lang/rust-clippy#14743
changelog: [`needless_borrow`]: do not contradict the compiler's
`dangerous_implicit_autorefs` lint even though the refererences are not
mandatory
@rustbot label +beta-nominated
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_SUMMARY_START -->
- [Beta nomination for
1.88](https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957)
by [samueltardieu](https://github.com/samueltardieu)
Generated by triagebot, see
[help](https://forge.rust-lang.org/triagebot/note.html) for how to add
more
<!--
TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957":{"title":"Beta
nomination for
1.88","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END
-->
<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
|
|
changelog: [`transmute_float_to_int, transmute_int_to_char,
transmute_int_to_float`, `transmute_num_to_bytes`]: remove lints, now in
rustc
these lints are now mostly in rustc, so they dont need to be in clippy
anymore
https://github.com/rust-lang/rust/pull/136083#discussion_r2009897120
pending https://github.com/rust-lang/rust/pull/140431:
transmute_int_to_bool
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_SUMMARY_START -->
- ["Rust version of new lints should be checked" by
@samueltardieu](https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576)
Generated by triagebot, see
[help](https://forge.rust-lang.org/triagebot/note.html) for how to add
more
<!--
TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576":{"title":"Rust
version of new lints should be
checked","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END
-->
<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
|
|
Closes rust-lang/rust-clippy#14722
changelog: [`collapsible_if`] fix FP on block stmt before expr
|
|
Fixes
https://github.com/rust-lang/rust-clippy/pull/14397#issuecomment-2848328221
r? @samueltardieu
changelog: Don't warn about clippy.toml disallowed paths for crates that
were not loaded
|
|
(cherry picked from commit c7a2694a803513d09c96dbaf3f3a7b099d93cec6)
|
|
|
|
To make it easier to migrate off the `rust-lang-ci/rust` repository.
(cherry picked from commit 7d32303574c63cb396d5e1cb17f00061665a0f75)
|
|
This is needed to make the cache work after moving CI from the `rust-lang-ci` org to `rust-lang`.
(cherry picked from commit eb530325f08b9151cb1917d01a8cb913ab1dd1ab)
|
|
At the moment, it seems like Windows Server 2025 20250504.1.0 is
misconfigured causing insufficient disk space failures. Temporarily go
back to Windows Server 2022 in the hope that those are not also
misconfigured.
(cherry picked from commit f4ce73ede2f4df0f9983b337ceeed96c11f52c14)
|
|
(cherry picked from commit 448b7afb32e4fd55af8c0592227b16fcc5b64308)
|
|
(cherry picked from commit 577e82f71b07b11c6a6f74ac788c65cbd2674a2a)
|
|
|
|
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #140801 (Use span before macro expansion in lint for-loops-over-falibles)
- #140804 (add signed ints to unn- transmutes to ensure feature parity)
- #140812 (Fix `tests/rustdoc-json` triagebot message path)
- #140817 (bootstrap: more consistent use of `...` when citing configuration snippets)
- #140828 (Enable non-leaf Frame Pointers for Arm64 Windows)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
bootstrap: more consistent use of `...` when citing configuration snippets
|
|
add signed ints to unn- transmutes to ensure feature parity
i forgot a few cases https://github.com/rust-lang/rust-clippy/pull/14703/#pullrequestreview-2824194994
adds
- char -> i32
- i32 -> char
- float -> size ()
- size -> float
- i32 -> float
``@rustbot`` label L-unnecessary_transmutes
|
|
All uses have been removed. And it's nonsensical: an identifier by
definition has at least one char.
The commits adds an is-non-empty assertion to `Ident::new` to enforce
this, and converts some `Ident` constructions to use `Ident::new`.
Adding the assertion requires making `Ident::new` and
`Ident::with_dummy_span` non-const, which is no great loss.
The commit amends a couple of places that do path splitting to ensure no
empty identifiers are created.
|
|
Do not deny warnings in "fast" try builds
When we do the classic ``@bors` try` build without specifying `try-job` in the PR description, we want to get a compiler toolchain for perf./crater/local experimentation as fast as possible. We don't run any tests in that case, so it seems reasonable to also ignore warnings.
Fixes: https://github.com/rust-lang/rust/issues/140753
r? `@jieyouxu`
try-job: dist-x86_64-linux
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #140736 (trait selection: check `&` before suggest remove deref)
- #140755 ([win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows)
- #140756 ([arm64] Pointer auth test should link with C static library statically)
- #140758 ([win][arm64] Disable MSVC Linker 'Arm Hazard' warning)
- #140759 ([win][arm64] Disable std::fs tests that require symlinks)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
[win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows
While trying to get the aarch64-msvc build working correctly (#140136), various DebugInfo related tests were failing.
I've added comments to each test to indicate why it is disabled and linked to appropriate bugs.
* `tests/debuginfo/step-into-match.rs`: Stepping at the end of a function on goes to the callsite, not the instruction after it.
* `tests/debuginfo/type-names.rs`: Arm64 Windows cdb doesn't support JavaScript extensions. Followed up with the Microsoft Debugger Tools team to fix this.
* `tests/ui/runtime/backtrace-debuginfo.rs`: Backtraces are truncated due to #140489
|
|
make it possible to run in-tree rustfmt with `x run rustfmt`
Currently, there is no way to run in-tree `rustfmt` using `x fmt` or `x test tidy` commands. This PR implements `rustfmt` on `x run`, which allows bootstrap to run the in-tree `rustfmt`.
Fixes #140723
|
|
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
style: Never break within a nullary function call `func()` or a unit literal `()`
Implements https://github.com/rust-lang/style-team/issues/210
|
|
rustdoc-json: Remove newlines from attributes
Fixes #140689
Not sure if this needs to bump `FORMAT_VERSION` or not.
r? ``@GuillaumeGomez``
cc ``@obi1kenobi``
|
|
Only prefer param-env candidates if they remain non-global after norm
Introduce `CandidateSource::GlobalParamEnv`, and dynamically compute the `CandidateSource` based on whether the predicate contains params *post-normalization*.
This code needs some cleanup and documentation. I'm just putting this up for review.
cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/179
r? lcnr
|
|
allow deref patterns to participate in exhaustiveness analysis
Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2].
Tracking issue for deref patterns: #87121
r? `@Nadrieril`
[^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`.
[^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
`()`
|
|
|
|
|
|
r=jieyouxu
run-make-support: set rustc dylib path for cargo wrapper
Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to execute correctly when rustc is built without rpath. In these setups, runtime loading of rustc’s shared libraries fails unless the appropriate dynamic library path is set manually.
This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(), aligning its behavior with the existing rustc() wrapper: https://github.com/rust-lang/rust/blob/f76c7367c6363d33ddb5a93b5de0d158b2d827f6/src/tools/run-make-support/src/external_deps/rustc.rs#L39-L43
This ensures that Cargo invocations during tests inherit the necessary dylib paths, avoiding errors related to missing shared libraries in rpath-less builds.
Fixes part of #140738
|
|
r=jieyouxu
add armv5te-unknown-linux-gnueabi target maintainer
My employer is interested in having this target maintained and we already have some tests in our CI running for it.
armv5te-unknown-linux-gnueabi can be ticket off in #113739.
|
|
r=notriddle
[rustdoc] Ensure that temporary doctest folder is correctly removed even if doctests failed
Fixes #139899.
The bug was due to the fact that if any doctest fails for any reason, we call `exit` (or it's called inside `libtest` if not edition 2024), meaning that `TempDir`'s destructor isn't called, and therefore the temporary folder isn't cleaned up.
Took me a while to figure out how to reproduce but finally I was able to reproduce the bug with:
`````rust
#![doc(test(attr(deny(warnings))))]
//! ```
//! let a = 12;
//! ```
`````
And then I ensured that panicking doctests were cleaned up as well:
`````rust
//! ```
//! panic!();
//! ```
`````
And finally I checked if it was fixed for merged doctests too (`--edition 2024`).
To make this work, I needed to add a new public function in `libtest` too which would call a function once all tests have been run.
So only issue is: I have absolutely no idea how we can add a regression test for this fix. If anyone has an idea...
r? `@notriddle`
|
|
Separate dataflow analysis and results
`Analysis` gets put into `Results` with `EntryStates`, by `iterate_to_fixpoint`. This has two problems:
- `Results` is passed various places where only `Analysis` is needed.
- `EntryStates` is passed around mutably everywhere even though it is immutable.
This commit mostly separates `Analysis` from `Results` and fixes these two problems.
r? `@davidtwco`
|
|
|
|
Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to
execute correctly when rustc is built without rpath. In these setups, runtime
loading of rustc’s shared libraries fails unless the appropriate dynamic library
path is set manually.
This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(),
aligning its behavior with the existing rustc() wrapper:
https://github.com/rust-lang/rust/blob/f76c7367c6363d33ddb5a93b5de0d158b2d827f6/src/tools/run-make-support/src/external_deps/rustc.rs#L39
This ensures that Cargo invocations during tests inherit the necessary dylib
paths, avoiding errors related to missing shared libraries in rpath-less builds.
Fixes part of #140738
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #139518 (Stabilize precise capture syntax in style guide)
- #140398 (Fix backtrace for cygwin)
- #140719 (fix typo in autorefs lint doc example)
- #140724 (Update `compiler-builtins` to 0.1.158)
r? `@ghost`
`@rustbot` modify labels: rollup
|