Commit Graph

300570 Commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
074256988f Rollup merge of #143130 - xizheyin:142966, r=ibraheemdev
doc(std): clarify `NonZero<T>` usage limitation in doc comment

Closes rust-lang/rust#142966

This PR clarifies `NonZero<T>` usage limitation in doc comment and fixes a typo.

r? libs
2025-07-07 19:45:38 +08:00
Pavel Grigorenko
bb8b741c32 Port #[export_stable] to the new attribute system 2025-07-07 14:33:20 +03:00
Jieyou Xu
979d7b2ca1 Add change tracker entry for disabling download-rustc temporarily 2025-07-07 19:30:37 +08:00
bors
25cf7d13c9 Auto merge of #143035 - ywxt:less-work-steal, r=oli-obk
Only work-steal in the main loop for rustc_thread_pool

This PR is a replica of <https://github.com/rust-lang/rustc-rayon/pull/12> that only retained work-steal in the main loop for rustc_thread_pool.

r? `@oli-obk`

cc `@SparrowLii` `@Zoxc` `@cuviper`

Updates rust-lang/rust#113349
2025-07-07 11:16:16 +00:00
nora
9adbf6270e Disable download-rustc for library profile
The feature currently completely breaks `x test`, core functionality of working on the standard library.
Therefore it should be disabled by default until that problem is fixed.
Having to wait a bit longer for a check build is nothing compared to completely mysterious build errors when testing.
2025-07-07 13:02:00 +02:00
lcnr
3ddcf8b94c remove has_nested 2025-07-07 11:19:58 +02:00
bohan
e1720d7396 consider nested cases for duplicate RPITIT 2025-07-07 17:09:39 +08:00
xizheyin
796b4d1fb4 Point to correct argument in Func Call when Self type fails trait bound
When a trait bound fails due to the Self type parameter, adjust_fulfillment_errors
now correctly points to the corresponding function argument instead of incorrectly
pointing to other arguments.

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07 16:47:15 +08:00
xizheyin
cf7e896cf8 Add test tests/ui/trait-bounds/false-span-in-trait-bound-label.rs
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07 16:30:14 +08:00
Jieyou Xu
8b33e93676 Fix x86_64-unknown-netbsd platform support page
`x86_64-unknown-netbsd` is Tier 2 with host tools, not Tier 3.
2025-07-07 16:15:13 +08:00
bors
8df4a58ac4 Auto merge of #143565 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-07-07 08:14:30 +00:00
Oli Scherer
62929b9420 Add ty_span query 2025-07-07 08:13:12 +00:00
Martin Nordholts
aa364cac52 compiler: Deduplicate must_emit_unwind_tables() comments
There is one comment at a call site and one comment in the function
definition that are mostly saying the same thing. Fold the call site
comment into the function definition comment to reduce duplication.

There are actually some inaccuracies in the comments but let's
deduplicate before we address the inaccuracies.
2025-07-07 09:34:34 +02:00
Martin Nordholts
1eff043e7a rustc_codegen_llvm: Remove reference to non-existing no_landing_pads()
Removing this reference was forgotten in eb4725fc54. Grepping for
no_landing_pads returns no hits after this.
2025-07-07 09:34:34 +02:00
xizheyin
229be21d0d Add ui test unnessary-error-issue-138401.rs
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07 15:27:01 +08:00
xizheyin
2765bd48f0 std: fix typo in std::path
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07 15:20:22 +08:00
Edoardo Marangoni
f4e2b5c7f5 compiler: Parse p- specs in datalayout string, allow definition of custom default data address space 2025-07-07 09:04:53 +02:00
Edoardo Marangoni
93f1201c06 compiler: Parse p- specs in datalayout string, allow definition of custom default data address space 2025-07-07 09:04:53 +02:00
Julien Cretin
cdbdd8a4ad Reverse comparison order
Co-authored-by: beef <ent3rm4n@gmail.com>
2025-07-07 08:49:10 +02:00
xizheyin
22342b0959 doc(std): clarify NonZero<T> usage limitation in doc comment
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07 14:47:35 +08:00
Ralf Jung
a96e73f39e Merge pull request #4450 from RalfJung/unwind-payloads
Unwinding != panicking
2025-07-07 06:42:50 +00:00
Ralf Jung
ae3b9765f4 split unwinding logic from panic logic 2025-07-07 08:18:32 +02:00
Ralf Jung
51cba7839a Merge pull request #4449 from rust-lang/rustup-2025-07-07
Automatic Rustup
2025-07-07 05:31:07 +00:00
The Miri Cronjob Bot
0e043a86f0 Merge from rustc 2025-07-07 05:05:49 +00:00
bors
c720f49c46 Auto merge of #143048 - Kobzol:bootstrap-check-stage-1, r=jieyouxu
Enforce in bootstrap that check must have stage at least 1

