Commit graph

277130 commits

Author SHA1 Message Date
dianne
c8e8068fe9 peace of mind: be absolutely sure we don't try to emit a 0-part suggestion
(cherry picked from commit 8dcdb3eb3c)
2025-02-10 23:40:11 -08:00
dianne
909010ebe6 try to suggest eliding redundant binding modifiers
(cherry picked from commit b32a5331dc)
2025-02-10 23:40:02 -08:00
dianne
2f295779ee peace of mind: remove a call to Option::expect
(cherry picked from commit 060cc37f32)
2025-02-10 23:39:51 -08:00
dianne
ee0838fcab reword default binding mode notes
(cherry picked from commit a5cc4cbe64)
2025-02-10 23:39:29 -08:00
dianne
215bfdd07d separate labels for default binding mode spans into their own notes
(cherry picked from commit 767f82039c)
2025-02-10 23:38:56 -08:00
dianne
97cb2d553a don't include trailing open parens in labels for reference patterns
(cherry picked from commit a064e78663)
2025-02-10 23:33:10 -08:00
dianne
6ff2d19d1c experimentally label the spans for default binding modes
(cherry picked from commit 203d3109d8)
2025-02-10 23:32:54 -08:00
dianne
2ee601ced6 highlight the whole problem subpattern when pointing out the default binding mode
(cherry picked from commit 4331f55b72)
2025-02-10 23:21:22 -08:00
dianne
f8b23cdb75 add tests for label formatting
(cherry picked from commit 9202001c1c)
2025-02-10 23:20:55 -08:00
dianne
a9465deb4b use more specific wording for subpatterns from macro expansions
(cherry picked from commit bbe40acb9a)
2025-02-10 23:20:14 -08:00
dianne
1a18daac77 reword pattern migration diagnostic to make sense in all editions
This aligns the main error message a bit more with the phrasing in the
Edition Guide and provides a bit more information on the labels to
(hopefully!) aid in understanding.

(cherry picked from commit bdc6c4d07b)
2025-02-10 23:19:28 -08:00
dianne
acec5868ec pattern migration: move labels out of the suggestion struct
(cherry picked from commit 724b885b4e)
2025-02-10 23:08:35 -08:00
bors
38213856a8 Auto merge of #136650 - cuviper:beta-next, r=cuviper
[beta] backports

- Ensure that we don't try to access fields on a non-struct pattern type #135222
- Do not include GCC source code in source tarballs #135658
- Temporarily bring back `Rvalue::Len` #135709
- Add a couple of missing `ensure_sufficient_stacks` #136352
- Enable kernel sanitizers for aarch64-unknown-none-softfloat #135905

r? cuviper
2025-02-06 20:56:48 +00:00
Jubilee Young
bf24cade3e Enable kernel sanitizers for aarch64-unknown-none-softfloat
We want kernels to be able to use this bare metal target, so
let's enable the sanitizers that kernels want to use.

(cherry picked from commit 6b06aa6192)
2025-02-06 09:53:26 -08:00
Rémy Rakic
01283c450e ensure sufficient stack in unsafety check
(cherry picked from commit 94562ee1ea)
2025-02-06 09:53:26 -08:00
Rémy Rakic
741fa9e39f ensure sufficient stack in tail call check
(cherry picked from commit 2c778c1e4c)
2025-02-06 09:53:26 -08:00
Rémy Rakic
940548094b add tests for issue 135671
(cherry picked from commit c69dea90d7)
2025-02-06 09:53:26 -08:00
Rémy Rakic
197b416baf Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadata, r=davidtwco,RalfJung"
This reverts commit b57d93d8b9, reversing
changes made to 0aeaa5eb22.

(cherry picked from commit 122a55bb44)
2025-02-06 09:53:26 -08:00
Rémy Rakic
c6063d45b7 Revert "Rollup merge of #134371 - scottmcm:fix-134352, r=oli-obk"
This reverts commit 7c301ecdf5, reversing
changes made to dffaad8332.

(cherry picked from commit 0bb4880581)
2025-02-06 09:53:26 -08:00
Rémy Rakic
7302b302d0 Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commit e108481f74, reversing
changes made to 303e8bd768.

(cherry picked from commit ca1c17c88d)
2025-02-06 09:53:26 -08:00
Jakub Beránek
13c3f9b949 Do not include GCC source code in source tarballs
The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet).

