Commit Graph

327570 Commits

Author SHA1 Message Date
Bryanskiy
3b917841b0 Privacy: tweak macros + more tests 2026-06-01 14:22:10 +03:00
bors
ddc1a64229 Auto merge of #157005 - JonathanBrouwer:rollup-1BZFgyy, r=JonathanBrouwer
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#156796 (Fix missing suggestion when matching `String` with `&str`)
 - rust-lang/rust#156933 (rustc_parse_format: improve the error diagnostic for `+` sign flag)
 - rust-lang/rust#156545 (fix issue-144595)
 - rust-lang/rust#156814 (Extend macOS deployment target mismatch filter to cover dylib and new ld formats)
 - rust-lang/rust#156851 (rustdoc: avoid ICE when rendering body-less type consts)
 - rust-lang/rust#156942 (Remove unneeded `#[skip_arg]` attributes)
 - rust-lang/rust#156972 (add field_projections fixme)
 - rust-lang/rust#156975 (Move check_cfg out of diagnostic attr module)
 - rust-lang/rust#156989 (Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests)
2026-05-27 08:25:14 +00:00
Jonathan Brouwer
a64a3f2075 Rollup merge of #156989 - antoyo:fix/cg_gcc-coretests-ci, r=GuillaumeGomez
Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests

The CI would use cranelift instead of the gcc codegen.
This fixes it and was tested in rust-lang/rust#156964.

r? @Kobzol

cc @GuillaumeGomez
2026-05-27 08:14:30 +02:00
Jonathan Brouwer
694ce93540 Rollup merge of #156975 - mejrs:move_check_cfg, r=GuillaumeGomez,JonathanBrouwer
Move check_cfg out of diagnostic attr module

r? @GuillaumeGomez
2026-05-27 08:14:29 +02:00
Jonathan Brouwer
1bc84618a1 Rollup merge of #156972 - lcnr:field_projections-fixme, r=Nadrieril
add field_projections fixme

haven't looked at the code in detail, but I can't see a way in which this is the correct behavior. I think ideally `try_evaluate_added_goals` just doens't return the certainty as afaik it only does so because `evaluate_added_goals_and_make_canonical_response` uses it internally

r? @Nadrieril @BennoLossin
2026-05-27 08:14:29 +02:00
Jonathan Brouwer
241bbc18fc Rollup merge of #156942 - GuillaumeGomez:rm-skip_arg-attrs, r=JonathanBrouwer
Remove unneeded `#[skip_arg]` attributes

@mejrs talked with me about the `Diagnostic` rework that happened recently and suggested that the `skip_arg` might be unneeded. This PR removes all of them, except one. I'll run a perf check to see if it's actually worth keeping around or if we can just remove this attribute altogether (or eventually do the same thing in the proc-macro directly).

cc @JonathanBrouwer

r? ghost
2026-05-27 08:14:28 +02:00
Jonathan Brouwer
03e935f81c Rollup merge of #156851 - reddevilmidzy:mgca-doc, r=GuillaumeGomez
rustdoc: avoid ICE when rendering body-less type consts

close: https://github.com/rust-lang/rust/issues/149287
2026-05-27 08:14:27 +02:00
Jonathan Brouwer
aa9d13374b Rollup merge of #156814 - cezarbbb:fix-issue-156714, r=jieyouxu
Extend macOS deployment target mismatch filter to cover dylib and new ld formats

The `deployment_mismatch` filter in `report_linker_output` only matched the old ld64 format for object files. With linker-messages promoted to warn-by-default in rust-lang/rust#153968, unfiltered deployment target warnings from dylibs and the new Apple linker (ld_prime) now surface as noise for users who never set `MACOSX_DEPLOYMENT_TARGET`.

Fixes rust-lang/rust#156714.

At present, the filter works only covered the specific format:

`ld: warning: object file (...) was built for newer 'macOS' version (...) than being linked (...)`

