Commit Graph

300570 Commits

Author SHA1 Message Date
Jonathan Brouwer
8e400f97e5 Fix ice for feature-gated cfg attributes applied to the crate
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-15 23:28:15 +02:00
Ibraheem Ahmed
d060859376 add test for global constructors 2025-07-15 17:24:47 -04:00
Ibraheem Ahmed
85c89494d9 add support for global constructors (i.e. life before main) 2025-07-15 17:24:44 -04:00
Cameron Steffen
1120cb2fe5 Add LocalKey<Cell>::update 2025-07-15 16:17:57 -05:00
binarycat
bbb114ef61 ci cleanup: rustdoc-gui-test now installs browser-ui-test
this removes the need for --unsafe-perm in the Dockerfile.
2025-07-15 14:39:53 -05:00
Alona Enraght-Moony
078332fdc8 rustdoc-json: Structured attributes
Implements https://www.github.com/rust-lang/rust/issues/141358.

This has 2 primary benefits:

1. For rustdoc-json consumers, they no longer need to parse strings of
   attributes, but it's there in a structured and normalized way.
2. For rustc contributors, the output of HIR pretty printing is no
   longer a versioned thing in the output. People can work on
   https://github.com/rust-lang/rust/issues/131229 without needing to
   bump `FORMAT_VERSION`.

(Over time, as the attribute refractor continues, I expect we'll add new
things to `rustdoc_json_types::Attribute`. But this can be done
separately to the rustc changes).
2025-07-15 16:52:41 +00:00
Deadbeef
fd48b7b8dd Comment more code and make tests clearer
Co-Authored-By: Ralf Jung <post@ralfj.de>
2025-07-16 00:50:20 +08:00
bit-aloo
306928fc11 update change tracking with warning on removal of fields. 2025-07-15 22:05:00 +05:30
Deadbeef
44b38ca45e format pointer later instead of eagerly converting to string 2025-07-16 00:32:12 +08:00
Deadbeef
3f2dc2bd1a add const_make_global; err for const_allocate ptrs if didn't call
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Oli Scherer <github333195615777966@oli-obk.de>
2025-07-16 00:32:12 +08:00
bit-aloo
76967afd3b remove ccache from llvm 2025-07-15 21:59:59 +05:30
bit-aloo
e7f5bbe743 remove description from rust toml struct 2025-07-15 21:59:59 +05:30
Shoyu Vanilla (Flint)
42758bbbd5 Merge pull request #20178 from ShoyuVanilla/cargo-config-cleanup
chore: Cleanup cargo config queries
2025-07-15 16:13:30 +00:00
Michael Goulet
3634f46fdb Add alias for ArgOutlivesPredicate 2025-07-15 16:02:26 +00:00
Michael Goulet
78fa79e7a6 Add tests, some of them fail... 2025-07-15 16:02:26 +00:00
Michael Goulet
512cf3ae88 Gate things properly 2025-07-15 16:02:26 +00:00
Michael Goulet
e3f643c706 Consider outlives assumptions when proving auto traits for coroutine interiors 2025-07-15 16:02:26 +00:00
Michael Goulet
3e7dfaa510 Deduce outlives obligations from WF of coroutine interior types 2025-07-15 16:02:26 +00:00
Michael Goulet
7976ca2442 Add outlives to CoroutineWitnessTypes 2025-07-15 15:58:08 +00:00
Havard Eidnes
8770e5734e Add 0323pin as target maintainer, and fix link to pkgsrc-wip and explain. 2025-07-15 23:57:33 +08:00
Laurențiu Nicola
0393e061e7 Merge pull request #20243 from lnicola/sync-from-rust
minor: Sync from downstream
2025-07-15 14:52:23 +00:00
bors
3014e79f9c Auto merge of #143877 - xizheyin:143813, r=scottmcm,saethlin
`std::vec`: Add UB check for `set_len`, `from_raw_parts_in`, and etc.

Closes rust-lang/rust#143813

I noticed that `from_parts_in` do the similar things like `from_raw_parts_in`, so I add the UB check in the last commit. If it is not appropriate, I will remove it.

And I fix a typo in the first commit.

