Commit graph

285226 commits

Author SHA1 Message Date
bors
973ec11f61 Auto merge of #140592 - cuviper:beta-next, r=cuviper
[beta] backports

- Don't allow flattened format_args in const. #139624
- set subsections_via_symbols for ld64 helper sections #139752
- Fix detection of `main` function if there are expressions around it #140220
- rustdoc: Fix doctest heuristic for main fn wrapping #140420
- extend the list of registered dylibs on `test::prepare_cargo_test` #140563

r? cuviper
2025-05-03 03:52:37 +00:00
onur-ozkan
260fcc67f3 extend the list of registered dylibs on test::prepare_cargo_test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 7b25d4a99e)
2025-05-02 17:25:15 -07:00
León Orell Valerian Liehr
8a4c4721cc rustdoc: Fix doctest heuristic for main fn wrapping
(cherry picked from commit 714ea10ea4)
2025-05-02 09:35:16 -07:00
Guillaume Gomez
1f6a6b1008 Fix bad handling of macros if there is already a main function
(cherry picked from commit aa69e3a0cb)
2025-05-02 09:29:33 -07:00
Guillaume Gomez
c44a1d7c45 If there is a ; alone, we consider that the doctest needs to be put inside a function
(cherry picked from commit 3ef98a55ef)
2025-05-02 09:29:33 -07:00
Guillaume Gomez
692490898b Improve code
(cherry picked from commit 3ededc1053)
2025-05-02 09:29:33 -07:00
Guillaume Gomez
745d54e5b2 Add regression ui test for #140162 and for #139651
(cherry picked from commit 81438c0b05)
2025-05-02 09:29:33 -07:00
Guillaume Gomez
0457f2e927 Fix detection of main function if there are expressions around it
(cherry picked from commit 3536324565)
2025-05-02 09:29:33 -07:00
usamoi
8ec60ca601 set subsections_via_symbols for ld64 helper sections
(cherry picked from commit b1a38313cb)
2025-05-02 09:29:27 -07:00
Mara Bos
4ad0f1e1d3 Add test for format_args!("{}", 0) in const.
(cherry picked from commit 56426db0b6)
2025-05-02 09:29:22 -07:00
Mara Bos
0980622033 Don't allow flattened format_args in const.
(cherry picked from commit cc791ebe60)
2025-05-02 09:29:22 -07:00
bors
9d6fe3d1b2 Auto merge of #139765 - dtolnay:hashextractif, r=ChrisDenton
[beta] Delay `hash_extract_if` stabilization from 1.87 to 1.88

This PR is a revert of:

- https://github.com/rust-lang/rust/pull/134655

for use in the event that we are unable to get https://github.com/rust-lang/rust/pull/139764 into 1.87 (current beta).
2025-04-28 23:17:14 +00:00
bors
74f40c495e Auto merge of #140269 - cuviper:beta-next, r=cuviper
[beta] backports

- Do not mix normalized and unnormalized caller bounds when constructing param-env for `receiver_is_dispatchable` #138941
- Ignore zero-sized types in wasm future-compat warning #139498
- Don't warn about `v128` in wasm ABI transition #139809
- Revert overzealous parse recovery for single colons in paths #140228

r? cuviper
2025-04-26 19:05:06 +00:00
Josh Stone
7ef00508c5 Bless ui/associated-consts/issue-93835
Beta-backporting #140228 has the same effect on this test as #139341
already had on master.
2025-04-24 13:56:16 -07:00
León Orell Valerian Liehr
2aec882174 Revert overzealous parse recovery for single colons
(cherry picked from commit 16da97be2f)
2025-04-24 13:55:32 -07:00
Alex Crichton
eaa7d3ace8 Don't warn about v128 in wasm ABI transition
This has other warnings if necessary and doesn't need extra warnings
from this FCW.

cc #138762

(cherry picked from commit 19e44d463b)
2025-04-24 13:38:46 -07:00
Alex Crichton
39721fa79b Ignore zero-sized types in wasm future-compat warning
This commit fixes a false positive of the warning triggered for #138762
and the fix is to codify that zero-sized types are "safe" in both the
old and new ABIs.

(cherry picked from commit f9091e24a0)
2025-04-24 13:38:40 -07:00
Michael Goulet
67737dfe28 Do not mix normalized and unnormalized caller bounds when constructing param-env for receiver_is_dispatchable
(cherry picked from commit 4f2baaa9c6)
2025-04-24 13:38:36 -07:00
bors
386abeb93a Auto merge of #139988 - cuviper:beta-next, r=cuviper
[beta] backports

- Fix 2024 edition doctest panic output #139328
- make `Arguments::as_statically_known_str` doc(hidden) #139389
- Revert "Deduplicate template parameter creation" #139878
- sync::mpsc: prevent double free on `Drop` #139553

