Commit graph

244895 commits

Author SHA1 Message Date
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
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
Nadrieril
0eaa32fce2
Rollup merge of #120321 - Nadrieril:cleanup-cx, r=compiler-errors
pattern_analysis: cleanup the contexts

This cleans up a bit the various `*Ctxt`s I had left lying around. As a bonus this made it possible to make `PatternColumn` public. I don't have a use for that yet but that could come useful.

`UsefulnessCtxt` looks useless right now but I'll be adding a field or two in subsequent PRs.

r? `````@compiler-errors`````
2024-01-31 12:10:50 +01:00
Nadrieril
bcb709b30f
Rollup merge of #120207 - onur-ozkan:120202-fix, r=clubby789
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in #120202).
2024-01-31 12:10:49 +01:00
bors
cdaa12e3df Auto merge of #120358 - tmandry:bump-fuchsia-8c-tests, r=Mark-Simulacrum
Bump Fuchsia, build tests, and use 8 core bots

- Build Fuchsia on 8 cores instead of 16
- Skip building cranelift for Fuchsia
- Bump Fuchsia (includes building tests)

This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught https://github.com/rust-lang/rust-clippy/issues/11952 and #119593.

See prior discussion on #119400 about building on 8 cores instead of 16. This PR combines changes from that and #119399, plus clean up.

r? `@Mark-Simulacrum`
2024-01-31 07:40:02 +00:00
bors
d53ddcd8bb Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk
hir: Refactor getters for owner nodes
2024-01-31 05:37:49 +00:00
bors
80deabd098 Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov
Further improve `space_between`

`space_between` is used by `print_tts` to decide when spaces should be put between  tokens. This PR improves it in two ways:
- avoid unnecessary spaces before semicolons, and
- don't omit some necessary spaces before/after some punctuation symbols.

r? `@petrochenkov`
2024-01-31 02:01:43 +00:00
the8472
39dc3153c5 Apply suggestions from code review
Co-authored-by: Josh Stone <cuviper@gmail.com>
2024-01-30 22:37:07 +01:00
The 8472
c780fe6b27 document FromIterator for Vec allocation behaviors 2024-01-30 22:37:07 +01:00
Esteban Küber
6efddac288 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-30 21:28:18 +00:00
Nicholas Nethercote
4225a1e186 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.
2024-01-31 08:25:29 +11:00
bors
cb4d9a1902 Auto merge of #119101 - compiler-errors:outlives, r=lcnr
Normalize region obligation in lexical region resolution with next-gen solver

This normalizes region obligations when we `resolve_regions`, since they may be unnormalized with deferred projection equality.

It's pretty hard to add tests that exercise this without also triggering MIR borrowck errors (because we don't normalize there yet). I've added one test with two revisions that should test that we both 1. normalize region obligations in the param env, and 2. normalize registered region obligations during lexical region resolution.
2024-01-30 19:22:04 +00:00
Guillaume Gomez
024364ac60 Add regression test for #120487 2024-01-30 18:14:09 +01:00
Guillaume Gomez
75f670d57d rustdoc: Correctly handle attribute merge if this is a glob reexport 2024-01-30 18:13:17 +01:00