This was fine because linker-messages was `Allow-by-default` — nobody saw the other formats anyway. Then rust-lang/rust#153968 promoted it to Warn, and the gaps became visible.

Broadens the filter to cover all known ld deployment target version mismatch formats:

`ld: warning: object file (...)` — old ld64, already handled
`ld: warning: dylib (...)` — old ld64, was missing
All Apple platforms (`iOS`, `tvOS`, `watchOS`, `xrOS`, etc.), not just `macOS`
`ld: building for <platform>-A.B, but linking with dylib '...' which was built for newer version C.D` — new linker (ld_prime, Xcode 15+), the exact format from rust-lang/rust#156714

All matched messages are downgraded to `linker_info` (Allow-by-default), consistent with the existing behavior for the object file case.
2026-05-27 08:14:26 +02:00
Jonathan Brouwer
806a5186d4 Rollup merge of #156545 - bb1yd:issue-144595, r=mejrs
fix issue-144595

I close the previous PR because it's too messy

relevant issue:rust-lang/rust#144595

I fix this issue by calling `look_ahead` to check if the user write a name field in the tuple struct, then try to recover after calling `parse_ty`
2026-05-27 08:14:26 +02:00
Jonathan Brouwer
b0760d1d8e Rollup merge of #156933 - madsravn:wrong-order-more, r=estebank
rustc_parse_format: improve the error diagnostic for `+` sign flag

Added a new parser diagnostic in rustc_parse_format that detects when the `+` sign flag is used without a preceding colon in a format string (e.g., `{+}`) and provides a helpful error message and suggestion to use `{:+}` instead.

r? estebank
2026-05-27 08:14:25 +02:00
Jonathan Brouwer
495657cc2a Rollup merge of #156796 - Kokoro2336:fix/match-str-sugg, r=estebank
Fix missing suggestion when matching `String` with `&str`

Fixes rust-lang/rust#156404

Add suggestion when matching `String` with `&str`
2026-05-27 08:14:24 +02:00
bors
2cfb951a24 Auto merge of #156997 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