This PR is another step towards https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523586917, this time dealing with `x check`.

It enforces the invariant that:
- We check std stage N with rustc stage N
- We check everything else stage N with rustc stage N - 1

It creates a single function that prepares a proper build compiler for checking something, and also adds snapshot tests for various common check steps. Some obsolete code was also removed.

The default check stage also becomes 1, for all profiles. I tested manually that `x check std` with `download-ci-rustc` still works and doesn't build rustc locally.

Closes: https://github.com/rust-lang/rust/pull/139170

r? `@ghost`
2025-07-07 05:04:39 +00:00
The Miri Cronjob Bot
59af8f36e3 Preparing for merge from rustc 2025-07-07 04:58:18 +00:00
Josh Triplett
ef0465a7eb mbe: Clarify comments about error handling in compile_declarative_macro 2025-07-06 20:49:12 -07:00
Josh Triplett
493cdf2269 mbe: Factor out a helper to check for unexpected EOF in definition
Will get called additional times when expanding parsing to cover
attributes
2025-07-06 20:49:12 -07:00
Josh Triplett
87cd178159 mbe: Factor out a helper to check an LHS
This currently gets called only once, but will get called multiple times
when handling attributes.
2025-07-06 20:49:12 -07:00
Josh Triplett
8d5eb6badb mbe: Simplify compile_declarative_macro by factoring out some variables 2025-07-06 20:49:12 -07:00
Makai
627cefa993 remove rustc_smir from tests 2025-07-07 03:45:09 +00:00
bors
0d11be5aab Auto merge of #143556 - jhpratt:rollup-nid39y2, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143206 (Align attr fixes)
 - rust-lang/rust#143236 (Stabilize `mixed_integer_ops_unsigned_sub`)
 - rust-lang/rust#143344 (Port `#[path]` to the new attribute parsing infrastructure )
 - rust-lang/rust#143359 (Link to 2024 edition page for `!` fallback changes)
 - rust-lang/rust#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`)
 - rust-lang/rust#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP)
 - rust-lang/rust#143535 (Remove duplicate word)
 - rust-lang/rust#143544 (compiler: rename BareFn to FnPtr)
 - rust-lang/rust#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-07 02:03:03 +00:00
Jacob Pratt
c6be76206f Rollup merge of #143544 - workingjubilee:rename-bare-fn, r=fmease
compiler: rename BareFn to FnPtr

At some point "BareFn" was the chosen name for a "bare" function, without the niceties of `~fn`, `&fn`, or a few other ways of writing a function type. However, at some point the syntax for a "bare function" and any other function diverged even more. We started calling them what they are: function pointers, denoted by their own syntax.

However, we never changed the *internal* name for these, as this divergence was very gradual. Personally, I have repeatedly searched for "FnPtr" and gotten confused until I find the name is BareFn, only to forget this until the next time, since I don't routinely interact with the higher-level AST and HIR. But even tools that interact with these internal types only touch on them in a few places, making a migration easy enough. Let's use a more intuitive and obvious name, as this 12+ year old name has little to do with current Rust.
2025-07-07 03:26:09 +02:00
Jacob Pratt
2992997f6f Rollup merge of #143552 - nagisa:makes-ceil-char-boundary-go-zoom, r=jhpratt
lib: more eagerly return `self.len()` from `ceil_char_boundary`

There is no reason to go through the complicated branch as it would
always return `self.len()` in this case. Also helps debug code somewhat
and I guess might make optimizations easier (although I haven't really a
sample to demonstrate this.)

ref. https://github.com/rust-lang/rust/issues/93743
Suggested by `@chrisduerr`
2025-07-07 03:26:09 +02:00
Jacob Pratt
7eea141b87 Rollup merge of #143544 - workingjubilee:rename-bare-fn, r=fmease
compiler: rename BareFn to FnPtr

At some point "BareFn" was the chosen name for a "bare" function, without the niceties of `~fn`, `&fn`, or a few other ways of writing a function type. However, at some point the syntax for a "bare function" and any other function diverged even more. We started calling them what they are: function pointers, denoted by their own syntax.

