244907 Commits

Author SHA1 Message Date
bors aedd173a2c Auto merge of #122650 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.77.0 release

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

r? `@Mark-Simulacrum`
1.77.0
2024-03-17 19:01:29 +00:00
Mark Rousskov 50b8779cb4 Cherry pick release notes 2024-03-17 13:40:05 -04:00
Mark Rousskov 58b55f582e Switch channel to stable 2024-03-17 10:39:13 -04:00
bors 28fd269a50 Auto merge of #122510 - flip1995:clippy_backport, r=Mark-Simulacrum
[beta] Clippy backports

Backports included in this PR:

- https://github.com/rust-lang/rust-clippy/pull/12276 Fixing the lint on some platforms before hitting stable
- https://github.com/rust-lang/rust-clippy/pull/12405 Respect MSRV before hitting stable
- https://github.com/rust-lang/rust-clippy/pull/12266 Fixing an (unlikely) ICE
- https://github.com/rust-lang/rust-clippy/pull/12177 Fixing FPs before hitting stable

Each backport on its own might not warrant a backport, but the collection of those are nice QoL fixes for Clippy users, before those bugs hit stable.

All of those commits are already on `master`.

r? `@Mark-Simulacrum`
2024-03-16 15:54:04 +00:00
bors 2bcca41ad8 Auto merge of #122524 - cuviper:beta-next, r=cuviper
[beta] backports

- AST validation: Improve handling of inherent impls nested within functions and anon consts #122004
- Downgrade const eval dangling ptr in final to future incompat lint #122204

r? cuviper
2024-03-15 05:00:58 +00:00
Wesley Wiser 6b0992faa3 Add produces as tidy requires
(cherry picked from commit ae374cf04a)
2024-03-14 18:31:55 -07:00
Felix S. Klock II 2ade18afe8 Added an "Explanation" header and expanded that section for the newly added lint.
(cherry picked from commit 6ca46daded)
2024-03-14 18:31:55 -07:00
Felix S. Klock II 9cf28f2fc7 Added deny(const_eval_mutable_ptr_in_final_value) attribute to all tests that were expecting the hard error for it.
I attempted to do this in a manner that preserved the line numbers to reduce the
review effort on the resulting diff, but we still have to deal with the
ramifications of how a future-incompat lint behaves compared to a hard-error (in
terms of its impact on the diagnostic output).

(cherry picked from commit 1c3424bfc1)
2024-03-14 18:31:55 -07:00
Felix S. Klock II 6c06ca001b regression test from 121610.
(cherry picked from commit f86b46a9cc)
2024-03-14 18:31:55 -07:00
Felix S. Klock II 25d3cbb10e downgrade mutable-ptr-in-final-value from hard-error to future-incompat lint to address issue 121610.
(cherry picked from commit a8549b4152)
2024-03-14 18:12:40 -07:00
León Orell Valerian Liehr 92512b17b3 AST validation: Improve handling of inherent impls nested within functions and anon consts
(cherry picked from commit 7d428db605)
2024-03-14 18:01:32 -07:00
y21 046eb84794 add a test for rust-lang/rust-clippy#12181 2024-03-14 20:25:48 +01:00
y21 274a6fb21e [unconditional_recursion]: compare by types instead of DefIds 2024-03-14 20:25:48 +01:00
granddaifuku 38adec8103 fix: ICE when array index exceeds usize 2024-03-14 20:25:48 +01:00
Quinn Sinclair 6eeb080232 Added msrv to threadlocal initializer 2024-03-14 20:25:48 +01:00
Quinn Sinclair 1aeacb074b Fixed FP for thread_local_initializer_can_be_made_const for os_local
`os_local` impl of `thread_local` — regardless of whether it is const and
unlike other implementations — includes an `fn __init(): EXPR`.

Existing implementation of the lint checked for the presence of said
function and whether the expr can be made const. Because for `os_local`
we always have an `__init()`, it triggers for const implementations.

The solution is to check whether the `__init()` function is already const.
If it is `const`, there is nothing to do. Otherwise, we verify that we can
make it const.