r? `@scottmcm`
2025-07-15 14:47:10 +00:00
Laurențiu Nicola
28f822f100 Format and bump rustc crates 2025-07-15 17:41:08 +03:00
Ralf Jung
62aea72e36 Merge pull request #4469 from Patrick-6/add-spinloop-hints
Add std::hint::spin_loop() to tests
2025-07-15 14:28:27 +00:00
Laurențiu Nicola
48f9a7cb3c Merge from rust-lang/rust 2025-07-15 17:27:46 +03:00
Laurențiu Nicola
ec3443f573 Preparing for merge from rust-lang/rust 2025-07-15 17:27:21 +03:00
Nikita Popov
4b421d44e2 Fix handling of SCRIPT_ARG in docker images
Instead of making this a build parameter, pass the SCRIPT as an
environment variable.

To this purpose, normalize on always referring to a script in
`/scripts`.

For i686-gnu-nopt-2 I had to create a separate script, because
Docker seems to be really terrible at command line argument
parsing, so it's not possible to pass an environment variable that
contains whitespace.
2025-07-15 16:23:15 +02:00
Patrick-6
9a76dde4d2 Make spin function naming more consistent 2025-07-15 15:59:51 +02:00
Shoyu Vanilla
a65e2f0e90 Further decrease number of cargo metadata invokes 2025-07-15 22:49:16 +09:00
Shoyu Vanilla
0a037425ca chore: Cleanup cargo config queries 2025-07-15 22:49:16 +09:00
tiif
e331de149f Fix CI 2025-07-15 13:48:30 +00:00
tiif
7dd28181e2 Add tests 2025-07-15 13:48:30 +00:00
tiif
7356ff7517 Implement other logics 2025-07-15 13:48:30 +00:00
tiif
dd067a689a Lint against having both #[unstable_feature_bound] and #[stable] on the same item 2025-07-15 13:48:30 +00:00
tiif
ab29256b96 Make stability attribute not to error when unstable feature bound is in effect 2025-07-15 13:48:30 +00:00
tiif
1e5c7b2877 Add the core logic in old and new solvers 2025-07-15 13:48:30 +00:00
tiif
2586185831 Lower the UnstableFeatureBound predicate to UnstableFeature predicate 2025-07-15 13:48:29 +00:00
tiif
fecd99881d Setup unstable feature bound attribute 2025-07-15 13:48:29 +00:00
David Mládek
d627e252ae make std_detect public dependency of std 2025-07-15 15:44:26 +02:00
David Mládek
8b868fa534 Implement resolver warnings about reexporting private dependencies 2025-07-15 15:44:25 +02:00
David Mládek
4a77a62e56 rustc_resolve: rename check_hidden_glob_reexports to lint_reexports 2025-07-15 15:29:08 +02:00
Ralf Jung
da4006571b Merge pull request #4452 from Stypox/trace-borrow-tracker
Add tracing spans to borrow tracker functions
2025-07-15 13:10:46 +00:00
Stypox
14f47009cc Add InterpCx::fn_abi_of_instance/_fn_ptr with tracing, shadowing FnAbiOf 2025-07-15 15:04:53 +02:00
Bastian Kersting
132a47e723 Correct which exploit mitigations are enabled by default 2025-07-15 12:28:15 +00:00
bors
e27f16a499 Auto merge of #143958 - samueltardieu:rollup-lh1s143, r=samueltardieu
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#142301 (tests: Fix duplicated-path-in-error fail with musl)
 - rust-lang/rust#143630 (Drop `./x suggest`)
 - rust-lang/rust#143736 (Give all bytes of TypeId provenance)
 - rust-lang/rust#143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler)
 - rust-lang/rust#143837 (Adjust `run_make_support::symbols` helpers)
 - rust-lang/rust#143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
 - rust-lang/rust#143905 (Recover and suggest to use `;` to construct array type)
 - rust-lang/rust#143907 (core: make `str::split_at_unchecked()` inline)
 - rust-lang/rust#143910 (Add experimental `backtrace-trace-only` std feature)
 - rust-lang/rust#143927 (Preserve constness in trait objects up to hir ty lowering)
 - rust-lang/rust#143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself)
 - rust-lang/rust#143938 (Update books)
 - rust-lang/rust#143941 (update `cfg_select!` documentation)

Failed merges:

 - rust-lang/rust#143926 (Remove deprecated fields in bootstrap)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-15 11:42:55 +00:00
Stypox
2ee58dc31f Add tracing calls to borrow tracker under the same name
... but the function name is specified in the arguments, see https://github.com/rust-lang/miri/pull/4452#discussion_r2204958019
2025-07-15 13:40:44 +02:00
Stypox
6b51eee9df Add enter_trace_span! that checks #[cfg("tracing")]
Includes a custom syntax shortand to enter_trace_span! with NAME::SUBNAME.

