Commit Graph

4216 Commits

Author SHA1 Message Date
León Orell Valerian Liehr ceae66b762
Merge pull request #2413 from fmease/glacier-no-crashes-tests-yes
Flesh out sections about crashes tests and update mentions of glacier
2025-05-26 13:55:14 +02:00
León Orell Valerian Liehr 290bacb73e
Flesh out sections about crashes tests and update mentions of glacier 2025-05-26 13:54:49 +02:00
Lukas Wirth 968c5b5b8d
Merge pull request #19792 from A4-Tacks/fix-generate-mut-trait-impl-indent
fix: ide-assists, generate mut trait impl indent
2025-05-26 08:29:22 +00:00
Lukas Wirth d8a1838350
Merge pull request #19819 from Veykril/push-utvzwvwuuvlm
Change import prefix default to be by crate
2025-05-26 08:28:16 +00:00
Lukas Wirth 11e483f9dd
Merge pull request #19785 from A4-Tacks/fix-generate-new-indent
fixes: ide-assists, generate_new indent loses
2025-05-26 07:24:41 +00:00
bors fa0a715b59 Auto merge of #138489 - tmiasko:call-tmps-lifetime, r=workingjubilee
Describe lifetime of call argument temporaries passed indirectly

Fixes #132014.
2025-05-26 01:16:52 +00:00
bors 4a58da1c2e Auto merge of #141086 - a1phyr:spec_advance_by, r=jhpratt
Implement `advance_by` via `try_fold` for `Sized` iterators

When `try_fold` is overriden, it is usually easier for compilers to optimize.

Example difference: https://iter.godbolt.org/z/z8cEfnKro
2025-05-25 11:34:43 +00:00
bors 36dcd2deb6 Auto merge of #141372 - khuey:ir_call_dbg_loc, r=jieyouxu
Use the fn_span when emitting function calls for better debug info.

This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc.

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-msvc-1
try-job: arm-android

r? `@jieyouxu`
2025-05-24 17:48:21 +00:00
许杰友 Jieyou Xu (Joe) 476328a113
Merge pull request #2357 from mejrs/diag
Update `rustc_on_unimplemented` docs
2025-05-25 01:18:36 +08:00
mejrs 0ca84c1313 Update `rustc_on_unimplemented` docs 2025-05-24 19:16:01 +02:00
Jakub Beránek cc3f2ebd73
Merge pull request #2405 from Kobzol/remove-mentions-of-rust-lang-ci
Remove mentions of rust-lang-ci/rust
2025-05-24 14:14:56 +02:00
Tshepang Mbambo b2e388e6cb
Merge pull request #2410 from rust-lang/tshepang-patch-1
typo
2025-05-24 01:42:06 +02:00
Tshepang Mbambo f640f46968
typo 2025-05-24 01:38:43 +02:00
许杰友 Jieyou Xu (Joe) c9202f4197
Merge pull request #2408 from chenyukang/yukang-add-llvm-link 2025-05-24 02:39:10 +08:00
yukang c6f2047a55 Add LLVM link in appendix 2025-05-24 02:30:23 +08:00
nora 525b120d4e
Merge pull request #2404 from lolbinarycat/patch-1
rustdoc.md: reorder list so test suites are not split up
2025-05-23 18:56:05 +02:00
Guillaume Gomez 2254f3c63d
Merge pull request #2406 from jyn514/rustdoc-bodies
document why rustdoc cannot look at function bodies
2025-05-23 17:07:54 +02:00
jyn b9f639a01a document why rustdoc cannot look at function bodies 2025-05-23 10:53:36 -04:00
许杰友 Jieyou Xu (Joe) 8392ed6950
Merge pull request #2403 from rust-lang/tshepang-patch-1 2025-05-23 19:42:58 +08:00
Jakub Beránek 316e392131
Remove mentions of rust-lang-ci/rust
Now that CI has been finally migrated to `rust-lang/rust`.
2025-05-23 13:27:17 +02:00
bors d3a0ed946c Auto merge of #141062 - ChaiTRex:ide_fmt_2024, r=Mark-Simulacrum
Update IDEs to use rustfmt 2024, fix Zed settings

Update IDEs to use rustfmt 2024, fix Zed settings

- Update IDE `rust-analyzer` settings to use 2024 rather than 2021.
- Fix Zed settings by removing `${workspaceFolder}/` from paths.
2025-05-23 11:15:24 +00:00
lolbinarycat 677577571e
rustdoc.md: reorder list so test suites are not split up 2025-05-22 17:31:36 -05:00
Tshepang Mbambo eeafdb1de6 ~? annotation type is special
It does not do any line matching, so it should be separated from the other types.
2025-05-22 19:37:29 +02:00
bors cf161852b5 Auto merge of #141135 - compiler-errors:fast-path-2, r=lcnr
Fast path for processing some obligations in the new solver