Co-authored-by: Alejandra González <blyxyas@gmail.com>
2024-03-14 20:25:48 +01:00
bors 339fb69650 Auto merge of #121984 - cuviper:beta-next, r=cuviper
[beta] backports

- Improve wording of `static_mut_ref` #121034
- Solaris linker does not support --strip-debug #121399

r? cuviper
2024-03-06 17:23:25 +00:00
Petr Sumbera e774bc0b0d Solaris linker does not support --strip-debug
Fixes #121381

(cherry picked from commit a17211b05c)
2024-03-04 09:35:23 -08:00
Obei Sideg 0656ed6afb Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.

(cherry picked from commit 408eeae59d)
2024-03-04 09:35:03 -08:00
bors 2c9c764110 Auto merge of #121775 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.77.0] backport cargo

1 commits in 837c09f04022352c26cf445f37492709922b24ef..3fe68eabf93cbf3772bbcad09a9206c783e2de3f
2024-02-16 20:47:59 +0000 to 2024-02-29 00:16:03 +0000
- [beta-1.77] Backport ignore `cargo::rustc-check-cfg` (rust-lang/cargo#13500)
2024-03-01 06:50:32 +00:00
Weihang Lo 356d024a1b [beta-1.77.0] backport cargo 2024-02-28 22:42:11 -05:00
bors f2043422f7 Auto merge of #121217 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.77.0] backport cargo

1 commits in c8a48facdaabe1d1fa8de11f90737801f38d8fa1..837c09f04022352c26cf445f37492709922b24ef
2024-02-07 19:15:46 +0000 to 2024-02-16 20:47:59 +0000
- [beta-1.77] chore: update jobserver to 0.1.28 (rust-lang/cargo#13452)

r? ghost
2024-02-17 05:43:02 +00:00
Weihang Lo 8336e18ead Update cargo 2024-02-16 22:59:00 -05:00
bors d783f371bc Auto merge of #121069 - cuviper:beta-next, r=cuviper
[beta] backports

- Correct paths for hexagon-unknown-none-elf platform doc #120533
- CI: Use ninja on apple builders #120543
- Correctly check `never_type` feature gating #120552
- Revert unsound libcore changes of 119911 #120562
- Downgrade xcode #120914
- Update jobserver-rs to 0.1.28 #120846
- [beta] Update LLVM submodule #121132

r? cuviper
2024-02-16 04:22:31 +00:00
Nikita Popov 20d17c457a Update LLVM submodule
(cherry picked from commit 7e1897cea0)
2024-02-15 10:59:39 -08:00
Vadim Petrochenkov 131e1fc968 Update jobserver-rs to 0.1.28
(cherry picked from commit 83f3bc4271)
2024-02-15 10:54:29 -08:00
Eric Huss 5df5175361 Require that SELECT_XCODE is set.
Allowing the Xcode version to "float" based on whatever default GitHub
selects creates an unreliable environment. When GitHub changes the
default, we can have multiple jobs in the same run using different
versions as it rolls out across machines. It can also cause oscillation
between runs as different machines are used. It also causes
unpredictable timing when the updates happen.

This change helps ensure that the version that is used is pinned. The
downside is that it requires manually bumping the version, and the risk
that if we take too long, older Xcodes will be removed and that will
break the build.

(cherry picked from commit 4ce1f1cffc)
2024-02-14 17:06:25 -08:00
Eric Huss 533019d96e Downgrade Xcode from the default (15.0) to 14.3.1.
This seems to fix two sporadic errors that have been appearing in CI.
One is an issue with cmake being unable to verify that cmake is able to
build a simple test program. The other is a `invalid r_symbolnum`
linking error when trying to build one of cranelift's tests.

This is intended as a temporary fix until we can figure out how to
resolve those issues.

(cherry picked from commit 4fd3cf96a1)
2024-02-14 17:06:17 -08:00
Oli Scherer a686e61cd8 Revert unsound libcore changes of #119911
(cherry picked from commit 6ac035df44)
2024-02-13 20:52:32 -08:00
Guillaume Gomez 9ae7a36e6b Update never_type feature gate ui test
(cherry picked from commit 0f21e45e95)
2024-02-13 20:52:26 -08:00
Guillaume Gomez 53320b221b Correctly check never_type feature gating
(cherry picked from commit 2c0030ff2c)
2024-02-13 20:52:26 -08:00
Eric Huss 1412627f3f CI: Use ninja on apple builders
(cherry picked from commit 2aebe6c302)
2024-02-13 20:52:21 -08:00
Brian Cain 0e09fe1250 Correct paths for hexagon-unknown-none-elf platform doc
Update the library paths to correctly refer to libdemo{1,2}_hexagon
and switch to the release build instead.

Update references to libstandalone to the specific G0/PIC archive instead.

(cherry picked from commit 647a453657)
2024-02-13 20:52:17 -08:00
bors 3d66104851 Auto merge of #120821 - ehuss:fix-c-str-lit-bootstrap, r=Mark-Simulacrum
[Beta 1.77] Fix bootstrapping from 1.76

Due to the timing of the revert for stabilization of c_str_literal (https://github.com/rust-lang/rust/pull/119528 which reverted in 1.76) and trait_upcasting (https://github.com/rust-lang/rust/pull/120269 which reverted in 1.76), which happened after https://github.com/rust-lang/rust/pull/119211 (Bump stage0 to 1.76 beta), this resulted in some of the feature attributes not being restored which are needed to be able to bootstrap from 1.76. This restores those features.

This also includes a stage0 bump to the just released stable. This is necessary because stage0 was currently pointing at an old beta which did not contain the reverts.

Fixes #120810
2024-02-12 02:53:53 +00:00
Eric Huss ec15d9dbb8 Bump to released 1.76 stable 2024-02-08 19:27:02 -08:00
bors f2048098a1 Auto merge of #120659 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.77.0] backport cargo

2 commits in 7bb7b539558dc88bea44cee4168b6269bf8177b0..c8a48facdaabe1d1fa8de11f90737801f38d8fa1
2024-01-20 00:15:32 +0000 to 2024-02-07 19:15:46 +0000
- [Beta-1.77] Update libgit2 (rust-lang/cargo#13417)
- [beta-1.77.0] Fix panic on empty spans when parsing Cargo.toml (rust-lang/cargo#13393)
2024-02-09 02:52:15 +00:00
Eric Huss 0e89228bd7 [Beta 1.77] Fix bootstrapping from 1.76 2024-02-08 18:48:51 -08:00
Weihang Lo 42c931fb11 [beta-1.77.0] backport cargo 2024-02-07 15:16:26 -05:00
bors 04ba452197 Auto merge of #120626 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] initial branch of 1.77

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

r? `@Mark-Simulacrum`
2024-02-04 02:25:51 +00:00
Mark Rousskov e36caeddb6 Bump channel to beta 2024-02-03 16:38:20 -05:00
Mark Rousskov 885a97bbea Bump version placeholders 2024-02-03 16:37:58 -05:00
bors bf3c6c5bed Auto merge of #120447 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? ghost
2024-02-01 22:17:11 +00:00
bors 11f32b73e0 Auto merge of #120524 - Nadrieril:rollup-67952ib, r=Nadrieril
Rollup of 9 pull requests

Successful merges:

 - #120207 (check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test)
 - #120321 (pattern_analysis: cleanup the contexts)
 - #120355 (document `FromIterator for Vec` allocation behaviors)
 - #120430 (std: thread_local::register_dtor fix proposal for FreeBSD.)
 - #120469 (Provide more context on derived obligation error primary label)
 - #120472 (Make duplicate lang items fatal)
 - #120490 (Don't hash lints differently to non-lints.)
 - #120495 (Remove the `abi_amdgpu_kernel` feature)
 - #120501 (rustdoc: Correctly handle attribute merge if this is a glob reexport)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-01-31 15:01:22 +00:00
Nadrieril 4eaf4c2615 Rollup merge of #120501 - GuillaumeGomez:glob-reexport-attr-merge-bugfix, r=notriddle
rustdoc: Correctly handle attribute merge if this is a glob reexport

Fixes #120487.

The regression was introduced in https://github.com/rust-lang/rust/pull/113091. Only non-glob reexports should have been impacted.

cc `````@Nemo157`````
r? `````@notriddle`````
2024-01-31 12:10:53 +01:00
Nadrieril 573e7f181d Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk
Remove the `abi_amdgpu_kernel` feature

The tracking issue (#51575) has been closed for 3 years, with no activity for 5.
2024-01-31 12:10:53 +01:00
Nadrieril be4f8e2758 Rollup merge of #120490 - nnethercote:Diagnostic-hashing, r=estebank
Don't hash lints differently to non-lints.

`Diagnostic::keys`, which is used for hashing and equating diagnostics, has a surprising behaviour: it ignores children, but only for lints. This was added in #88493 to fix some duplicated diagnostics, but it doesn't seem necessary any more.

This commit removes the special case and only four tests have changed output, with additional errors. And those additional errors aren't exact duplicates, they're just similar. For example, in src/tools/clippy/tests/ui/same_name_method.rs we currently have this error:
```
error: method's name is the same as an existing method in a trait
  --> $DIR/same_name_method.rs:75:13
   |
LL |             fn foo() {}
   |             ^^^^^^^^^^^
   |
note: existing `foo` defined here
  --> $DIR/same_name_method.rs:79:9
   |
LL |         impl T1 for S {}
   |         ^^^^^^^^^^^^^^^^
```
and with this change we also get this error:
```
error: method's name is the same as an existing method in a trait
  --> $DIR/same_name_method.rs:75:13
   |
LL |             fn foo() {}
   |             ^^^^^^^^^^^
   |
note: existing `foo` defined here
  --> $DIR/same_name_method.rs:81:9
   |
LL |         impl T2 for S {}
   |
```
I think printing this second argument is reasonable, possibly even preferable to hiding it. And the other cases are similar.

r? `@estebank`
2024-01-31 12:10:52 +01:00
Nadrieril 032596e34c Rollup merge of #120472 - Nilstrieb:die, r=compiler-errors
Make duplicate lang items fatal

Prevents terminal spam.
2024-01-31 12:10:52 +01:00
Nadrieril 0313eb2182 Rollup merge of #120469 - estebank:issue-40120, r=TaKO8Ki
Provide more context on derived obligation error primary label

Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:

```
error[E0277]: the trait bound `i32: Bar` is not satisfied
 --> f100.rs:6:6
  |
6 |     <i32 as Foo>::foo();
  |      ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
  |
help: this trait has no implementations, consider adding one
 --> f100.rs:2:1
  |
2 | trait Bar {}
  | ^^^^^^^^^
note: required for `i32` to implement `Foo`
 --> f100.rs:3:14
  |
3 | impl<T: Bar> Foo for T {}
  |         ---  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

Fix #40120.
2024-01-31 12:10:51 +01:00
Nadrieril a7d5382e5c Rollup merge of #120430 - devnexen:fix_tls_dtor_fbsd, r=cuviper
std: thread_local::register_dtor fix proposal for FreeBSD.

following-up 5d3d347 commit, rust started to spin
__cxa_thread_call_dtors warnings even without any TLS usage. using instead home made TLS destructor handler `register_dtor_fallback`.

close #120413
2024-01-31 12:10:51 +01:00
Nadrieril 03daaa6f07 Rollup merge of #120355 - the8472:doc-vec-fromiter, r=cuviper
document `FromIterator for Vec` allocation behaviors

[t-libs discussion](https://rust-lang.zulipchat.com/#narrow/stream/259402-t-libs.2Fmeetings/topic/Meeting.202024-01-24/near/417686526) about #120091 didn't reach a strong consensus, but it was agreed that if we keep the current behavior it should at least be documented even though it is an implementation detail.

The language is intentionally non-committal. The previous (non-existent) documentation permits a lot of implementation leeway and we want retain that. In some cases we even must retain it to be able to rip out some code paths that rely on unstable features.
2024-01-31 12:10:50 +01:00