MaybeEnteredTraceSpan is `pub use`d in lib.rs to make it available also in bin/, just in case.
2025-07-15 13:38:42 +02:00
Shoyu Vanilla (Flint)
4faef6f904 Merge pull request #20238 from rust-lang/gat-infer-lifetimes
fix: Infer lifetimes for GATs in expression/pattern position
2025-07-15 11:36:56 +00:00
Samuel Tardieu
010e3ef113 Rollup merge of #143941 - folkertdev:cfg-select-docs, r=traviscross
update `cfg_select!` documentation

tracking issue: https://github.com/rust-lang/rust/issues/115585

After rust-lang/rust#143461, and with an eye on a soon(ish) stabilization, I think the docs need some work.

The existing text read more like a motivation for the feature existing to me, so I've tried to now be a bit more descriptive. Still, suggestions are very welcome.

I also added a test for an empty `select! {}` because it's just the sort of thing that might break.

r? ``@traviscross``
2025-07-15 12:52:44 +02:00
Samuel Tardieu
305befe051 Rollup merge of #143938 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

3 commits in ef1ce8f87a8b18feb1b6a9cf9a4939a79bde6795..b2d1a0821e12a676b496d61891b8e3d374a8e832
2025-07-08 17:24:41 UTC to 2025-07-02 21:30:57 UTC

- Chapter 16 from tech review (rust-lang/book#4438)
- WIP ch 17 edits after tech review (rust-lang/book#4319)
- Chapter 15 from tech review (rust-lang/book#4433)

## rust-embedded/book

1 commits in 41f688a598a5022b749e23d37f3c524f6a0b28e1..fe88fbb68391a465680dd91109f0a151a1676f3e
2025-07-08 18:54:25 UTC to 2025-07-08 18:54:25 UTC

- Clarify usage of #[interrupt] attribute and recommend device crate re… (rust-embedded/book#386)

## rust-lang/nomicon

3 commits in 8b61acfaea822e9ac926190bc8f15791c33336e8..3ff384320598bbe8d8cfe5cb8f18f78a3a3e6b15
2025-07-05 07:34:22 UTC to 2025-07-05 07:13:51 UTC

- Add build script part to FFI chapter for more clear and smooth learn … (rust-lang/nomicon#440)
- Cleanups for tree example of splitting borrows (rust-lang/nomicon#443)
- Handle drop zst (rust-lang/nomicon#425)

## rust-lang/reference

17 commits in e9fc99f107840813916f62e16b3f6d9556e1f2d8..1f45bd41fa6c17b7c048ed6bfe5f168c4311206a
2025-07-11 23:15:51 UTC to 2025-07-01 16:49:33 UTC

- mention an important use for the naked attribute (rust-lang/reference#1929)
- Array expression repeat operands can be const blocks. (rust-lang/reference#1928)
- Document (tuple) struct pattern namespace behavior (rust-lang/reference#1925)
- Replace set of en dashes with set of em dashes (rust-lang/reference#1926)
- Update `should_panic` to use the attribute template (rust-lang/reference#1882)
- const-eval.const-expr.borrows: mention indirect places (rust-lang/reference#1865)
- associated-items.md: remove redundant word (rust-lang/reference#1874)
- introduction.md: replace hard-to-read example (rust-lang/reference#1873)
- typo (rust-lang/reference#1924)
- Update `ignore` to use the attribute template (rust-lang/reference#1881)
- Update `test` to use the attribute template (rust-lang/reference#1880)
- Update `cfg_attr` to use the attribute template (rust-lang/reference#1879)
- Update `cfg` to use the attribute template (rust-lang/reference#1878)
- allow constants to refer to mutable/external memory, but reject such constants as patterns (rust-lang/reference#1859)
- Remove outdated comment about non-copy unions (rust-lang/reference#1872)
- Add a template for documenting attributes (rust-lang/reference#1877)
- Switch enum grammar to use "variant" (rust-lang/reference#1876)

## rust-lang/rust-by-example

1 commits in 288b4e4948add43f387cad35adc7b1c54ca6fe12..e386be5f44af711854207c11fdd61bb576270b04
2025-07-04 23:17:15 UTC to 2025-07-04 23:17:15 UTC

- Update Chinese translations (rust-lang/rust-by-example#1943)
2025-07-15 12:52:44 +02:00