13 commits in 4d1f984518c77fad6eeef4f40153b002a659e662..fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef
2026-05-15 17:12:01 +0000 to 2026-05-26 15:08:03 +0000
- fix(compiler): forward verbose flag to rustc for local crates (rust-lang/cargo#17006)
- Fix CVE-2026-5222 and CVE-2026-5223 (rust-lang/cargo#17031)
- Don't use the network for a publish dry-run test  (rust-lang/cargo#17027)
- feat: Break out `RegistryConfig` and `crate_url` for interpreting `RegistryConfig::dl` (rust-lang/cargo#17011)
- refactor(diag): Sort the PARSE_PASS_RULES (rust-lang/cargo#17019)
- fix(artifact)!: Remove compat mode from artifacts (rust-lang/cargo#17016)
- refactor(diag): Simplify adding of new diagnostics (rust-lang/cargo#17015)
- test(package): Mark a network test that timed out on me (rust-lang/cargo#17017)
- refactor(diag): Pull in the parse pass (rust-lang/cargo#17008)
- test(lints): Avoid compiling where possible (rust-lang/cargo#17007)
- fix(diag): Report deferred diagnostics like other diagnostics (rust-lang/cargo#16994)
- refactor: drop `-Zunstable-options` for `rustdoc --emit` (rust-lang/cargo#17002)
- chore(deps): update msrv (1 version) to v1.95 (rust-lang/cargo#17001)
2026-05-27 05:14:22 +00:00
cezarbbb
52bedb4c05 Suppress macOS deployment target linker warnings from ld_prime 2026-05-27 11:32:09 +08:00
Weihang Lo
22929962bb Update cargo submodule 2026-05-26 20:44:39 -04:00
bors
d1fc603d17 Auto merge of #156385 - RalfJung:tcp-ports, r=nia-e
std::net::tcp: let the OS pick the port numbers



See rust-lang/rust#156377 for context.
I only did the TCP tests for now to see whether there are any unexpected problems.
2026-05-26 19:36:32 +00:00
Antoni Boucher
fd0c5f37e7 Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests 2026-05-26 15:01:47 -04:00
mejrs
a2b21900b4 Move check_cfg out of diagnostic attr module 2026-05-26 17:16:20 +02:00
lcnr
f7c35686aa add field_projections fixme 2026-05-26 16:39:09 +02:00
b1yd
92194469a0 fix issue-144595 2026-05-26 21:35:25 +08:00
bors
b4fefcd60b Auto merge of #156967 - JonathanBrouwer:rollup-cDWgT7T, r=JonathanBrouwer
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#156959 (stdarch subtree update)
 - rust-lang/rust#156541 (delegation: remove method call generation)
 - rust-lang/rust#156161 (rustc_on_unimplemented: introduce format specifiers)
 - rust-lang/rust#156752 (fix E0371 description)
 - rust-lang/rust#156761 (tidy: remove duplicate entry and alphabetize OS constants list)
 - rust-lang/rust#156872 (Drop skip_move_check_fns query.)
 - rust-lang/rust#156899 (fix breakpoint callback registration in `lldb_batchmode`)
 - rust-lang/rust#156927 (Reorganize `tests/ui/issues` [1/N])
 - rust-lang/rust#156947 (Update mdbook to 0.5.3)
2026-05-26 13:03:24 +00:00
Jonathan Brouwer
6140aeec15 Rollup merge of #156947 - ehuss:update-mdbook, r=jieyouxu
Update mdbook to 0.5.3

This is a small update with a few bug fixes.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-053
2026-05-26 13:42:20 +02:00
Jonathan Brouwer
d9b3fefbb1 Rollup merge of #156927 - zedddie:gsoc-batch-1-meow, r=Kivooeo
Reorganize `tests/ui/issues` [1/N]

Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues)

r? Kivooeo
@Teapot4195
2026-05-26 13:42:20 +02:00
Jonathan Brouwer
6aa3c7ef30 Rollup merge of #156899 - Walnut356:lldb_batchmode, r=jieyouxu
fix breakpoint callback registration in `lldb_batchmode`

We'd been failing to register the callback for a while now, because it couldn't find the specified function. This change imports `lldb_batchmode` and uses the namespaced name of the function.

As an aside, I'm relatively sure this breakpoint callback isn't necessary anymore. Whenever lldb stops at a breakpoint, it updates the selected thread/frame automatically. I don't want to remove it quite yet because I *might* need it for some bookkeeping with the `lldb-repr` directive (and `--bless` behavior)
2026-05-26 13:42:19 +02:00
Jonathan Brouwer
bd59ff8d66 Rollup merge of #156872 - cjgillot:skip_move_check_fns, r=oli-obk
Drop skip_move_check_fns query.

Looking at the header of the impl block for each method can be just as fast.
2026-05-26 13:42:18 +02:00
Jonathan Brouwer
d8a003a6d9 Rollup merge of #156761 - kcx1:fix/156730, r=tgross35
tidy: remove duplicate entry and alphabetize OS constants list
2026-05-26 13:42:17 +02:00
Jonathan Brouwer
dc3bdafaaf Rollup merge of #156752 - 42triangles:fix-dyn-trait-descr, r=oli-obk
fix E0371 description

This changes the `impl`s to be `impl {Trait} for dyn {Trait}` instead of just `impl {Trait} for {Trait}` in the description of E0371.

(While this was not part of "Crafting errors like rustc" workshop at RustWeek by @jdonszelmann and @estebank, I found this while going through all errors Rust emits to pick a favourite)
2026-05-26 13:42:16 +02:00
Jonathan Brouwer
903a08c0b0 Rollup merge of #156161 - mejrs:this_formatargs, r=oli-obk
rustc_on_unimplemented: introduce format specifiers

...as printing options for the annotated item.

See also the test and dev guide prose. This only affects rustc_on_unimplemented, not (yet) the other diagnostic attributes. I plan to do that in some later PR.

```rust
#![feature(rustc_attrs)]

#[rustc_on_unimplemented(
    message = "normal: {This}, path: {This:path},  resolved: {This:resolved}"
)]
pub trait Trait<'lifetime, const CONST_GENERIC: usize, A, B> where A: Send {}
```
will do:
```
normal: Trait, path: Trait<'lifetime, CONST_GENERIC, A, B>,  resolved: Trait<'_, 6, u8, _>
```
2026-05-26 13:42:16 +02:00
Jonathan Brouwer
f09612e237 Rollup merge of #156541 - aerooneqq:delegation-no-method-call, r=petrochenkov
delegation: remove method call generation

This PR removes method call generation from delegations, now we always generate default call. Part of rust-lang/rust#118212.

We reuse methods probing engine for finding needed adjustments, thus extending number of supported cases. In this PR adjustments are applied to trait methods (was supported before) ~and static functions (new feature)~. Free functions can be supported later.

Finally this PR solves issues from parent generics propagation from rust-lang/rust#155906.

r? @petrochenkov
2026-05-26 13:42:15 +02:00
Jonathan Brouwer
d1d13020f4 Rollup merge of #156959 - folkertdev:stdarch-sync-2026-05-26, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 18ca8c5d76.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-05-26 13:42:14 +02:00
Guillaume Gomez
9e96efac62 Remove unneeded #[skip_arg] attributes 2026-05-26 12:26:05 +02:00
Folkert de Vries
b622d86ddc Merge pull request #2138 from xonx4l/hexagon-gen-output-dir-arg
hexagon-gen: add optional output-dir argument
2026-05-26 08:28:01 +00:00
aerooneqq
40a782103b Remove method call generation in delegation 2026-05-26 08:06:36 +03:00
bors
b7e97a98f2 Auto merge of #156549 - GuillaumeGomez:ci-gcc-core, r=Kobzol
Add CI check when building sysroot with GCC backend and running libcore tests with it



Fixes https://github.com/rust-lang/rustc_codegen_gcc/issues/882.

Is it what you had in mind @Kobzol?

r? @Kobzol
2026-05-26 04:49:37 +00:00
xonx
527ed7ff85 add optional output-dir argument 2026-05-26 04:43:06 +00:00
Redddy
bc12569f94 rustdoc: avoid ICE when rendering body-less type consts 2026-05-26 01:05:57 +00:00
Eric Huss
b328c251b7 Update mdbook to 0.5.3
This is a small update with a few bug fixes.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-053
2026-05-25 17:59:47 -07:00
Guillaume Gomez
76b479930f Explain what each GCC dockerfile is testing 2026-05-25 22:41:36 +02:00
bors
31a9463c6e Auto merge of #156930 - JonathanBrouwer:rollup-NuilniS, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#156764 (tests: fix pub-priv-dep test expectation)
 - rust-lang/rust#156825 (compiletest: sort unexpected and unimportant errors)
 - rust-lang/rust#156878 (codegen: re-enable FileCheck for scalable-vector tuple intrinsics)
 - rust-lang/rust#156909 (Rewrite documentation that said to implement `Into`)
2026-05-25 20:03:42 +00:00
Mads Ravn
900e061dce Removing Suggestion from ParseError and fixed tests accordingly 2026-05-25 21:34:36 +02:00
Mads Ravn
8495129357 Adding sign flag formatting error message 2026-05-25 21:23:46 +02:00
Jonathan Brouwer
62bb58892b Rollup merge of #156909 - joshtriplett:into-docs, r=SimonSapin
Rewrite documentation that said to implement `Into`
2026-05-25 20:54:08 +02:00
Jonathan Brouwer
04873a08af Rollup merge of #156878 - qaijuang:sve-tuple-intrinsics-filecheck, r=workingjubilee
codegen: re-enable FileCheck for scalable-vector tuple intrinsics

The FileCheck directives in `tests/codegen-llvm/scalable-vectors/tuple-intrinsics.rs` were not actually being checked: the test used `//@ build-pass`, and rust-lang/rust#155630 made that explicit by replacing it with `//@ skip-filecheck`.

This fixes the stale checks and re-enables FileCheck for the test. The `get` and `set` cases now use concrete index-0 wrappers, so they have stable `#[no_mangle]` names for FileCheck to match.

Fixes rust-lang/rust#155665.

r? @jieyouxu
2026-05-25 20:54:08 +02:00
Jonathan Brouwer
c9fbeafa80 Rollup merge of #156825 - aerooneqq:sort-errors, r=petrochenkov
compiletest: sort unexpected and unimportant errors

Sort unexpected errors before printing in tests, this helps inserting annotations manually from bottom to top and searching for errors is a bit simpler.

Output before:
```rust
tests/ui/delegation/explicit-paths.rs:47:9: ERROR: method `foo3` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:9: ERROR: method `foo4` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:27:14: ERROR: cannot find function `foo4` in `S` [E0425]
tests/ui/delegation/explicit-paths.rs:37:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:48:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:59:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:67:5: ERROR: conflicting implementations of trait `Trait` for type `S` [E0119]
tests/ui/delegation/explicit-paths.rs:56:36: ERROR: mismatched types [E0308]
tests/ui/delegation/explicit-paths.rs:68:16: ERROR: the trait bound `S2: Trait` is not satisfied [E0277]
tests/ui/delegation/explicit-paths.rs:68:30: ERROR: mismatched types [E0308]
```

Output after:
```rust
tests/ui/delegation/explicit-paths.rs:27:14: ERROR: cannot find function `foo4` in `S` [E0425]
tests/ui/delegation/explicit-paths.rs:37:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:47:9: ERROR: method `foo3` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:9: ERROR: method `foo4` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:56:36: ERROR: mismatched types [E0308]
tests/ui/delegation/explicit-paths.rs:59:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:67:5: ERROR: conflicting implementations of trait `Trait` for type `S` [E0119]
tests/ui/delegation/explicit-paths.rs:68:16: ERROR: the trait bound `S2: Trait` is not satisfied [E0277]
tests/ui/delegation/explicit-paths.rs:68:30: ERROR: mismatched types [E0308]
```

r? @petrochenkov
2026-05-25 20:54:07 +02:00
Jonathan Brouwer
9ff5ee2532 Rollup merge of #156764 - mladedav:dm/private-public, r=Zalathar
tests: fix pub-priv-dep test expectation

Related to private dependencies rust-lang/rust#44663

The test had wrongly configured dependency privacy. The ascii graph shows that both dependencies should be private. Furthermore, the way this test existed was effectively identical to `shared_direct_private.rs`.
2026-05-25 20:54:06 +02:00
Kokoro2336
a09204ad18 fix: missing suggestion for string match.
chore: update .fixed.

fix: suggestion.

Revert irrelevant changes.
2026-05-26 02:01:52 +08:00
bors
c854ac880b Auto merge of #156594 - LimpSquid:stabilize-bool-to-result, r=SimonSapin
Stabilize bool_to_result

Closes https://github.com/rust-lang/rust/issues/142748
2026-05-25 16:51:27 +00:00
zedddie
480b44c8e1 bless batch 2026-05-25 18:08:12 +02:00
zedddie
a25ec1a018 move batch 2026-05-25 17:55:04 +02:00
Amanieu d'Antras
4c6f3734fd Merge pull request #2129 from heiher/vrepl-128-ve-0-i
loongarch: Use `intrinsics::simd` for vrepl{128}ve{0,i}
2026-05-25 13:43:44 +00:00
bors
50439483a7 Auto merge of #156916 - JonathanBrouwer:rollup-CbeVZH2, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#156862 (Convert strict_provenance_lints to late lint passes)
 - rust-lang/rust#156879 (Replace rustfmt code of conduct with link)
 - rust-lang/rust#156901 (compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`)
2026-05-25 13:13:32 +00:00