1
Fork 0
Commit graph

285446 commits

Author SHA1 Message Date
Guillaume Gomez
2004dacef2 Improve code 2025-03-27 15:22:39 +01:00
Ralf Jung
c845ff0d71 run a few more concurrency tests on aarch64-linux-android 2025-03-27 15:05:37 +01:00
bjorn3
8364234af6
Merge pull request #1566 from rust-lang/arm64_fixes
Fix the half and bytecount crates on arm64
2025-03-27 14:50:23 +01:00
Mara Bos
6c2161a07c Mark test as only-unix. 2025-03-27 14:11:11 +01:00
xizheyin
4648650d89
Improve suggest construct with literal syntax instead of calling
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-27 20:09:37 +08:00
Guillaume Gomez
8327bb6ad3 Add expect to the list of non-crate attributes for doctest generation 2025-03-27 13:01:25 +01:00
Guillaume Gomez
f333ad8656 Improve code comment 2025-03-27 13:00:49 +01:00
Guillaume Gomez
be13105d73 Improve comment and test for generated doctest with code comments 2025-03-27 12:56:08 +01:00
xizheyin
d0353f5c7a
Add ui test for struct construction by calling syntax
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-27 18:50:39 +08:00
Jakub Beránek
a37cef9ee6 Add a note about interpreting job duration changes 2025-03-27 11:38:54 +01:00
Jakub Beránek
4a43675353 Add cache for job metrics 2025-03-27 11:38:54 +01:00
Jakub Beránek
a3bafca14a Add job duration changes stats in post-merge analysis 2025-03-27 11:38:49 +01:00
Guillaume Gomez
123ea25542 Correctly handle line comments in attributes and generate extern crates
outside of wrapping function
2025-03-27 11:18:43 +01:00
Guillaume Gomez
6f7e8d441a Correctly handle fn main in macro 2025-03-27 11:18:43 +01:00
Guillaume Gomez
01fb7c3ac6 Update rustdoc-ui tests 2025-03-27 11:18:43 +01:00
Guillaume Gomez
1f1c630a58 Greatly simplify doctest parsing and information extraction 2025-03-27 11:18:43 +01:00
Jakub Beránek
215c2c2f49 Remove some asserts from the download_ci_llvm bootstrap test 2025-03-27 11:05:49 +01:00
Nicholas Nethercote
5a6ed74a6c Remove kw::Empty uses from src/librustdoc.
Much like the ones in the previous commit.
2025-03-27 19:10:14 +11:00
bors
ecb170afc8 Auto merge of #139012 - Zalathar:rollup-qgt5yfo, r=Zalathar
Rollup of 10 pull requests

Successful merges:

 - #130883 (Add environment variable query)
 - #138624 (Add mipsel maintainer)
 - #138672 (Avoiding calling queries when collecting active queries)
 - #138935 (Update wg-prio triagebot config)
 - #138946 (Un-bury chapters from the chapter list in rustc book)
 - #138964 (Implement lint against using Interner and InferCtxtLike in random compiler crates)
 - #138977 (Don't deaggregate InvocationParent just to reaggregate it again)
 - #138980 (Collect items referenced from var_debug_info)
 - #138985 (Use the correct binder scope for elided lifetimes in assoc consts)
 - #138987 (Always emit `native-static-libs` note, even if it is empty)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-27 07:47:39 +00:00
Mara Bos
3237b5092b Add needs-threads to test. 2025-03-27 08:46:35 +01:00
Stuart Cook
8fa981665c
Rollup merge of #138987 - madsmtm:fix-108825, r=jieyouxu
Always emit `native-static-libs` note, even if it is empty

Fixes https://github.com/rust-lang/rust/issues/108825.

Retry of https://github.com/rust-lang/rust/pull/121216, finally got around to fixing the test, the errors in that PR were because `libcore` uses the `#[link]` attribute on MSVC.

try-job: x86_64-msvc
r? wesleywiser
2025-03-27 15:57:26 +11:00
Stuart Cook
3db0999100
Rollup merge of #138985 - oli-obk:push-mvlqmtmyozro, r=compiler-errors
Use the correct binder scope for elided lifetimes in assoc consts

Beyond diagnostics this has no real effect, and it's also just about a future incompat lint. But it causes ICEs in some refactorings that I'm doing, so trying to get it out of the way
2025-03-27 15:57:25 +11:00
Stuart Cook
c33df2763f
Rollup merge of #138980 - tmiasko:collect-var-debug-info, r=compiler-errors
Collect items referenced from var_debug_info

The collection is limited to full debuginfo builds to match behavior of FunctionCx::compute_per_local_var_debug_info.

Fixes #138942.
2025-03-27 15:57:25 +11:00
Stuart Cook
d26047dcaa
Rollup merge of #138977 - oli-obk:invoc-parent-keep-aggregated, r=compiler-errors
Don't deaggregate InvocationParent just to reaggregate it again

