Commit graph

261292 commits

Author SHA1 Message Date
bors
eeb90cda19 Auto merge of #129960 - pietroalbini:pa-cve-2024-43402, r=pietroalbini
[stable] Fix CVE-2024-43402

Backport the fix for CVE-2024-43402 in the upcoming 1.81.0. See https://github.com/rust-lang/rust/security/advisories/GHSA-2xg3-7mm6-98jj for more information about it.

This also includes https://github.com/rust-lang/rust/pull/129944 as a last-minute fix to the relnotes.

cc `@boxyuwu` as you are driving this release
r? `@ghost`
2024-09-04 15:07:06 +00:00
Mark Rousskov
b666f82054
Add compat note for trait solver change 2024-09-04 15:45:07 +02:00
Pietro Albini
24906b5930
update release notes 2024-09-03 14:43:15 +02:00
Chris Denton
bcd7ff18d6
More robust extension checking 2024-09-03 14:32:58 +02:00
bors
f54dd915b0 Auto merge of #129901 - BoxyUwU:stable, r=BoxyUwU
[stable] Prepare Rust 1.81.0

r? `@ghost`
2024-09-02 20:32:52 +00:00
Boxy
8d0d0bb05c bump channel to stable 2024-09-02 17:43:23 +01:00
Boxy
74121ba9a5 squash release notes from master 2024-09-02 17:43:11 +01:00
bors
4a101b4b5d Auto merge of #129758 - cuviper:beta-next, r=cuviper
[beta] backports

- Emit specific message for `time<0.3.35` inference failure #129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker #129714
- rustdoc: do not run doctests with invalid langstrings #128838

r? cuviper
2024-08-31 23:26:29 +00:00
Jubilee Young
a4461dfb58 ci: Try to remove unused Xcode dirs 2024-08-31 09:52:48 -07:00
Jubilee Young
361a050c00 ci: Use mv instead of cp in upload step 2024-08-30 23:48:11 -07:00
Michael Howell
6f593122b2 rustdoc: move invalid langstring test to UI
(cherry picked from commit 1d19c2c009)
2024-08-29 13:11:30 -07:00
Michael Howell
cfb20bc74e rustdoc: do not run doctests with invalid langstrings
(cherry picked from commit 7c4150fce0)
2024-08-29 13:11:30 -07:00
Ben Kimock
1953a13a9e Use a reduced recursion limit in the MIR inliner's cycle breaker
(cherry picked from commit 950437a035)
2024-08-29 12:54:08 -07:00
Esteban Küber
b2a7713ae3 Emit specific message for time<0.3.35 inference failure
```
error[E0282]: type annotations needed for `Box<_>`
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
   = note: this is an inference error on crate `time` caused by a change in Rust 1.80.0; update `time` to version `>=0.3.35`
```

Partially address #127343.

(cherry picked from commit b013a3ddf0)
2024-08-29 12:53:54 -07:00
bors
4a765c0b87 Auto merge of #129618 - Jarcho:backports, r=Mark-Simulacrum
[beta] Clippy backports

r? `@Mark-Simulacrum`

Backports:
- rust-lang/rust-clippy#12892
- rust-lang/rust-clippy#13168
- rust-lang/rust-clippy#13290

Both 12892 and 13290 are fixes for stable regressions. The first is a little large, but mostly just reverts the change that caused the regression. 13168 is to handle the `Error` trait moving to core in 1.81.
2024-08-28 10:43:29 +00:00
bors
1f4f9d847c Auto merge of #13290 - Jarcho:interior_mut_quick, r=Alexendoo
`declare_interior_mutable_const`: Ignore pointer types.

fixes #12951
fixes #13233

changelog: `declare_interior_mutable_const`: Ignore pointer types.
2024-08-26 13:00:37 -04:00
bors
ee3da1b278 Auto merge of #13168 - Alexendoo:std-instead-of-core-msrv, r=Manishearth
Make `std_instead_of_core` somewhat MSRV aware

For #13158, this catches some things e.g. `core::net` and the recently stable `core::error` but not things moved individually like `UnwindSafe`, as far as I can see the version for those isn't easily available

Beta nominating since ideally we'd get this change in the same version as `core::error` becomes stable

cc `@kpreid`

changelog: none
2024-08-26 11:34:50 -04:00
bors
4a19353cf7 Auto merge of #12892 - meithecatte:needless-borrows-mutrefs, r=xFrednet
needless_borrows_for_generic_args: Fix for &mut

This commit fixes a bug introduced in #12706, where the behavior of the lint has been changed, to avoid suggestions that introduce a move. The motivation in the commit message is quite poor (if the detection for significant drops is not sufficient because it's not transitive, the proper fix would be to make it transitive). However, #12454, the linked issue, provides a good reason for the change — if the value being borrowed is bound to a variable, then moving it will only introduce friction into future refactorings.

Thus #12706 changes the logic so that the lint triggers if the value being borrowed is Copy, or is the result of a function call, simplifying the logic to the point where analysing "is this the only use of this value" isn't necessary.

However, said PR also introduces an undocumented carveout, where referents that themselves are mutable references are treated as Copy, to catch some cases that we do want to lint against. However, that is not sound — it's possible to consume a mutable reference by moving it.

