| Age | Commit message (Collapse) | Author | Lines |
|
`ptr_eq` was recently enhanced to lint on more cases of raw pointers
comparison:
- lint on all raw pointer comparison, by proposing to use
`[core|std]::ptr::eq(lhs, rhs)` instead of `lhs == rhs`;
- removing one symetric `as usize` on each size if needed
- peeling any level of `as *[const|mut] _` if the remaining expression
can still be coerced into the original one (i.e., is a ref or raw
pointer to the same type as before)
The current change restricts the lint to the cases where at least one
level of symetric `as usize`, or any conversion to a raw pointer, could
be removed. For example, a direct comparaison of two raw pointers will
not trigger the lint anymore.
changelog: [`ptr_eq`]: do not lint when comparing two raw pointers
directly with no casts involved
Fixes rust-lang/rust-clippy#14525
|
|
We do not want to remove casts done inside macros. Also, when printing
the suggestion, take it from the same context as the origin expression
(the root context).
Problems found while working on #14526, but should be merged even if
#14526 is not.
changelog: none
|
|
Fixes rust-lang/rust-clippy#14449, introduced in #14314
changelog: [`map_entry`]: fix a false positive where the lint would
trigger without any insert calls present
|
|
Fixes https://github.com/rust-lang/rust-clippy/issues/14660
changelog: none
|
|
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 7b25d4a99edc12909dc73c31cb6a44238c4b9bf9)
|
|
(cherry picked from commit 714ea10ea41e97310a1b3d90fed4cfb3e2dd6b73)
|
|
(cherry picked from commit aa69e3a0cb8f1b2e086709a038baad6f39249150)
|
|
a function
(cherry picked from commit 3ef98a55ef95b058e55897f1b213dd965839e3ed)
|
|
(cherry picked from commit 3ededc1053f752d993a0b25286faebfe3616819d)
|
|
(cherry picked from commit 35363245657ee53a3735f1cef0df9a45e9ed44b9)
|
|
This PR is fixing a regression introduced by #121646 that can lead to a
double free when dropping the channel.
The details of the bug can be found in the corresponding crossbeam PR
https://github.com/crossbeam-rs/crossbeam/pull/1187
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
(cherry picked from commit b9e2ac5c7b1d6bb3b6f5fdfe0819eaf7e95bf7ff)
|
|
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
(cherry picked from commit 9eb6a5446a4e35f48ad22a5b70a74a8badb9fa0d)
|
|
(cherry picked from commit f9927ee042f7d7418fbb64082272ce1feff4d895)
|
|
(cherry picked from commit a91e97c06c778b84663cfe4f2871b868d275a137)
|
|
|
|
|
|
|
|
Bump boostrap `cc` to 1.2.17 and `cmake` to 0.1.54
The `cc` version in `bootstrap` was reverted down to 1.1.22 in https://github.com/rust-lang/rust/pull/137460 (previously at 1.2.0). The offending issue has since then been resolved in https://github.com/rust-lang/cc-rs/pull/1413, and a new version of `cc` has been released in https://github.com/rust-lang/cc-rs/pull/1435, so let's try to update the version again.
See [the `cc-rs` changelog](https://github.com/rust-lang/cc-rs/blob/d9dd20e376368c7535f6ef89b809098f5f203c1a/CHANGELOG.md) and [the `cmake-rs` changelog](https://github.com/rust-lang/cmake-rs/blob/fd56c5a6b4ecda8815c863eb5b12d7b3f0391197/CHANGELOG.md) for details on what has changed here.
r? jieyouxu who tried this last in https://github.com/rust-lang/rust/pull/137022.
`@rustbot` label T-bootstrap
try-job: *apple*
|
|
Miri subtree update
r? `@ghost`
|
|
bootstrap: update `test_find` test
`cc::Build::get_archiver` is noisy on the `arm-linux-androideabi` target and constantly printing `llvm-ar --version` output during bootstrap tests on all platforms.
|
|
Update target maintainers for thumb targets to reflect new REWG Arm team name
Closes #139027
The name of the team responsible for these targets has changed as the team was merged with other Arm-related teams (see https://github.com/rust-embedded/wg/pull/818). The link gives an up-to-date list of github usernames that can be pinged, whereas the old email address is not very actively maintained or tracked.
|
|
r=Kobzol
feat(config): Add ChangeId enum for suppressing warnings
closes: #138925
|
|
rustc_resolve: fix instability in lib.rmeta contents
rust-lang/rust@23032f31c91f2 accidentally introduced some nondeterminism in the ordering of lib.rmeta files, which we caught in our bazel-based builds only recently due to being further behind than normal. In my testing, this fixes the issue.
|
|
Greatly simplify doctest parsing and information extraction
The original process was pretty terrible, as it tried to extract information such as attributes by performing matches over tokens like `#!`, which doesn't work very well considering you can have `# ! [`, which is valid.
Also, it now does it in one pass: if the parser is happy, then we try to extract information, otherwise we return early.
r? `@fmease`
|
|
|
|
`cc::Build::get_archiver` is noisy on the `arm-linux-androideabi` target and
constantly printing `llvm-ar --version` output during bootstrap tests on all platforms.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
This PR makes a fairly large version update to CMake and cc, so it is
likely that LLVM is built differently.
|
|
Similarly to what was previously done for the `llvm` step.
|
|
compiler-rt's CMake setup seems to have special logic for Apple
platforms that works poorly when this is not set.
|
|
|
|
To avoid a panic in cmake-rs that was introduced in:
https://github.com/rust-lang/cmake-rs/pull/158
|
|
|
|
description references
|
|
|
|
Improve `xcrun` error handling
The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs.
Fixes https://github.com/rust-lang/rust/issues/56829.
Fixes https://github.com/rust-lang/rust/issues/84534.
Part of https://github.com/rust-lang/rust/issues/129432.
See also the alternative https://github.com/rust-lang/rust/pull/131433.
Tested on:
- `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6
- With no tooling installed
- With Xcode 9.2
- With Xcode 9.2 Commandline Tools
- `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4
- With Xcode 13.4.1
- With Xcode 16.2
- Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim)
- `aarch64-apple-darwin`, VM running macOS 15.3.1
- With no tooling installed
- With Xcode 16.2 Commandline Tools
``@rustbot`` label O-apple
r? compiler
CC ``@BlackHoleFox`` ``@thomcc``
|
|
Rollup of 7 pull requests
Successful merges:
- #138844 (expand: Leave traces when expanding `cfg` attributes)
- #138926 (Remove `kw::Empty` uses from `rustc_middle`.)
- #138989 (Clean up a few things in rustc_hir_analysis::check::region)
- #138999 (Report compiletest pass mode if forced)
- #139014 (Improve suggest construct with literal syntax instead of calling)
- #139015 (Remove unneeded LLVM CI test assertions)
- #139016 (Add job duration changes to post-merge analysis report)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add job duration changes to post-merge analysis report
This should help us observe large regressions in job duration changes.
I would also like to add quick links to GH jobs/workflow to the post-merge workflow, but for that I first need to store some CI metadata to the bootstrap metrics, to make it easier to lookup the corresponding GH workflows (otherwise we'd need to look them up by commit SHA, which would be much more complicated). The last commit adds this metadata. Once this PR is merged, and the metadata will be available in the metrics stored on S3, I'll send a follow-up PR that uses the metadata to add links to job names in the post-merge workflow report.
r? `@marcoieni`
|
|
Remove unneeded LLVM CI test assertions
The `download_ci_llvm` bootstrap test was checking implementation details of the LLVM CI download check, which isn't very useful. It was essentially testing "if function_that_checks_if_llvm_ci_is_available returns true, we enable CI LLVM", but the usage of the function was an implementation detail. After https://github.com/rust-lang/rust/pull/138704, the inner implementation has changed, so the test now breaks if LLVM is updated.
I don't think that it's very useful to test implementation details like this, without taking the outside git state into account. Ideally, we should mock the git state for the test, otherwise the test will randomly break when executed in environments which the test does not control (e.g. on CI when a LLVM change happens).
I only kept the part of the test that checks that LLVM CI isn't used when we specify `download-ci-llvm = false`, as that should hold under all conditions, CI/local, and all git states.
I also kept the `if-unchanged` assertion, but only on CI, and as a temporary measure. After https://github.com/rust-lang/rust/pull/138591, we should have a proper way of mocking the git state to make the test robust, and make it test what we actually want.
Fixes [this](https://github.com/rust-lang/rust/pull/138784#issuecomment-2751460456).
r? `@ghost`
|
|
Report compiletest pass mode if forced
This is very non-obvious if it fails in PR CI, because the starting invocation is miles away from the final test suite outcome.
|
|
Remove `kw::Empty` uses from `rustc_middle`.
There are several places in `rustc_middle` that check for an empty lifetime name. These checks appear to be totally unnecessary, because empty lifetime names aren't produced here. (Empty lifetime names *are* possible in `hir::Lifetime`. Perhaps there was some confusion between it and the `rustc_middle` types?)
This commit removes the `kw::Empty` checks.
r? `@lcnr`
|
|
expand: Leave traces when expanding `cfg` attributes
This is the same as https://github.com/rust-lang/rust/pull/138515, but for `cfg(true)` instead of `cfg_attr`.
The difference is that `cfg(true)`s already left "traces" after themselves - the `cfg` attributes themselves, with `expanded_inert_attrs` set to true, with full tokens, available to proc macros.
This is not a reasonably expected behavior, but it could not be removed without a replacement, because a [major rustdoc feature](https://github.com/rust-lang/rfcs/pull/3631) and a number of clippy lints rely on it. This PR implements a replacement.
This needs a crater run, because it changes observable behavior (in an intended way) - proc macros can no longer see expanded `cfg(true)` attributes.
(Some minor unnecessary special casing for `sym::cfg_attr` is also removed in this PR.)
r? `@nnethercote`
|
|
first non-crate items and the crate items
|
|
|
|
Introduces the `ChangeId` enum to allow suppressing `change_id` warnings.
Now, `ChangeId` supports both numeric values and the string literal `"ignore"`.
Numeric values behave as expected, while `"ignore"` is used to suppress warning messages.
|
|
This will allow us to provide links to CI workflows, jobs and summaries in the post-merge analysis report.
|
|
|
|
|
|
|