(cherry picked from commit f854f34a50)
2025-02-06 09:53:26 -08:00
Esteban Küber
f264675a80 modify test to side-step platform-dependent stderr output
(cherry picked from commit 592f2c90da)
2025-02-06 09:53:26 -08:00
Esteban Küber
e98d52408c Add check for missing fields in enum variant pattern
(cherry picked from commit d44f021904)
2025-02-06 09:53:26 -08:00
Esteban Küber
887965ddb9 Ensure that we don't try to access fields on a non-struct pattern type in diagnostic
Fix #135209.

(cherry picked from commit 5f04f98c9a)
2025-02-06 09:53:26 -08:00
bors
0277061b9a Auto merge of #136391 - ehuss:rust-1.85-beta-backports, r=ehuss
[beta-1.85] backports

* [Add `AsyncFn*` to `core` prelude](https://github.com/rust-lang/rust/pull/135852)
* [Disable `overflow_delimited_expr` in edition 2024](https://github.com/rust-lang/rust/pull/136312)
* [Disable some incorrect rust-analyzer diagnostics on beta](https://github.com/rust-lang/rust/pull/136236)
    * [fix: Fix #[rustc_deprecated_safe_2024]](https://github.com/rust-lang/rust-analyzer/pull/19044)
    * [fix: Fix a bug where enum variants were not considered properly in type ns resolution](https://github.com/rust-lang/rust-analyzer/pull/18976)
* Update edition-guide
    * [Add alternatives for static-mut-refs](https://github.com/rust-lang/edition-guide/pull/354)
    * [Remove rustfmt-overflow-delimited-expr](https://github.com/rust-lang/edition-guide/pull/357)
2025-02-01 17:22:31 +00:00
Eric Huss
cfe3de22e8 Fix core AsyncFn stability attribute 2025-02-01 07:43:21 -08:00
Eric Huss
b5a02ff689 Update edition-guide 2025-02-01 07:29:04 -08:00
Jacob Pratt
fdc22dc54c Rollup merge of #136312 - compiler-errors:overflow_delimited_expr-2024, r=ytmimi
Disable `overflow_delimited_expr` in edition 2024

This reverts the style guide changes and sets the default to "false" in rustfmt for style edition 2024.

r? `@ytmimi`

cc `@rust-lang/style` `@rust-lang/rustfmt`
2025-02-01 07:26:31 -08:00
Lukas Wirth
2fa9d47dfe Disable some incorrect rust-analyzer diagnostics on beta 2025-02-01 07:26:01 -08:00
Matthias Krüger
ee94112627 Rollup merge of #135852 - lukas-code:asyncfn-prelude-core, r=compiler-errors
Add `AsyncFn*` to `core` prelude

In https://github.com/rust-lang/rust/pull/132611 these got added to the `std` prelude only, which looks like an oversight.

r? libs-api
cc `@compiler-errors`
2025-02-01 07:25:01 -08:00
bors
14445aaf35 Auto merge of #136017 - cuviper:beta-next, r=cuviper
[beta] backports

- Always force non-trimming of path in `unreachable_patterns` lint #135310
- Add Profile Override for Non-Git Sources #135433
- resolve symlinks of LLVM tool binaries before copying them #135585
- add cache to `AmbiguityCausesVisitor` #135618
- When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely #135643
- make it possible to use ci-rustc on tarball sources #135722
- Remove test panic from File::open #135837
- Only assert the `Parser` size on specific arches #135855
- [beta] TRPL: more backward-compatible Edition changes #135843

r? cuviper
2025-01-26 03:39:15 +00:00
Chris Krycho
130f95117f [beta] TRPL: integrate edits to Chapter 17 2025-01-25 16:48:11 -08:00
Chris Krycho
ee2ff9de0f [beta] TRPL: more backward-compatible Edition changes
- Improve the discussion of `unsafe` blocks within `unsafe` functions.
- Fix formatting in Appendix A
2025-01-25 16:48:11 -08:00
Josh Stone
f05d305f5a Only assert the Parser size on specific arches
The size of this struct depends on the alignment of `u128`, for example
powerpc64le and s390x have align-8 and end up with only 280 bytes. Our
64-bit tier-1 arches are the same though, so let's just assert on those.

(cherry picked from commit aef640a613)
2025-01-25 16:48:11 -08:00
Chris Denton
5f5e70bfc6 Remove test panic from File::open
(cherry picked from commit fed5f98c47)
2025-01-25 16:48:11 -08:00
onur-ozkan
e92addfac4 make it possible to use ci-rustc on tarball sources
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure
the commit has to download precompiled rustc artifact from CI, which was leading builds to
fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project
source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on
git-managed source and read `git-commit-hash` file otherwise.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 903cddb392)
2025-01-25 16:48:11 -08:00
Kyle Huey
4595e112d0 When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely
Revert most of #133194 (except the test and the comment fixes). Then refix
not emitting locations at all when the correct location discriminator value
exceeds LLVM's capacity.

(cherry picked from commit 45ef92731b)
2025-01-23 08:45:35 -08:00
lcnr
f6aed49d14 add test
(cherry picked from commit 0910173b35)
2025-01-23 08:45:25 -08:00
lcnr
e35db4245b add cache to AmbiguityCausesVisitor
(cherry picked from commit 94bf8f04f4)
2025-01-23 08:45:25 -08:00
lcnr
953a1a0031 avoid running the overlap check twice
(cherry picked from commit ebbcfd4e77)
2025-01-23 08:45:25 -08:00
onur-ozkan
f3797062a3 resolve symlinks of LLVM tool binaries before copying them
There is a chance that these tools are being installed from an external LLVM
and we have no control over them. If any of these tools use symlinks, they will
fail during tarball distribution. This change makes copying process to resolve
symlinks just before placing them into the destination path.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit cde58dd5f7)
2025-01-23 08:45:17 -08:00
Tanvi Pooranmal Meena
eb03c329c2 Add logic to override profile for non git sources
(cherry picked from commit 7d806171d0)
2025-01-23 08:45:12 -08:00
Esteban Küber
a41d236a6e Always force non-trimming of path in unreachable_patterns lint
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`.

This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite.

Fix #135289.

(cherry picked from commit 93a19501c2)
2025-01-23 08:44:57 -08:00
bors
4416507043 Auto merge of #135575 - Veykril:push-ynurtulswkpo, r=Mark-Simulacrum
Backport rust-lang/rust-analyzer#18760
2025-01-20 02:02:39 +00:00
bors
752fecf800 Auto merge of #135609 - cuviper:beta-next, r=cuviper
[beta] backports

- do not in-place-iterate over flatmap/flatten #135104
- Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024 #135441
- Update to LLVM 19.1.7 #135484

r? cuviper
2025-01-17 17:50:39 +00:00
bors
d0d224db19 Auto merge of #135508 - chriskrycho:trpl-edition-updates, r=ehuss
[beta] TRPL: incorporate all backward-compatible Edition changes

This incorporates all the backwards-compatible changes for the 2024 Edition. There will also be a follow-on PR to land revisions to the new chapter on async so it can be as ready as possible when officially released with 1.85 and the 2024 Edition.

Additionally, there are a few other, non-backward-compatible, changes (largely around `use<..>`) we can only land using the stable edition, which we may or may not be able to land in 1.85 by using the beta toolchain in the example code. Those may or may not be ported over, depending on how that does or does not play with the infrastructure.

This is identical to #135507 except that this targets `beta` instead of `master`, with the intent that these changes land in 1.85 and go out with the Edition release.
2025-01-17 11:47:32 +00:00
Nikita Popov
1c859813c2 Update to LLVM 19.1.7
(cherry picked from commit a40c659cef)
2025-01-16 17:50:13 -08:00
Michael Goulet
e126c8d50e Make sure to mark IMPL_TRAIT_REDUNDANT_CAPTURES as Allow in edition 2024
(cherry picked from commit 1b068a0dea)
2025-01-16 17:50:08 -08:00
The 8472
ae37d1c9b6 add regression test for unsound Flatten/FlatMap specialization
(cherry picked from commit 1ed0ea459d)
2025-01-16 17:50:04 -08:00
The 8472
8a7dc215b0 do not in-place-iterate over flatmap/flatten
The implementation is unsound when a partially consumed iterator has
some elements buffered in the front/back parts and cloning the Iterator
removes the capacity from the backing vec::IntoIter.

(cherry picked from commit 3d871b3ced)
2025-01-16 17:50:04 -08:00