To avoid emitting false suggestions, this PR reintroduces the referent_used_exactly_once logic and runs that check for referents that are themselves mutable references.

Thinking about the code shape of &mut x, where x: &mut T, raises the point that while removing the &mut outright won't work, the extra indirection is still undesirable, and perhaps instead we should suggest reborrowing: &mut *x. That, however, is left as possible future work.

Fixes #12856

changelog: none
2024-08-26 11:33:24 -04:00
bors
b5fd9f6f10 Auto merge of #129335 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.81] Update cargo

3 commits in ca2346bd3c7f51e82964aaf7e47cdf770047b6ab..2dbb1af80a2914475ba76827a312e29cedfa6b2f
2024-07-31 19:33:19 +0000 to 2024-08-20 18:24:58 +0000
- [beta-1.81] chore(deps): update rust crate gix to 0.64.0 (rust-lang/cargo#14431)
- [beta-1.81] Revert "fix: Ensure dep/feature activates the dependency on 2024" (rust-lang/cargo#14366)
- [beta-1.81] fix(vendor): Strip excluded build targets (rust-lang/cargo#14368)

r? ghost
2024-08-21 03:09:45 +00:00
Weihang Lo
51d8795657
[beta-1.81] Update cargo 2024-08-20 17:20:18 -04:00
bors
6c199c89c7 Auto merge of #129033 - cuviper:beta-next, r=cuviper
[beta] backports and bump stage0

- Disable jump threading of float equality #128271
- Normalize when equating `dyn` tails in MIR borrowck #128694
- Improve `Ord` violation help #128273
- bump stage0 to stable 1.80.1
- Revert #125915 on beta #128760
- derive(SmartPointer): register helper attributes #128925
- Fix bug in `Parser::look_ahead`. #128994

r? cuviper
2024-08-15 16:53:53 +00:00
Nicholas Nethercote
ef56e6fe48 Fix bug in Parser::look_ahead.
The special case was failing to handle invisible delimiters on one path.

Fixes #128895.

(cherry picked from commit 46b4c5adc5)
2024-08-15 09:15:58 -07:00
Ding Xiang Fei
418695dc12 derive(SmartPointer): register helper attributes
(cherry picked from commit 5534cb0a4a)
2024-08-15 09:15:58 -07:00
Boxy
9fe92650b2 Revert "Auto merge of #125915 - camelid:const-arg-refactor, r=BoxyUwU"
This reverts commit 8c3a94a1c7, reversing
changes made to 3d68afc9e8.
2024-08-15 09:15:58 -07:00
Josh Stone
97e5fb6de1 bump stage0 to stable 1.80.1 2024-08-12 18:20:07 -07:00
Lukas Bergdoll
2d780751cc Fix linkchecker issue
(cherry picked from commit 1be60b5d2b)
2024-08-12 18:17:06 -07:00
Lukas Bergdoll
cecf4a168e Apply review comments to PartialOrd section
(cherry picked from commit 613155c96a)
2024-08-12 18:17:06 -07:00
Lukas Bergdoll
2810c2a7f1 Hide internal sort module
(cherry picked from commit eae7a186b2)
2024-08-12 18:17:06 -07:00
Lukas Bergdoll
2a4e738c69 Apply review comments
- Use if the implementation of [`Ord`] for `T`
  language
- Link to total order wiki page
- Rework total order help and examples
- Improve language to be more precise and less
  prone to misunderstandings.
- Fix usage of `sort_unstable_by` in `sort_by`
  example
- Fix missing author mention
- Use more consistent example input for sort
- Use more idiomatic assert_eq! in examples
- Use more natural "comparison function" language
  instead of "comparator function"

(cherry picked from commit afc404fdfc)
2024-08-12 18:17:06 -07:00
Lukas Bergdoll
a3446aeb28 Improve panic sections for sort*, sort_unstable* and select_nth_unstable*
- Move panic information into # Panics section
- Fix mentions of T: Ord that should be compare
- Add missing information

(cherry picked from commit 00ce238885)
2024-08-12 18:17:06 -07:00
Lukas Bergdoll
fa977e85b3 Improve panic message and surrounding documentation for Ord violations
The new sort implementations have the ability to
detect Ord violations in many cases. This commit
improves the message in a way that should help
users realize what went wrong in their program.

(cherry picked from commit 644550f3de)
2024-08-12 18:17:06 -07:00
Michael Goulet
9fce4e154a Normalize when equating dyn tails in MIR borrowck
(cherry picked from commit c6f8672dd5)
2024-08-12 18:17:06 -07:00
Nilstrieb
73f1331bfb Disable jump threading of float equality
Jump threading stores values as `u128` (`ScalarInt`) and does its
comparisons for equality as integer comparisons.
This works great for integers. Sadly, not everything is an integer.

Floats famously have wonky equality semantcs, with `NaN!=NaN` and
`0.0 == -0.0`. This does not match our beautiful integer bitpattern
equality and therefore causes things to go horribly wrong.

While jump threading could be extended to support floats by remembering
that they're floats in the value state and handling them properly,
it's signficantly easier to just disable it for now.

(cherry picked from commit f305e18804)
2024-08-12 18:17:06 -07:00
bors
2059132d3c Auto merge of #128606 - compiler-errors:revert-dead-code-changes-beta, r=cuviper
Revert recent changes to dead code analysis (beta flavor)

This PR cherry-picks the subset of #128404 which actually applies to beta, namely:

* 31fe9628cf Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix
* 2724aeaaeb Rollup merge of #126618 - mu001999-contrib:dead/enhance, r=pnkfelix
* 977c5fd419 Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petrochenkov
* 13314df21b Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix

And then re-blesses tests.

I opted to do a manual backport of that PR since preparing the revert correctly was quite a hassle.

r? `@cuviper` (or anyone on release)
2024-08-05 00:55:56 +00:00
bors
4b55199142 Auto merge of #128510 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.81] Update cargo

1 commits in a2b58c3dad4d554ba01ed6c45c41ff85390560f2..ca2346bd3c7f51e82964aaf7e47cdf770047b6ab
2024-07-16 00:52:02 +0000 to 2024-07-31 19:33:19 +0000
- [beta-1.81] fix(publish): Don't strip non-dev features (rust-lang/cargo#14328)

r? ghost
2024-08-04 05:59:29 +00:00
Michael Goulet
eeaf3ce07c Bless test fallout 2024-08-03 10:15:49 -04:00
Michael Goulet
35779db4d3 Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix"
This reverts commit 13314df21b, reversing
changes made to 6e534c73c3.
2024-08-03 09:48:08 -04:00
Michael Goulet
ad90fa64cf Revert "Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petrochenkov"
This reverts commit 977c5fd419, reversing
changes made to 24c94f0e4f.
2024-08-03 09:48:08 -04:00
Michael Goulet
d571104ec2 Revert "Rollup merge of #126618 - mu001999-contrib:dead/enhance, r=pnkfelix"
This reverts commit 2724aeaaeb, reversing
changes made to d929a42a66.
2024-08-03 09:48:08 -04:00
Michael Goulet
d99ba60a64 Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix"
This reverts commit 31fe9628cf, reversing
changes made to f20307851e.
2024-08-03 09:48:08 -04:00
Weihang Lo
4461ffbd64
[beta-1.81] Update cargo 2024-08-01 13:09:06 -04:00
bors
08328a323e Auto merge of #128167 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] rustdoc: clean up and fix ord violations in item sorting

Cherry-picks "rustdoc: clean up and fix ord violations in item sorting #128146" to beta.

r? `@Mark-Simulacrum`
2024-07-25 01:53:57 +00:00
Michael Howell
c547831fb7 rustdoc: clean up and fix ord violations in item sorting
Based on e3fdafc263 with a few
minor changes:

- The name sorting function is changed to follow the [version sort]
  from the style guide
- the `cmp` function is redesigned to more obviously make a
  partial order, by always return `cmp()` of the same variable as
  the `!=` above

[version sort]: https://doc.rust-lang.org/nightly/style-guide/index.html#sorting

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2024-07-24 20:38:30 -04:00
bors
b13c0dda24 Auto merge of #128031 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] promote master

https://forge.rust-lang.org/release/process.html#beta-to-stable

r? `@Mark-Simulacrum`
2024-07-22 01:05:22 +00:00
Mark Rousskov
7be792e622 Fix dry-run execution of pre-release 2024-07-21 10:25:48 -04:00
Mark Rousskov
36c4e00959 Update CURRENT_RUSTC_VERSION 2024-07-21 08:55:06 -04:00
Mark Rousskov
1853c17a0b Switch channel to beta 2024-07-21 08:54:31 -04:00
bors
5069856495 Auto merge of #127663 - Oneirical:fuzzy-testure, r=jieyouxu
Migrate 9 more very similar FFI `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

For the tracking issue:

- return-non-c-like-enum-from-c
- pass-non-c-like-enum-to-c
- c-static-dylib
- c-static-rlib
- extern-fn-generic
- extern-fn-with-union
- lto-no-link-whole-rlib
- linkage-attr-on-static
- issue-28595
2024-07-20 19:49:49 +00:00
bors
2e6fc42541 Auto merge of #128002 - matthiaskrgr:rollup-21p0cue, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #127463 ( use precompiled rustdoc with CI rustc)
 - #127779 (Add a hook for `should_codegen_locally`)
 - #127843 (unix: document unsafety for std `sig{action,altstack}`)
 - #127873 (kmc-solid: `#![forbid(unsafe_op_in_unsafe_fn)]`)
 - #127917 (match lowering: Split `finalize_or_candidate` into more coherent methods)
 - #127964 (run_make_support: skip rustfmt for lib.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-07-20 13:26:11 +00:00
Matthias Krüger
8963855ea1
Rollup merge of #127964 - jieyouxu:rmake-rustfmt-skip, r=nnethercote
run_make_support: skip rustfmt for lib.rs

To avoid them getting reordered once https://github.com/rust-lang/rust/pull/125443 goes through.

r? ``@nnethercote`` (since you were working on this)
2024-07-20 13:24:55 +02:00