r? cuviper
2025-04-19 12:54:40 +00:00
Petros Angelatos
f31cf5cb7c sync::mpsc: prevent double free on Drop
This PR is fixing a regression introduced by #121646 that can lead to a
double free when dropping the channel.

The details of the bug can be found in the corresponding crossbeam PR
https://github.com/crossbeam-rs/crossbeam/pull/1187

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
(cherry picked from commit b9e2ac5c7b)
2025-04-18 10:06:17 -07:00
Petros Angelatos
e71ad4a2c9 sync::mpsc: add miri reproducer of double free
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
(cherry picked from commit 9eb6a5446a)
2025-04-18 10:06:17 -07:00
Vadim Petrochenkov
4782bbc568 Revert "Deduplicate template parameter creation"
This reverts commit 6adc2c1fd6.

(cherry picked from commit 38f7060a73)
2025-04-17 10:26:17 -07:00
mejrs
d1cd5ee9f6 make Arguments::as_statically_known_str doc(hidden)
(cherry picked from commit cfcc47ea54)
2025-04-17 10:26:12 -07:00
Guillaume Gomez
10e682e67a Use eprint! instead of eprintln!
(cherry picked from commit f9927ee042)
2025-04-17 10:26:06 -07:00
Guillaume Gomez
3d4b571c3d Add regression test for #137970
(cherry picked from commit fff2484700)
2025-04-17 10:26:06 -07:00
Guillaume Gomez
84ed87a841 Fix 2024 edition doctest panic output
(cherry picked from commit a91e97c06c)
2025-04-17 10:26:06 -07:00
David Tolnay
d8fad7593a
[beta] Delay hash_extract_if stabilization from 1.87 to 1.88 2025-04-13 13:31:52 -07:00
bors
a5948295b4 Auto merge of #139625 - Zoxc:revert-pr138824, r=oli-obk
[beta] Revert "Remove `prev_index_to_index` field from `CurrentDepGraph`"

This reverts https://github.com/rust-lang/rust/pull/138824 on beta to fix issues with incremental compilation in that PR. https://github.com/rust-lang/rust/pull/139410 will fix these on master.

r? `@oli-obk`
2025-04-12 10:32:00 +00:00
John Kåre Alsaker
2f6851861f Revert "Remove prev_index_to_index field from CurrentDepGraph"
This reverts commit 60e4a1b8f3.
2025-04-10 11:34:00 +02:00
bors
a22ecb51f8 Auto merge of #139463 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.87] Update cargo

