238322 Commits

Author SHA1 Message Date
bors
82e1608dfa Auto merge of #119188 - flip1995:clippy-beta-backport, r=pietroalbini
[beta] Clippy beta backport

PR towards stable, as beta was branched a day early and I missed the notification.

- https://github.com/rust-lang/rust-clippy/pull/11538
- https://github.com/rust-lang/rust-clippy/pull/11756
- https://github.com/rust-lang/rust-clippy/pull/11760
- https://github.com/rust-lang/rust-clippy/pull/11953

r? `@pietroalbini`
1.75.0
2023-12-21 16:53:31 +00:00
bors
f54362f285
Auto merge of #11953 - Jarcho:issue_11952, r=Alexendoo
Fix binder handling in `unnecessary_to_owned`

fixes #11952

The use of `rebind` instead of `EarlyBinder::bind` isn't technically needed, but it is the semantically correct operation.

changelog: None
2023-12-21 16:00:41 +01:00
bors
bdb77cc10b
Auto merge of #11760 - compiler-errors:escaping, r=Jarcho
Don't check for late-bound vars, check for escaping bound vars

Fixes an assertion that didn't make sense. Many valid and well-formed types *have* late-bound vars (e.g. `for<'a> fn(&'a ())`), they just must not have *escaping* late-bound vars in order to be normalized correctly.

Addresses rust-lang/rust-clippy#11230, cc `@jyn514` and `@matthiaskrgr`

changelog: don't check for late-bound vars, check for escaping bound vars. Addresses rust-lang/rust-clippy#11230
2023-12-21 16:00:40 +01:00
bors
ed1336c646
Auto merge of #11756 - y21:issue11755, r=Manishearth
[`unused_enumerate_index`]: don't ICE on empty tuples

Fixes #11755

changelog: [`unused_enumerate_index`]: don't ICE on empty tuples

I'm going to nominate for beta backport because the code that is needed to trigger this seems likely to occur in real code
`@rustbot` label +beta-nominated
2023-12-21 16:00:40 +01:00
bors
df0c39c085
Auto merge of #11538 - Jarcho:proc_mac, r=dswij
Fix `is_from_proc_macro` patterns

fixes #11533

changelog: none
2023-12-21 16:00:40 +01:00
bors
fbe9b6fcee Auto merge of #119186 - rust-lang:pa-stable-1.75, r=pietroalbini
[stable] Prepare Rust 1.75.0 release

This PR includes the squash of the release notes from https://github.com/rust-lang/rust/pull/118729, and bumps the channel to stable to prepare release artifacts.

The only `beta-nominated` PR is https://github.com/rust-lang/rust/pull/118796, which is still waiting for review and is not `beta-accepted` yet, so this does **not** backport it. `@Nadrieril` `@cjgillot` `@apiraino` if that PR becomes ready to be backported before the 28th ping me on Zulip and I can rebuild artifacts with it.

r? `@ghost`
2023-12-21 12:35:12 +00:00
Pietro Albini
0e5e02db86
bump channel to stable 2023-12-21 13:28:24 +01:00
Pietro Albini
837e939d8b
update release notes 2023-12-21 13:28:07 +01:00
bors
b216e7b0e7 Auto merge of #118994 - cuviper:beta-next, r=cuviper
[beta] backports

- temporarily revert "ice on ambguity in mir typeck" #118736
- Update to LLVM 17.0.6 #118936

r? ghost
2023-12-16 12:48:47 +00:00
Nikita Popov
ff1c216bfa Include an additional cherry-pick
(cherry picked from commit 601d52a7031f0f57562b661c99d30b4035d7b4af)
2023-12-15 10:44:36 -08:00
Nikita Popov
737de5b51e Update to LLVM 17.0.6
(cherry picked from commit bb7c483e48ea992f3759fb643962e1e706c8c029)
2023-12-15 10:24:44 -08:00
Ali MJ Al-Nasrawy
b10ae033c2 temporarily revert "ice on ambguity in mir typeck"
Reverts #116530

(cherry picked from commit 5fdb648fc3a672140f3fc8f98ee3268ed3fe5389)
2023-12-15 10:24:28 -08:00
bors
4bd9c37dc1 Auto merge of #118837 - cuviper:beta-next, r=cuviper
[beta] Update backtrace submodule

*  Update backtrace submodule #118137

As well as infrastructure fix:

*  Don't ask for a specific branch in cargotest #118597

r? ghost
2023-12-13 00:04:04 +00:00
Laurențiu Nicola
8d8ac5375b Don't ask for a specific branch in cargotest
(cherry picked from commit 5808b72484204af035a4d9683731f44bd8d59529)
2023-12-12 12:19:58 -08:00
roblabla
3df92a29b3 Update backtrace submodule
(cherry picked from commit 08803eb4c87b3b1895fae1d071229c1cf23b39d5)
2023-12-11 10:18:59 -08:00
bors
1a06ac5b5d Auto merge of #118492 - cuviper:beta-next, r=cuviper
[beta] backports

- Build pre-coroutine-transform coroutine body #117686
- Fix coroutine validation for mixed panic strategy #118422
- ConstProp: Remove const when rvalue check fails. #118426
- Dispose llvm::TargetMachines prior to llvm::Context being disposed #118464

r? ghost
2023-12-01 08:31:34 +00:00
Wesley Wiser
6c45608558 Update compiler/rustc_codegen_llvm/src/lib.rs
Co-authored-by: Josh Stone <cuviper@gmail.com>
(cherry picked from commit 10110787154154cddfaaacdeebd7a4406223a25b)
2023-11-30 16:53:42 -08:00
Wesley Wiser
76e6681b1f Dispose llvm::TargetMachines prior to llvm::Context being disposed
If the TargetMachine is disposed after the Context is disposed, it can
lead to use after frees in some cases.

I've observed this happening occasionally on code compiled for
aarch64-pc-windows-msvc using `-Zstack-protector=strong` but other users
have reported AVs from host aarch64-pc-windows-msvc compilers as well.

(cherry picked from commit 3323e4dc04e57cc64ac77dbff2f6bf50ac6832f0)
2023-11-30 16:53:42 -08:00
Alona Enraght-Moony
98d3e99b8c Rename and add another test
(cherry picked from commit 6e956c0a383444a25cc0e690cbc9fa6f859b07b4)
2023-11-30 16:53:37 -08:00
Alona Enraght-Moony
cb4f87af34 ConstProp: Remove const when rvalue check fails.
(cherry picked from commit 9121a41450e905fe5a12c11c955acc14ab1f92fe)
2023-11-30 16:53:37 -08:00
Alona Enraght-Moony
ebd43bdb66 Precommit test for https://github.com/rust-lang/rust/issues/118328.
(cherry picked from commit b1a6cf4a0e7d6727516e943d86fdab8587b94722)
2023-11-30 16:53:37 -08:00
Tomasz Miąsko
ae0b24fe55 Fix coroutine validation for mixed panic strategy
Validation introduced in #113124 allows UnwindAction::Continue and
TerminatorKind::Resume to occur only in functions with ABI that can
unwind. The function ABI depends on the panic strategy, which can vary
across crates.

Usually MIR is built and validated in the same crate. The coroutine drop
glue thus far was an exception. As a result validation could fail when
mixing different panic strategies.

Avoid the problem by executing AbortUnwindingCalls along with the
validation.

(cherry picked from commit 5161b22143bf9a726cfd69d19bef11552d0ed519)
2023-11-30 16:53:24 -08:00
Michael Goulet
20b2dbf0b6 Build pre-coroutine-transform coroutine body
(cherry picked from commit 0ba7d19769c068729761eba72e779b53101a19bc)
2023-11-30 16:51:44 -08:00
bors
bd45872d96 Auto merge of #118390 - cuviper:beta-next, r=cuviper
[beta] backports

- feat: implement `DoubleEndedSearcher` for `CharArray[Ref]Searcher` #111922
- Update to LLVM 17.0.5 #117907
- clarify `fn discriminant` guarantees: only free lifetimes may get erased #118006

r? ghost
2023-11-28 00:08:03 +00:00
lcnr
271143af72 only free lifetimes may get erased
(cherry picked from commit 3b0e1d23b7fff6b57a634f529ee19d0d173a95f7)
2023-11-27 13:00:08 -08:00
Nikita Popov
a6eaabdb1e Update to LLVM 17.0.5
(cherry picked from commit 8e2fcc4ca211021d929ca424055b59307a97a8f4)
2023-11-27 12:57:27 -08:00
Jan
1ce9a4cb0b feat: implement DoubleEndedSearcher for CharArray[Ref]Searcher
(cherry picked from commit c6ed532bef02e752ea881ab104cacc28e5d06738)
2023-11-27 12:57:23 -08:00
bors
b66b7951b9 Auto merge of #118093 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.75] Update cargo

2 commits in 6790a5127895debec95c24aefaeb18e059270df3..1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
2023-11-10 17:09:35 +0000 to 2023-11-20 01:39:31 +0000
- [beta-1.75.0] chore: bump `cargo-credential-*` crates as e58b84d broke stuff (rust-lang/cargo#13009)
- [beta 1.75] Backport 1password fixes (rust-lang/cargo#12994)

r? ghost
2023-11-20 19:00:28 +00:00
Weihang Lo
6428cc4a0b
[beta-1.75] Update cargo 2023-11-20 09:01:09 -05:00
bors
1bd723f027 Auto merge of #118042 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backport & bootstrap bump

Bumps the bootstrap compiler to released 1.74, and lands the first backport:

- #117827: coverage: Avoid creating malformed macro name spans

r? `@Mark-Simulacrum`
2023-11-18 19:04:26 +00:00
Zalathar
2e7c61efcd coverage: Regression test for #117788
Without the workaround applied, this test will produce malformed mappings that
cause `llvm-cov` to fail.

(And if it does emit well-formed mappings, they should be obviously incorrect.)
2023-11-18 12:50:02 -05:00
Zalathar
549056f322 coverage: Avoid creating malformed macro name spans
This method is trying to detect macro invocations, so that it can split a span
into two parts just after the `!` of the invocation.

Under some circumstances (probably involving nested macros), it gets confused
and produces a span that is larger than the original span, and possibly extends
outside its enclosing function and even into an adjacent file.

In extreme cases, that can result in malformed coverage mappings that cause
`llvm-cov` to fail. For now, we at least want to detect these egregious cases
and avoid them, so that coverage reports can still be produced.
2023-11-18 12:50:02 -05:00
Mark Rousskov
c9e8959eff Bump bootstrap to released 1.74.0 2023-11-18 12:48:56 -05:00
bors
782883f609 Auto merge of #117842 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] 1.75.0 promotion

https://forge.rust-lang.org/release/process.html#promote-branches-t-3-days-monday

r? `@Mark-Simulacrum`
2023-11-12 20:20:48 +00:00
Mark Rousskov
ec434f61b4 Cranelift isn't available on non-nightly channels 2023-11-12 15:19:04 -05:00
Mark Rousskov
42b98d7353 Bump channel to beta 2023-11-12 11:45:44 -05:00
Mark Rousskov
f3cea7cc46 Substitute version placeholders 2023-11-12 11:45:28 -05:00
bors
1db4b12494 Auto merge of #117797 - weihanglo:update-cargo, r=weihanglo
Update cargo

12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3
2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000
- refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938)
- credential: include license files in all published crates (rust-lang/cargo#12953)
- fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951)
- refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930)
- refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948)
- Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949)
- refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940)
- Fix the invalidate feature name message (rust-lang/cargo#12939)
- refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926)
- feat: Make browser links out of HTML file paths (rust-lang/cargo#12889)
- Do not allow empty feature name (rust-lang/cargo#12928)
- fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934)

r? ghost
2023-11-11 02:01:04 +00:00
bors
6f308b8713 Auto merge of #117799 - erickt:fuchsia, r=tmandry
Switch `fuchsia-test-runner.py` to `ffx product`

The subcommand `ffx product-bundle` has been removed, and replaced with the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to use it to download the SDK and product bundle for the latest release of Fuchsia.
2023-11-11 00:03:52 +00:00
Erick Tryzelaar
d7fd2dec7c Switch fuchsia-test-runner.py to ffx product
The subcommand `ffx product-bundle` has been removed, and replaced with
the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to
use it to download the SDK and product bundle for the latest release of
Fuchsia.
2023-11-10 23:57:07 +00:00
Weihang Lo
8a2bee415c
Update cargo 2023-11-10 18:18:37 -05:00
bors
edf0b1db0a Auto merge of #115229 - iSwapna:issue-115222-fix, r=estebank
On method chain expression failure, look for missing method in earlier segments of the chain

This PR tries to fix the issue: https://github.com/rust-lang/rust/issues/115222

As suggested by `@estebank` , I did the following:
1. Add new test `tests/ui/structs/method-chain-expression-failure.rs`
2. In `compiler/rusct_hir_tycheck/src/method/suggest.rs`
   walking up the method chain and calling `probe_for_name` with the method name. But the call fails to return `Ok`.
2023-11-10 21:10:30 +00:00
Swapna Iyer
56a109d15b Recurse over the method chain and maintain a stack to peek at previous receiver to align spans 2023-11-10 13:00:27 -08:00
bors
d4c86cfc49 Auto merge of #117779 - bjorn3:sync_cg_clif-2023-11-10, r=bjorn3
Subtree update for rustc_codegen_cranelift

Significantly improved support for simd intrinsics.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-11-10 12:21:39 +00:00
bjorn3
d186b49460 Merge commit 'c84d1871dc4456539b7b578830268ab3539915d0' into sync_cg_clif-2023-11-10 2023-11-10 11:30:51 +00:00
bjorn3
c84d1871dc Rustup to rustc 1.75.0-nightly (0f44eb32f 2023-11-09) 2023-11-10 11:27:03 +00:00
bjorn3
6e7961ac5d Sync from rust 0f44eb32f1123ac93ab404d74c295263ce468343 2023-11-10 11:10:26 +00:00
bors
3d0e99d632 Auto merge of #117765 - onur-ozkan:fix-117762, r=clubby789
enable unstable feature on `x clean [PATH]`

Since https://github.com/rust-lang/rust/pull/111076 enables unstable cargo feature (`public-dependency`), we need to ensure that unstable features are enabled before reading libstd Cargo.toml.

Fixes #117762

cc `@Nilstrieb`
2023-11-10 10:05:28 +00:00
bors
17d0a45f5d Auto merge of #117572 - RalfJung:addr_of, r=cuviper
update and clarify addr_of docs

This updates the docs to match https://github.com/rust-lang/reference/pull/1387. Cc `@rust-lang/opsem`

`@chorman0773` not sure if you had anything else you wanted to say here, I'd be happy to get your feedback. :)

Fixes https://github.com/rust-lang/rust/issues/114902, so Cc `@joshlf`
2023-11-10 08:04:47 +00:00
Ralf Jung
e30f8ae867
mention null explicitly
Co-authored-by: Josh Stone <cuviper@gmail.com>
2023-11-10 07:34:28 +01:00