However, we never changed the *internal* name for these, as this divergence was very gradual. Personally, I have repeatedly searched for "FnPtr" and gotten confused until I find the name is BareFn, only to forget this until the next time, since I don't routinely interact with the higher-level AST and HIR. But even tools that interact with these internal types only touch on them in a few places, making a migration easy enough. Let's use a more intuitive and obvious name, as this 12+ year old name has little to do with current Rust.
2025-07-07 03:26:09 +02:00
Jacob Pratt
3e76cd796f Rollup merge of #143535 - reallesee:patch-1, r=jdonszelmann
Remove duplicate word

Deleted a duplicated word to improve text clarity.

contains contains - contains
2025-07-07 03:26:08 +02:00
Jacob Pratt
02da294965 Rollup merge of #143529 - pixel27:master, r=jhpratt
Renamed retain_mut to retain on LinkedList as mentioned in the ACP

This is for proposal: https://github.com/rust-lang/libs-team/issues/250

The original check-in (https://github.com/rust-lang/rust/pull/114136) contained both methods **retain** and **retain_mut**, which does not conform to https://github.com/rust-lang/libs-team/issues/250#issuecomment-1766822671.

I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request.

The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements.

I've run the tests "library/alloc" on the code and no issues.

Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
2025-07-07 03:26:08 +02:00
Jacob Pratt
a1b51aa400 Rollup merge of #143456 - joshtriplett:mbe-unused-rules-bitset, r=lqd
mbe: Change `unused_macro_rules` to a `DenseBitSet`

Now that it only contains indexes, and no other information, a bitset provides a more compact and simpler representation.

This builds on <https://github.com/rust-lang/rust/pull/143416>. Only the last commit is new.
2025-07-07 03:26:07 +02:00
Jacob Pratt
11d8667f21 Rollup merge of #143359 - clubby789:fallback-2024-doc, r=ibraheemdev
Link to 2024 edition page for `!` fallback changes

Closes rust-lang/rust#143207
2025-07-07 03:26:07 +02:00
Jacob Pratt
11b24c108d Rollup merge of #143344 - JonathanBrouwer:path-parser, r=jdonszelmann
Port `#[path]` to the new attribute parsing infrastructure

Ports `#[path]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

This PR duplicates a change from https://github.com/rust-lang/rust/pull/143237
Draft until that one is merged
2025-07-07 03:26:06 +02:00
Jacob Pratt
00c67d1a12 Rollup merge of #143236 - nxsaken:mixed_integer_ops_unsigned_sub, r=ibraheemdev
Stabilize `mixed_integer_ops_unsigned_sub`

Closes rust-lang/rust#126043.
2025-07-07 03:26:06 +02:00
Jacob Pratt
d748e70fea Rollup merge of #143206 - Jules-Bertholet:align-attr-fixes, r=workingjubilee
Align attr fixes

- Remove references to the superseded `repr(align)` syntax
- Allow the attribute on fn items in `extern` blocks
- Test attribute in combination with `async fn` and `dyn`

r? workingjubilee

Tracking issue: https://github.com/rust-lang/rust/issues/82232
`@rustbot` label A-attributes F-fn_align T-compiler
2025-07-07 03:26:05 +02:00
Simonas Kazlauskas
49806a5486 lib: more eagerly return self.len() from ceil_char_boundary
There is no reason to go through the complicated branch as it would
always return `self.len()` in this case. Also helps debug code somewhat
and I guess might make optimizations easier (although I haven't really a
sample to demonstrate this.)

ref. #93743
Suggested by @chrisduerr
2025-07-07 02:14:58 +03:00
Michael Goulet
a40274d6cc Dont resolve instance of root in mir_callgraph_cyclic 2025-07-06 23:01:45 +00:00
bors
ca98d4d4b3 Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJung
Specialize sleep_until implementation for unix (except mac)

related tracking issue: https://github.com/rust-lang/rust/issues/113752
Supersedes https://github.com/rust-lang/rust/pull/118480 for the reasons see: https://github.com/rust-lang/rust/issues/113752#issuecomment-2902594469

Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
2025-07-06 23:00:51 +00:00
Jules Bertholet
8f86c4abec Skip align tests on wasm 2025-07-06 18:10:52 -04:00
Jubilee Young
491c8feaab clippy: migrate BareFn -> FnPtr 2025-07-06 15:03:14 -07:00
Jubilee Young
3c9b98699d rustfmt: migrate BareFn -> FnPtr 2025-07-06 15:03:14 -07:00
Jubilee Young
e47f5657e1 clippy: migrate BareFn -> FnPtr 2025-07-06 15:03:14 -07:00
Jubilee Young
5c8ac15dbd rustdoc: migrate BareFn -> FnPtr 2025-07-06 15:03:14 -07:00