1 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..202515849e943032d8fdd3eba57bf2c86e0da736
2025-03-26 18:11:00 +0000 to 2025-04-06 19:30:58 -0400
- [beta-1.87] chore: Bump cargo-util-schemas to 0.8.1 (rust-lang/cargo#15402)

r? ghost
2025-04-07 16:07:19 +00:00
Weihang Lo
35dae586e3
[beta-1.87] Update cargo 2025-04-07 00:03:50 -04:00
bors
e6ed56aad8 Auto merge of #139360 - BoxyUwU:bump_beta_bootstrap, r=kobzol
[beta] bump stage0
2025-04-05 15:42:21 +00:00
Boxy
8e37a0b8a6 bump stage0 2025-04-04 11:41:34 +01:00
bors
45165c82a4 Auto merge of #139185 - BoxyUwU:beta, r=BoxyUwU
[beta] Prepare Rust 1.87.0

r? ghost
2025-04-01 00:58:36 +00:00
Boxy
2d814ae6d4 replace version placeholder 2025-03-31 18:09:32 +01:00
Boxy
f05087f5d3 bump channel 2025-03-31 18:07:42 +01:00
bors
2848101ed5 Auto merge of #138784 - madsmtm:bootstrap-bump-cc-cmake, r=jieyouxu
Bump boostrap `cc` to 1.2.17 and `cmake` to 0.1.54

The `cc` version in `bootstrap` was reverted down to 1.1.22 in https://github.com/rust-lang/rust/pull/137460 (previously at 1.2.0). The offending issue has since then been resolved in https://github.com/rust-lang/cc-rs/pull/1413, and a new version of `cc` has been released in https://github.com/rust-lang/cc-rs/pull/1435, so let's try to update the version again.

See [the `cc-rs` changelog](d9dd20e376/CHANGELOG.md) and [the `cmake-rs` changelog](fd56c5a6b4/CHANGELOG.md) for details on what has changed here.

r? jieyouxu who tried this last in https://github.com/rust-lang/rust/pull/137022.
`@rustbot` label T-bootstrap
try-job: *apple*
2025-03-29 00:03:11 +00:00
bors
920d95eaf2 Auto merge of #139085 - matthiaskrgr:rollup-3q2peol, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #138976 (Explain one-past-the-end pointer in std library)
 - #139052 (Put pin!() tests in the right file.)
 - #139058 (Fix formatting nit in process.rs)
 - #139063 (Fix TAIT & ATPIT feature gating in the presence of anon consts)
 - #139065 (Miri subtree update)
 - #139069 (`io::Take`: avoid new `BorrowedBuf` creation in some case)
 - #139075 (Do not treat lifetimes from parent items as influencing child items)
 - #139079 (tracking autodiff files via triagebot.toml)

Failed merges:

 - #139044 (bootstrap: Avoid cloning `change-id` list)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-28 20:56:37 +00:00
Matthias Krüger
20f2655258
Rollup merge of #139079 - EnzymeAD:autodfff-triagebot, r=Noratrieb
tracking autodiff files via triagebot.toml

r? `@oli-obk`

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-03-28 21:18:32 +01:00
Matthias Krüger
3e968c7e9f
Rollup merge of #139075 - oli-obk:resolver-item-lifetime, r=compiler-errors
Do not treat lifetimes from parent items as influencing child items

```rust
struct A;
impl Bar<'static> for A {
    const STATIC: &str = "";
    //            ^ no future incompat warning
}
```

has no future incompat warning, because there is no ambiguity. But

```rust
struct C;
impl Bar<'_> for C {
//       ^^ this lifeimte
    const STATIC: &'static str = {
        struct B;
        impl Bar<'static> for B {
            const STATIC: &str = "";
            // causes     ^ to emit a future incompat warning
        }
        ""
    };
}
```

had one before this PR, because the impl for `B` (which is just a copy of `A`) thought it was influenced by a lifetime on the impl for `C`.

I double checked all other `lifetime_ribs` iterations and all of them do check for `Item` boundaries. This feels very fragile tho, and ~~I think we should do not even be able to see ribs from parent items, but that's a different refactoring that I'd rather not do at the same time as a bugfix~~. EDIT: ah nevermind, this is needed for improving diagnostics like "use of undeclared lifetime" being "can't use generic parameters from outer item" instead.

r? `@compiler-errors`
2025-03-28 21:18:32 +01:00
Matthias Krüger
7c0a14f030
Rollup merge of #139069 - a1phyr:better_take, r=joboet
`io::Take`: avoid new `BorrowedBuf` creation in some case

If `self.limit == buf.capacity()`, doing the whole `BorrowedBuf` dance is not necessary.
2025-03-28 21:18:31 +01:00
Matthias Krüger
b6699318fa
Rollup merge of #139065 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-03-28 21:18:30 +01:00
Matthias Krüger
52aed95060
Rollup merge of #139063 - fmease:fix-tait-atpit-gating, r=oli-obk
Fix TAIT & ATPIT feature gating in the presence of anon consts

Fixes #139055 (https://github.com/rust-lang/rust/issues/119924#issuecomment-1928659690).

r? oli-obk or anybody else
2025-03-28 21:18:30 +01:00
Matthias Krüger
660e8633f3
Rollup merge of #139058 - barafael:patch-1, r=joboet
Fix formatting nit in process.rs

Minor formatting issue in `process.rs`.
2025-03-28 21:18:29 +01:00
Matthias Krüger
3060c77815
Rollup merge of #139052 - m-ou-se:pin-macro-tests, r=joboet
Put pin!() tests in the right file.

In #138717, these tests were put in `tests/pin.rs`, but they should go in `tests/pin_macro.rs`.

r? `@jdonszelmann`
2025-03-28 21:18:28 +01:00
Matthias Krüger
e82557e9ad
Rollup merge of #138976 - xizheyin:issue-138969, r=RalfJung
Explain one-past-the-end pointer in std library

Closing #138969

r? libs
2025-03-28 21:18:27 +01:00
Manuel Drehwald
e6a2c29bc4 tracking autodiff files via triagebot.toml 2025-03-28 14:15:08 -04:00
León Orell Valerian Liehr
7a295d1be0
Fix TAIT & ATPIT feature gating in the presence of anon consts 2025-03-28 18:15:23 +01:00
Oli Scherer
dabee5d563 Do not treat lifetimes from parent items as influencing child items 2025-03-28 17:06:00 +00:00
bors
19f42cb9bb Auto merge of #139054 - matthiaskrgr:rollup-2bk2fb4, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #137889 (update outdated doc with new example)
 - #138104 (Greatly simplify doctest parsing and information extraction)
 - #138678 (rustc_resolve: fix instability in lib.rmeta contents)
 - #138986 (feat(config): Add ChangeId enum for suppressing warnings)
 - #139038 (Update target maintainers for thumb targets to reflect new REWG Arm team name)
 - #139045 (bootstrap: update `test_find` test)
 - #139047 (Remove ScopeDepth)

Failed merges:

 - #139044 (bootstrap: Avoid cloning `change-id` list)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-28 16:37:12 +00:00