Fast path applies to:
- Dyn compatibility predicates
- Region and type outlives predicates
- Trivially sized predicates
2025-05-22 11:39:10 +00:00
bors 1c608fc391 Auto merge of #140527 - GuillaumeGomez:doctest-main-fn, r=notriddle
Emit a warning if the doctest `main` function will not be run

Fixes #140310.

I think we could try to go much further like adding a "link" (ie UI annotations) on the `main` function in the doctest. However that will require some more computation, not sure if it's worth it or not. Can still be done in a follow-up if we want it.

For now, this PR does two things:
1. Pass the `DiagCtxt` to the doctest parser to emit the warning.
2. Correctly generate the `Span` to where the doctest is starting (I hope the way I did it isn't too bad either...).

cc `@fmease`
r? `@notriddle`
2025-05-22 08:40:58 +00:00
Lukas Wirth 91caf479f8
Merge pull request #19842 from Veykril/push-zunlmrzpnrzk
minor: Support `transmute_unchecked` intrinsic for mir-eval
2025-05-22 06:05:35 +00:00
Lukas Wirth dbff2910b9
Merge pull request #19824 from ChayimFriedman2/lints-again
fix: Fix cache problems with lints level
2025-05-22 05:32:13 +00:00
bors 6ab231fbd9 Auto merge of #140386 - oli-obk:match-on-lang-item-kind, r=compiler-errors
Match on lang item kind instead of using an if/else chain

Similar to how the new solver does this. Just noticed while I was adding a new entry to the chain 😆
2025-05-21 13:31:13 +00:00
bors 8ff01a5aa2 Auto merge of #127721 - bvanjoi:issue-124273, r=petrochenkov
collect doc alias as tips during resolution

Close #124273

Collect the symbol in the doc alias attributes and provide a tip when a match is found.

r? `@estebank`
2025-05-21 02:21:28 +00:00
bors aee61ed62d Auto merge of #141305 - matthiaskrgr:rollup-l6nwaht, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #140972 (Add TRACING_ENABLED to Machine and add enter_trace_span!())
 - #141282 (`core_float_math`: Move functions to `math` module)
 - #141288 (Get rid of unnecessary `BufDisplay` abstraction)
 - #141289 (use `Self` alias in self types rather than manually substituting it)
 - #141291 (link tracking issue in explicit-extern-abis.md)
 - #141294 (triagebot: ping me if rustdoc js is modified)
 - #141303 (Fix pagetoc inactive color in rustc book)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-20 23:18:26 +00:00
bors 3bd39c2406 Auto merge of #140757 - dpaoliello:llvm20, r=Kobzol
[win][ci] Update LLVM toolchain used to build LLVM to 20

While trying to get the aarch64-msvc build working correctly (#140136), I needed to update the version of LLVM used to build LLVM in Windows CI runners to 20 (as this has improved support for Arm64 and Arm64EC on Windows).

This catches Windows up to Linux which was updated to 20 by #137189

try-job: `x86_64-apple-*`
try-job: `aarch64-apple`
try-job: `x86_64-msvc-*`
try-job: `i686-msvc-*`
try-job: `x86_64-mingw-*`
2025-05-20 19:29:34 +00:00
Matthias Krüger c375f0bc25
Rollup merge of #141294 - lolbinarycat:triagebot-js-ping, r=aDotInTheVoid
triagebot: ping me if rustdoc js is modified

r? `@aDotInTheVoid`
2025-05-20 20:57:29 +02:00
Matthias Krüger 62d2bbe691
Rollup merge of #141289 - compiler-errors:more-self, r=jhpratt
use `Self` alias in self types rather than manually substituting it

Of the rougly 145 uses of `self: Ty` in the standard library, 5 of them don't use `Self` but instead choose to manually "substitute" the `impl`'s self type into the type.

This leads to weird behavior sometimes (https://github.com/rust-lang/rust/issues/140611#issuecomment-2883761300) -- **to be clear**, none of these usages actually trigger any bugs, but it's possible that they may break in the future (or at least lead to lints), so let's just "fix" them proactively.
2025-05-20 20:57:28 +02:00
Matthias Krüger 16cad94753
Rollup merge of #140972 - Stypox:machine-tracing-flag, r=RalfJung
Add TRACING_ENABLED to Machine and add enter_trace_span!()

This PR adds the necessary infrastructure to make it possible to do tracing calls from within `rustc_const_eval` when running Miri, while making sure they don't impact the performance of normal compiler execution. This is done by adding a `const` boolean to `Machine`, false by default, but that will be set to true in Miri only. The tracing macro `enter_trace_span!()` checks if it is true before doing anything, and since the value of a `const` is known at compile time, if it it false it the whole tracing call should be optimized out.

I will soon open further PRs to add tracing macro calls similar to this one, so that afterwards it will be possible to learn more about Miri's time spent in the various interpretation steps:
```rs
let _guard = enter_trace_span!(M, "eval_statement", "{:?}", stmt);
```

r? `@RalfJung`
2025-05-20 20:57:26 +02:00
bors 8dd9b427c4 Auto merge of #141292 - matthiaskrgr:rollup-9nhhk7k, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #139419 (Error on recursive opaque ty in HIR typeck)
 - #141236 (Resolved issue with mismatched types triggering ICE in certain scenarios)
 - #141253 (Warning added when dependency crate has async drop types, and the feature is disabled)
 - #141269 (rustc-dev-guide subtree update)
 - #141275 (`gather_locals`: only visit guard pattern guards when checking the guard)
 - #141279 (`lower_to_hir` cleanups)
 - #141285 (Add tick to `RePlaceholder` debug output)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-20 15:48:56 +00:00
Boxy 5d24aedfa5
Merge pull request #2400 from smanilov/patch-13
Make it clear we talk about early bound params
2025-05-20 16:36:21 +01:00
Boxy c693842a05
Merge pull request #2398 from smanilov/patch-12
Update links between ty-module and binders
2025-05-20 16:18:22 +01:00
Matthias Krüger 50088cce03
Rollup merge of #141285 - compiler-errors:tick, r=lcnr
Add tick to `RePlaceholder` debug output

Present when debug printing canonical queries

r? lcnr
2025-05-20 16:50:43 +02:00
Matthias Krüger f021be80bb
Rollup merge of #141279 - nnethercote:lower_to_hir, r=compiler-errors
`lower_to_hir` cleanups

Some minor cleanups I made when reading this code.

r? `@Nadrieril`
2025-05-20 16:50:42 +02:00
Matthias Krüger 5b4115f059
Rollup merge of #141275 - dianne:gather-guard-pat-locals-once, r=compiler-errors
`gather_locals`: only visit guard pattern guards when checking the guard

When checking a pattern with guards in it, `GatherLocalsVisitor` will visit both the pattern (when type-checking the let, arm, or param containing it) and local declarations in the guard expression (when checking the guard itself). This keeps it from visiting the guard when visiting the pattern, since otherwise it would gather locals from the guard twice, which would lead to a delayed bug: "evaluated expression more than once".

Tracking issue for guard patterns: #129967
2025-05-20 16:50:41 +02:00
Matthias Krüger e3d1a4e545
Rollup merge of #141269 - tshepang:rdg-push, r=jieyouxu
rustc-dev-guide subtree update

r? `@ghost`
2025-05-20 16:50:41 +02:00
Stan Manilov 731daeed50
Make it clear we talk about early bound params 2025-05-20 16:25:11 +03:00
bors e38407fb02 Auto merge of #140932 - onur-ozkan:llvm-tools, r=Kobzol
update llvm-tools logic for `dist` and `install` steps

First commit aligns `build_steps::compile` and `build_steps::dist` logics for copying llvm-tools, and the second commit adds the correct `should_run` condition for `LlvmTools` step as the previous one was clearly incorrect.

Fixes #140913
2025-05-20 12:44:14 +00:00
León Orell Valerian Liehr e5b1e372e2
Merge pull request #2399 from steffahn/fix-tenv-link
Fix misdirected link for `TypingEnv`
2025-05-20 13:57:50 +02:00
Frank Steffahn 011f51231e Fix misdirected link for `TypingEnv` 2025-05-20 13:26:22 +02:00
Stan Manilov 05a7dc42d4 Update links between ty-module and binders
The order might have been reversed at some point, leading to the two
chapters talking about each other in the wrong order.
2025-05-20 13:52:33 +03:00
nora bcf2bab5dd
Merge pull request #2396 from smanilov/patch-11
Small typo and style fixes in  binders.md
2025-05-20 11:10:30 +02:00
Stan Manilov 3a949427fd
Small typo and style fixes in binders.md
Normally I refrain from nit picking, but this seamed worth it.
2025-05-20 11:41:55 +03:00
Laurențiu Nicola 404670a818
Merge pull request #19826 from lnicola/sync-from-rust
minor: Sync from downstream
2025-05-20 07:15:48 +00:00
Laurențiu Nicola ab41234b8f Merge from rust-lang/rust 2025-05-20 10:01:00 +03:00