Commit Graph

277815 Commits

Author SHA1 Message Date
Esteban Küber
13e8876ed4 Add default_field_values entry to unstable book 2025-01-09 21:51:14 +00:00
Asuna
ef69c3001b Fix proc_macro::quote! for raw ident 2025-01-09 22:16:21 +01:00
Asuna
2ab9db5442 Migrate check-fail tests for proc_macro::quote! from quote crate 2025-01-09 22:16:21 +01:00
Asuna
e9063c36a9 Migrate basic tests for proc_macro::quote! from quote crate 2025-01-09 22:16:20 +01:00
Asuna
d52564118b Append TokenTree with ToTokens in proc_macro::quote! 2025-01-09 22:16:11 +01:00
Frank Steffahn
5e505189cd Add tests cases from review of #132289 2025-01-09 21:43:25 +01:00
Jakub Beránek
c8b29d6f6f
CI: fix name of jobs
There is a difference between the `image` (the Dockerfile), the `name` of the job (which determines also its properties) and the `full_name`, which includes the `auto/try/pr` prefix.
2025-01-09 21:40:29 +01:00
Philipp Krones
43c3b30d37
Update Cargo.lock 2025-01-09 19:33:06 +01:00
Yoh Deadfall
8795750d43 Used pthread name functions returning result for FreeBSD and DragonFly 2025-01-09 21:25:55 +03:00
Philipp Krones
573db1c866
Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into clippy-subtree-update 2025-01-09 18:57:00 +01:00
Chris Denton
00448ab45a
Make bare-fn test less dependent on path width 2025-01-09 17:32:29 +00:00
Philipp Krones
19e305bb57
Rustup (#13970)
r? @ghost

changelog: none
2025-01-09 17:07:59 +00:00
Philipp Krones
663892bea7
Bump Clippy version -> 0.1.86 2025-01-09 18:01:44 +01:00
Philipp Krones
bb4a259908
Bump nightly version -> 2024-01-09 2025-01-09 18:01:20 +01:00
Philipp Krones
b5bf09e57a
Merge remote-tracking branch 'upstream/master' into rustup 2025-01-09 18:00:37 +01:00
Michael Goulet
924000d70e Unify conditional and non const call error reporting 2025-01-09 16:20:10 +00:00
bjorn3
147ac7ad5d Couple of cleanups to num.rs 2025-01-09 16:19:30 +00:00
bors
8247594932 Auto merge of #135286 - matthiaskrgr:rollup-sxuq1nh, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #134898 (Make it easier to run CI jobs locally)
 - #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible)
 - #135261 (Account for identity substituted items in symbol mangling)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-09 16:18:57 +00:00
Michael Goulet
5a9f0be0bd Make the non-const part swappable in the diagnostic 2025-01-09 16:15:19 +00:00
Michael Goulet
b321cd5573 Add note back to conditionally-const error message 2025-01-09 16:15:19 +00:00
bjorn3
8fd8b2d63c Only handle BinOp::Mul in codegen_i128::maybe_codegen_mul_checked 2025-01-09 16:04:25 +00:00
bjorn3
ec96e028a7 Slightly simplify maybe_codegen_checked 2025-01-09 15:28:50 +00:00
bjorn3
c74c817fb7 Rustup to rustc 1.86.0-nightly (a580b5c37 2025-01-08) 2025-01-09 13:41:32 +00:00
Matthias Krüger
41c7d5a485
Rollup merge of #135261 - compiler-errors:coverage-has-identity-substs, r=oli-obk
Account for identity substituted items in symbol mangling

See the inline comment.

r? oli-obk

Fixes #135235
2025-01-09 14:34:47 +01:00
Matthias Krüger
8ff355aefe
Rollup merge of #135195 - oli-obk:push-toyoyrupruko, r=lcnr
Make `lit_to_mir_constant` and `lit_to_const` infallible

My motivation for this change is just that it's annoying to check everywhere, especially since all but one call site was just ICEing on errors anyway right there.

They can still fail, but now just return an error constant instead of having the caller handle the error.

fixes #114317
fixes #126182
2025-01-09 14:34:41 +01:00
Matthias Krüger
d487294ffd
Rollup merge of #134898 - Kobzol:ci-python-script, r=MarcoIeni
Make it easier to run CI jobs locally

This PR extends the Python CI script to perform a poor man's CI-like execution of a given CI job locally. It's not perfect, but it's better than nothing.

r? `@jieyouxu`
2025-01-09 14:34:35 +01:00
bors
251206c27b Auto merge of #135268 - pietroalbini:pa-bump-stage0, r=Mark-Simulacrum
Master bootstrap update

Part of the release process.

r? `@Mark-Simulacrum`
2025-01-09 13:33:16 +00:00
lcnr
b85b2c60f9 add comment to test 2025-01-09 13:55:50 +01:00
Michael Goulet
39daadc76e Account for identity substituted items in symbol mangling 2025-01-09 13:55:40 +01:00
bjorn3
f6d58eb790 Update dependencies 2025-01-09 12:03:15 +00:00
bjorn3
517118e160 Make it easier to use unreleased versions of Cranelift 2025-01-09 12:00:00 +00:00
bors
ec12cd8436 Auto merge of #135279 - matthiaskrgr:rollup-ek2qere, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #135212 (Remove outdated information in the `unreachable_pub` lint description)
 - #135225 (Explicitly build proc macro test with panic=unwind)
 - #135242 (add missing provenance APIs on NonNull)
 - #135247 (Add a list of symbols for stable standard library crates)
 - #135269 (Remove some unnecessary `.into()` calls)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-09 10:50:19 +00:00
bjorn3
0e8e9b3887 Put rustc_codegen_cranelift.dll in bin rather than lib on Windows
rustc-clif has long been changed from a custom driver linking against
cg_clif to a wrapper around rustc which passes -Zcodegen-backend.
2025-01-09 10:26:50 +00:00
bjorn3
916a0b3225 Minor cleanup 2025-01-09 10:24:27 +00:00
Oli Scherer
be92ac3567 Only treat plain literal patterns as short 2025-01-09 09:02:56 +00:00
Oli Scherer
84c8d4f52d Use option combinators instead of manual if/return 2025-01-09 08:48:46 +00:00
Oli Scherer
8505904dcc Remove the now-useless Result from lit_to_const 2025-01-09 08:48:46 +00:00
Oli Scherer
07fcead073 Always take the Ok path in lit_to_const and produce error constants instead 2025-01-09 08:48:00 +00:00
Oli Scherer
787af97bab Use error constant instead of explicit error handling 2025-01-09 08:48:00 +00:00
Oli Scherer
7833cf7a47 Make lit_to_mir_constant infallible 2025-01-09 08:48:00 +00:00
Matthias Krüger
a1cadeab68
Rollup merge of #135269 - estebank:unneeded-into, r=compiler-errors
Remove some unnecessary `.into()` calls
2025-01-09 09:05:10 +01:00
Matthias Krüger
b593085a9e
Rollup merge of #135247 - tgross35:stdlib-sym-list, r=oli-obk
Add a list of symbols for stable standard library crates

There are a few locations where the crate name is checked against an enumerated list of `std`, `core`, `alloc`, and `proc_macro`, or some subset thereof. In most cases when we are looking for any "standard library" crate, all four crates should be treated the same. Change this so the crates are listed in one place, and that list is used wherever a list of `std` crates is needed.

`test` could be considered relevant in some of these cases, but generally treating it separate from the others seems preferable while it is unstable.

There are also a few places that Clippy will be able to use this.
2025-01-09 09:05:09 +01:00
Matthias Krüger
04e87154bb
Rollup merge of #135242 - RalfJung:nonnull-provenance, r=jhpratt
add missing provenance APIs on NonNull

This adds some provenance APIs that exist on raw pointers but have been forgotten on `NonNull`:
```rust
impl<T> NonNull<T> {
    pub const fn without_provenance(addr: NonZero<usize>) -> Self;
    pub fn from_exposed_provenance(addr: NonZero<usize>) -> Self;
}
impl<T: ?Sized> NonNull<T> {
    pub fn expose_provenance(self) -> NonZero<usize>;
}
```
https://github.com/rust-lang/libs-team/issues/518 is the ACP for the two exposed provenance ones; I forgot to include `without_provenance` there but I hope that, too, is uncontroversial (and anyway this PR only adds things unstably). Cc `@rust-lang/libs-api`

Tracking issue: https://github.com/rust-lang/rust/issues/135243
2025-01-09 09:05:08 +01:00
Matthias Krüger
84910fc3cd
Rollup merge of #135225 - erickt:fix-test, r=jieyouxu
Explicitly build proc macro test with panic=unwind

Fuchsia explicitly builds rust and all rust targets with `-C panic=abort` to minimize code generation size. However, when compiling a proc-macro with this setting it can cause a warning to be emitted, which breaks `tests/ui/invalid-compile-flags/crate-type-flag.rs`. This hasn't been a problem in the past for us since we compile our proc macros on host, rather than inside Fuchsia.

This attempts to fix the issue by explicitly requiring that we're using the unwinder when compiling this test to avoid the warning being emitted.

Fixes #135223
2025-01-09 09:05:07 +01:00
Matthias Krüger
a9614a5768
Rollup merge of #135212 - Urgau:unreach_pub-upd-descr, r=petrochenkov
Remove outdated information in the `unreachable_pub` lint description

As far as I understand the `unreachable_pub` lint hasn't had false-positives since it started using "effective visibilities". Let's remove that warning from the lint description.

r? `@petrochenkov`
2025-01-09 09:05:05 +01:00
bors
b6b8361bce Auto merge of #133324 - scottmcm:gvn-aggregate-transmute, r=cjgillot
[mir-opt] GVN some more transmute cases

We already did `Transmute`-then-`PtrToPtr`; this adds the nearly-identical `PtrToPtr`-then-`Transmute`.

It also adds `transmute(Foo(x))` → `transmute(x)`, when `Foo` is a single-field transparent type.  That's useful for things like `NonNull { pointer: p }.as_ptr()`.  It also detects when a `Transmute` is just an identity-for-the-value `PtrCast` between different raw pointer types, to help such things fold with other GVN passes.

Found these as I was looking at <https://github.com/rust-lang/compiler-team/issues/807>-related changes.  This also removes the questionably-useful "turn a transmute into a field projection" part of instsimplify (which I added ages ago without an obvious need for it) since that would just put back the field projections that MCP807 is trying to ban.

r? mir-opt
2025-01-09 08:04:37 +00:00
bors
65d7296fc9 Auto merge of #135277 - matthiaskrgr:rollup-0k61sf8, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #128110 (Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions)
 - #134609 (Add new `{x86_64,i686}-win7-windows-gnu` targets)
 - #134875 (Implement `const Destruct` in old solver)
 - #135221 (Include rustc and rustdoc book in replace-version-placeholder)
 - #135231 (bootstrap: Add more comments to some of the test steps)
 - #135256 (Move `mod cargo`  below the import statements)

Failed merges:

 - #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-09 05:21:43 +00:00
Matthias Krüger
afbd73559f
Rollup merge of #135256 - onur-ozkan:weird-mod-position, r=clubby789,jieyouxu
Move `mod cargo`  below the import statements

Just caught that during a [bootstrap reading-club](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.5BBRC.5D.20How.20do.20Steps.20and.20Paths.20work.3F) session.
2025-01-09 06:02:43 +01:00
Matthias Krüger
07a2995977
Rollup merge of #135231 - Zalathar:test-step-notes, r=jieyouxu
bootstrap: Add more comments to some of the test steps

Some of the test steps have names that don't clearly indicate what they actually do.

While there is ongoing experimental work to actually rename the steps (e.g. #135071), that's dependent on figuring out what the new names should actually be. In the meantime, we can still improve things by adding comments to help describe the steps, which will remain useful even after any renaming.
2025-01-09 06:02:43 +01:00
Matthias Krüger
29c17fc5ae
Rollup merge of #135221 - Urgau:replace-in-stable-book, r=pietroalbini
Include rustc and rustdoc book in replace-version-placeholder

This PR includes the *(stable)* rustc and rustdoc books which might contain `CURRENT_RUSTC_VERSION` that should be replaced when branching beta. Include them so they are not forgotten.

I didn't include any other folder or books as they don't strike me as relevant for it and might be problematic in the future if some of the submodules are turned into subtree, because we have places where we wouldn't want to replace them.

cf. https://github.com/rust-lang/rust/pull/135163#issuecomment-2574694931
cc `@pietroalbini`
2025-01-09 06:02:42 +01:00