Also makes it easier to add more things to it in the future (which I am doing in some local experiments, so not really a reason to do this just now, but I think this PR stands on its own).
2025-03-27 15:57:24 +11:00
Stuart Cook
cb39217d44
Rollup merge of #138964 - compiler-errors:usage-of-interner, r=lcnr
Implement lint against using Interner and InferCtxtLike in random compiler crates

Often `Interner` defines similar methods to `TyCtxt` (but often simplified due to the simpler API surface of the type system layer for the new solver), which people will either unintentionally or intentionally import and use. Let's discourage that.

r? lcnr
2025-03-27 15:57:24 +11:00
Stuart Cook
bad12175de
Rollup merge of #138946 - Urgau:platform-support-bottom, r=jieyouxu
Un-bury chapters from the chapter list in rustc book

This PR moves the "Platform Support" section to the bottom of rustc chapter book, as to un-burry chapters from the chapter list, which where hidden by the wall of targets.

| Before | After |
|--------|-------|
| ![image](https://github.com/user-attachments/assets/92769307-eadb-4d9d-bdbb-9e610207eb79) | ![image](https://github.com/user-attachments/assets/1834f5c5-a1e6-4674-9be2-1094d1376eda) |

r? ````@jieyouxu````
2025-03-27 15:57:23 +11:00
Stuart Cook
558a6e0f4b
Rollup merge of #138935 - apiraino:update-wg-prio-triagebot-config, r=lqd
Update wg-prio triagebot config

This completes the Zulip channel renaming after https://github.com/rust-lang/compiler-team/issues/848

Just nits: fixed a documentation link and the name of the Zulip channel for prioritization alerts.

r? ````@davidtwco````
2025-03-27 15:57:22 +11:00
Stuart Cook
7853b88423
Rollup merge of #138672 - Zoxc:deferred-queries-in-deadlock-handler, r=oli-obk
Avoiding calling queries when collecting active queries

This PR changes active query collection to no longer call queries. Instead the fields needing queries have their computation delayed to when an cycle error is emitted or when printing the query backtrace in a panic.

This is done by splitting the fields in `QueryStackFrame` needing queries into a new `QueryStackFrameExtra` type. When collecting queries `QueryStackFrame` will contain a closure that can create `QueryStackFrameExtra`, which does make use of queries. Calling `lift` on a `QueryStackFrame` or `CycleError` will convert it to a variant containing `QueryStackFrameExtra` using those closures.

This also only calls queries needed to collect information on a cycle errors, instead of information on all active queries.

Calling queries when collecting active queries is a bit odd. Calling queries should not be done in the deadlock handler at all.

This avoids the out of memory scenario in https://github.com/rust-lang/rust/issues/124901.
2025-03-27 15:57:22 +11:00
Stuart Cook
a07f0d7465
Rollup merge of #138624 - LukasWoodtli:gardena/lw/mipsel-maintainer, r=jieyouxu
Add mipsel maintainer
2025-03-27 15:57:21 +11:00
Stuart Cook
c45986ae61
Rollup merge of #130883 - madsmtm:env-var-query, r=petrochenkov
Add environment variable query

Generally, `rustc` prefers command-line arguments, but in some cases, an environment variable really is the most sensible option. We should make sure that this works properly with the compiler's change-tracking mechanisms, such that changing the relevant environment variable causes a rebuild.

This PR is a first step forwards in doing that.

Part of the work needed to do https://github.com/rust-lang/rust/issues/118204, see https://github.com/rust-lang/rust/pull/129342 for some discussion.

r? ``@petrochenkov``
2025-03-27 15:57:21 +11:00
bors
ea1da921c8 Auto merge of #138915 - compiler-errors:binder-tweak, r=lcnr
Instantiate binder before registering nested obligations for auto/built-in traits

Instead of turning a `Binder<Vec<Ty>>` into a bunch of higher-ranked predicates, instantiate the binder eagerly *once* and turn them into a bunch of non-higher-ranked predicates.

Right now this feels like a noop, but this `enter_forall_and_leak_universe` call would be the singular place where we could instantiate bound lifetime assumptions for coroutine witnesses... if we had them. Thus consolidating the binder instantiation here is useful if we want to fix the coroutine-auto-trait problem.

r? lcnr
2025-03-27 04:35:12 +00:00
Mads Marquart
89348e51e3 Emit better error messages when invoking xcrun
Also allow the SDK path to be non-UTF-8.
2025-03-27 04:38:54 +01:00
Mads Marquart
bd1ef0fad2 Invoke xcrun inside sess.time
It can be a fairly expensive operation when the output is not cached, so
it's nice to get some visibility into the runtime cost.
2025-03-27 03:34:17 +01:00
Mads Marquart
dffb0dbc3e Document how the SDK is found if SDKROOT is not set
I've intentionally used slightly vague language ("roughly"), as we don't
want to guarantee the exact invocation of `xcrun`, just hint that it's
close to that.
2025-03-27 03:34:17 +01:00
Mads Marquart
713becd7da refactor: Move Apple SDK names to rustc_codegen_ssa:🔙:apple 2025-03-27 03:34:11 +01:00
bors
2216f269c5 Auto merge of #139005 - weihanglo:update-cargo, r=weihanglo
Update cargo

10 commits in 307cbfda3119f06600e43cd38283f4a746fe1f8b..a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9
2025-03-20 20:00:39 +0000 to 2025-03-26 18:11:00 +0000
- fix(package): update tracking issue for `--message-format` (rust-lang/cargo#15354)
- docs(contrib): Expand the description of team meetings (rust-lang/cargo#15349)
- feat(package): add unstable `--message-format` flag  (rust-lang/cargo#15311)
- feat(complete): Added completion for `--profile` (rust-lang/cargo#15308)
- Uplift windows Cygwin DLL import libraries (rust-lang/cargo#15193)
- do not pass cdylib link args to test (rust-lang/cargo#15317)
- fix: revert the behavior checking lockfile's VCS status (rust-lang/cargo#15341)
- Temporarily ignore cargo_test_doctest_xcompile_ignores (rust-lang/cargo#15348)
- docs: fix typo in the "Shared cache" section (rust-lang/cargo#15346)
- Fix some issues with future-incompat report generation (rust-lang/cargo#15345)

r? ghost
2025-03-27 01:03:12 +00:00
Josh Stone
af7359ee4f Add release notes for 1.86.0 2025-03-26 15:33:46 -07:00
bors
1644cb0231 Auto merge of #138996 - CAD97:use_cfg_match, r=joboet
Use `cfg_match!` in core

All of these uses of `cfg_if!` do not utilize that `cfg_if!` works with auto-`doc(cfg)`, so no functionality is lost from switching to use `cfg_match!` instead. We *do* lose what rustfmt special support exists for `cfg_if!`, though.

Tracking issue: #115585
2025-03-26 21:43:57 +00:00
Weihang Lo
8f735d0779
Update cargo 2025-03-26 17:32:52 -04:00
Mads Marquart
d1cd621b55 Always emit native-static-libs note, even if it is empty 2025-03-26 21:59:00 +01:00
Jieyou Xu
3d58aec0da
Report compiletest pass mode if forced
This is very non-obvious if it fails in PR CI.
2025-03-27 02:48:53 +08:00
Christopher Durham
2e5a76cd1e Use cfg_match in core 2025-03-26 14:32:35 -04:00
bors
a2e63569fd Auto merge of #138824 - Zoxc:dep-graph-no-prev-map, r=oli-obk
Remove `prev_index_to_index` field from `CurrentDepGraph`

The dep graph currently has 2 ways to map a previous index into a current index. The `prev_index_to_index` map stores the current index equivalent of a previous index. For indices which are marked green, we also store the same information in the `DepNodeColorMap`. We actually only need to known the mapping for green nodes however, so this PR removes `prev_index_to_index` and instead makes use of the `DepNodeColorMap`.

To avoid racing when promoting a node from the previous session, the encoder lock is now used to ensure only one thread encodes the promoted node. This was previously done by the lock in `prev_index_to_index`.

This also changes `nodes_newly_allocated_in_current_session` used to detect duplicate dep nodes to contain both new and previous nodes, which is simpler and can better catch duplicates.

The dep node index encoding used in `DepNodeColorMap` is tweak to avoid subtraction / addition to optimize accessing the current equivalent of a previous index.

r? `@oli-obk`
2025-03-26 17:36:52 +00:00
Mara Bos
2cc3fa32ef Remove ScopeDepth from var_parent.
It was never used.
2025-03-26 17:18:35 +01:00
Mara Bos
0ad0142a5b Don't set cx.parent to None; it seems unnecessary. 2025-03-26 17:18:35 +01:00
Mara Bos
227f93395a Simplify RvalueCandidateType.
There is no difference between the Patternand Borrow cases. Reduce it to
a simple struct.
2025-03-26 17:18:35 +01:00
Mara Bos
1da5e60ac5 Don't record child scopes for patterns.
They are unused.
2025-03-26 17:18:18 +01:00
Maja Kądziołka
908504ec28
ExprUseVisitor: use tracing::instrument as appropriate
Replace debug! calls that output a worse version of what #[instrument]
does.
2025-03-26 17:01:55 +01:00
Maja Kądziołka
f16195382c
ExprUseVisitor: remove leftover mentions of mem-categorization
In #124902, mem-categorization got merged into ExprUseVisitor itself.
Adjust the comments that have become misleading or confusing following
this change.
2025-03-26 16:32:58 +01:00
Maja Kądziołka
aab12930f5
ExprUseVisitor: error -> bug in helper names
A name like "report_error" suggests that the error in question might be
user facing. Use "bug" to make it clear that the error in question will
be an ICE.
2025-03-26 16:32:58 +01:00