Michael Goulet
ae4a4794e7
Improve upvar analysis for deref of child capture
2025-03-14 22:35:06 +00:00
Yotam Ofek
e6f7ab50c0
Small grammar fix in comment
2025-03-14 21:03:21 +00:00
Yotam Ofek
5da1ba41b3
Fix typo in hir lowering lint diag
2025-03-14 21:03:21 +00:00
Weihang Lo
58e083021e
Update cargo
2025-03-14 16:44:43 -04:00
Esteban Küber
915e44216a
Do not suggest using -Zmacro-backtrace for builtin macros
...
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
2025-03-14 19:50:03 +00:00
Esteban Küber
f0b8e13b59
Do not suggest using -Zmacro-backtrace for builtin macros
...
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
2025-03-14 19:50:03 +00:00
binarycat
409510c088
rustdoc js: add nonnull helper and typecheck src-script.js
2025-03-14 14:39:15 -05:00
Michael Goulet
e54bde6d47
Remove fake borrows of refs that are converted into non-refs in MakeByMoveBody
2025-03-14 19:38:29 +00:00
Eric Holk
c5093ac122
Fix clippy
2025-03-14 12:21:59 -07:00
Eric Holk
635eae2d4f
Teach rustfmt to handle postfix yield
2025-03-14 12:21:59 -07:00
Eric Holk
1c0916a2b3
Preserve yield position during pretty printing
2025-03-14 12:21:59 -07:00
Eric Holk
edf65e735c
Add support for postfix yield expressions
...
We had a discussion[1] today about whether postfix yield would make sense.
It's easy enough to support both in the parser, so we might as well have
both and see how people use it while the feature is experimental.
[1]: https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/postfix-yield/with/505231568
2025-03-14 12:21:58 -07:00
Moritz Hedtke
66c49c73ee
Make Parser::parse_expr_cond public.
...
This allows usage in rustfmt and rustfmt forks.
2025-03-14 19:55:55 +01:00
Marijn Schouten
50c659fcba
Clarify "owned data" in E0515.md
...
This clarifies the explanation of why this is not allowed and also what to do instead.
Fixes 62071
PS There was suggestion of adding a link to the book. I did not yet do that, but if desired that could be added.
2025-03-14 19:28:59 +01:00
John Kåre Alsaker
9a847b1ea5
Add comments
2025-03-14 18:55:02 +01:00
John Kåre Alsaker
453b51a65a
Rename QuerySideEffects to QuerySideEffect
2025-03-14 18:39:27 +01:00
bors
ecade534c6
Auto merge of #138506 - fmease:rollup-ve4h2eq, r=fmease
...
Rollup of 9 pull requests
Successful merges:
- #134720 (Display valid crate types in error message for --crate-type flag)
- #137619 (Provide helpful diagnostics for shebang lookalikes)
- #138353 (remove must_use from <*const T>::expose_provenance)
- #138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`)
- #138469 (remove comment regarding a removed test directive)
- #138477 (Deny impls for `BikeshedGuaranteedNoDrop`)
- #138485 (Rustc dev guide subtree update)
- #138487 (Pass `CI_JOB_DOC_URL` to Docker)
- #138495 (Take a break from reviews)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-14 17:00:17 +00:00
Jakub Beránek
9e3805d6d3
Mirror NetBSD sources
2025-03-14 17:44:07 +01:00
León Orell Valerian Liehr
401b325fb7
Rollup merge of #138495 - ChrisDenton:vacate, r=ChrisDenton
...
Take a break from reviews
2025-03-14 17:26:41 +01:00
León Orell Valerian Liehr
c5e3857492
Rollup merge of #138487 - Kobzol:fix-doc-url-docker, r=marcoieni
...
Pass `CI_JOB_DOC_URL` to Docker
Fix-up for https://github.com/rust-lang/rust/pull/136911 . I always forget to pass new environment variables to Docker images.. 🤦♂️
r? `@marcoieni`
try-job: x86_64-fuchsia
2025-03-14 17:26:39 +01:00
León Orell Valerian Liehr
8eeecb78ca
Rollup merge of #138485 - BoxyUwU:rdg-push, r=jieyouxu
...
Rustc dev guide subtree update
r? `@jieyouxu`
2025-03-14 17:26:37 +01:00
León Orell Valerian Liehr
c42866f89d
Rollup merge of #138477 - compiler-errors:deny-bikeshed-guaranteed-no-drop, r=lcnr
...
Deny impls for `BikeshedGuaranteedNoDrop`
r? lcnr
2025-03-14 17:26:36 +01:00
León Orell Valerian Liehr
1e7441f145
Rollup merge of #138469 - tshepang:patch-6, r=onur-ozkan
...
remove comment regarding a removed test directive
Removed in https://github.com/rust-lang/rust/pull/120265
2025-03-14 17:26:32 +01:00
León Orell Valerian Liehr
40ac358b81
Rollup merge of #138452 - Kobzol:remove-run-check-with-parallel-queries, r=Mark-Simulacrum,onur-ozkan
...
Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`
After https://github.com/rust-lang/rust/pull/132282 , I'm pretty sure that this is simply useless? It just runs check with an empty config, lol.
CC `@onur-ozkan`
r? `@Noratrieb`
2025-03-14 17:26:23 +01:00
León Orell Valerian Liehr
ffa96fe451
Rollup merge of #138353 - RalfJung:expose-provenance-must-use, r=ibraheemdev
...
remove must_use from <*const T>::expose_provenance
`<*mut T>::expose_provenance` does not have this attribute, and in fact the function is documented to have a side-effect, so there are perfectly legitimate use-cases where the return value would be ignored.
2025-03-14 17:26:20 +01:00
León Orell Valerian Liehr
881d237cd9
Rollup merge of #137619 - Pyr0de:issue_137249, r=fmease
...
Provide helpful diagnostics for shebang lookalikes
When `[` is not found after a `#!`, a note will be added to the exisiting error
```
error: expected `[`, found `/`
--> src/main.rs:2:3
|
2 | #!/usr/bin/env -S cargo +nightly -Zscript
| ^ expected `[`
|
= note: the token sequence `#!` here looks like the start of a shebang interpreter directive but it is not
= help: if you meant this to be a shebang interpreter directive, move it to the very start of the file
```
Fixes #137249
r? `@fmease`
2025-03-14 17:26:17 +01:00
León Orell Valerian Liehr
f8842bd752
Rollup merge of #134720 - malezjaa:feat/crate-type-valid-values, r=jieyouxu
...
Display valid crate types in error message for --crate-type flag
This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options.
### Before

### After

I based the implementation on `OutputType::shorthands_display`
Closes #70183
2025-03-14 17:26:13 +01:00
Vadim Petrochenkov
a891139df1
resolve: Avoid some unstable iteration
2025-03-14 18:34:08 +03:00
John Kåre Alsaker
3ca5220114
Represent diagnostic side effects as dep nodes
2025-03-14 16:01:58 +01:00
许杰友 Jieyou Xu (Joe)
34a340e859
Merge pull request #2286 from Kobzol/fix-mcp-link
...
Fix MCP links
2025-03-14 22:56:36 +08:00
Jakub Beránek
2579bb59a4
Fix MCP links
2025-03-14 15:18:58 +01:00
bors
cb50d4d856
Auto merge of #137424 - Ayush1325:uefi-path-node, r=nicholasbishop,cuviper
...
uefi: helpers: Add DevicePathNode abstractions
- UEFI device path is a series of nodes layed out in a contiguous memory region. So it makes sense to use Iterator abstraction for modeling DevicePaths
- This PR has been split off from #135368 for easier review. The allow dead_code will be removed in #135368
cc `@nicholasbishop`
2025-03-14 13:55:32 +00:00
Weihang Lo
08166b5b23
feat(linker): check ARG_MAX on Unix platforms
...
On Unix the limits can be gargantuan anyway so we're pretty
unlikely to hit them, but might still exceed it.
We consult ARG_MAX here to get an estimate.
2025-03-14 09:45:49 -04:00
Weihang Lo
a672448f0d
fix(linker): use arg list estimate on only Windows
...
Though I doubt anyone running rustc outside Unix/Windows
2025-03-14 09:42:18 -04:00
Weihang Lo
79034bd291
fix(linker): prevent overflow when estimating CLI arg list length
...
This also updates the estimate on Windows of the length argument
list to `saturating_add` to avoid overflow.
2025-03-14 09:42:12 -04:00
xizheyin
bc6047a5a7
Use lit span when suggesting suffix lit cast
...
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn >
2025-03-14 20:44:49 +08:00
Chris Denton
db8aa92a47
Take a break from reviews
2025-03-14 12:09:40 +00:00
Tobias Bucher
bdaf23b4cd
Forward stream_position in Arc<File> as well
...
It was missed in #137165 .
2025-03-14 12:36:00 +01:00
Jakub Beránek
2aa68ac429
Remove RUN_CHECK_WITH_PARALLEL_QUERIES
...
It is useless after the removal of the parallel compiler configuration.
2025-03-14 11:12:03 +01:00
Jakub Beránek
7afad54758
Pass CI_JOB_DOC_URL to Docker
2025-03-14 11:10:38 +01:00
Jakub Beránek
bf095f6ece
Ensure that GCC is not built using Clang, as it misbehaves
2025-03-14 09:16:06 +01:00
Jakub Beránek
6ef465ba12
Add clarification about doctests
2025-03-14 09:09:26 +01:00
许杰友 Jieyou Xu (Joe)
3d9bf08289
Merge pull request #2283 from jieyouxu/sync
...
Rustc pull
2025-03-14 16:08:03 +08:00
malezjaa
90bf2b159a
Show valid crate types when the user passes unknown --crate-type value
...
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com >
2025-03-14 15:53:42 +08:00
bors
f7b4354283
Auto merge of #138480 - jhpratt:rollup-y3b8wu5, r=jhpratt
...
Rollup of 16 pull requests
Successful merges:
- #136001 (Overhaul examples for PermissionsExt)
- #136230 (Reword incorrect documentation about SocketAddr having varying layout)
- #136892 (Sync Fuchsia target spec with clang Fuchsia driver)
- #136911 (Add documentation URL to selected jobs)
- #137870 ( Improve HashMap docs for const and static initializers)
- #138179 (Add `src/tools/x` to the main workspace)
- #138389 (use `expect` instead of `allow`)
- #138396 (Enable metrics and verbose tests in PR CI)
- #138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance)
- #138432 (fix: remove the check of lld not supporting `@response-file)`
- #138434 (Visit `PatField` when collecting lint levels)
- #138441 (update error message)
- #138442 (EUV: fix place of deref pattern's interior's scrutinee)
- #138457 (Remove usage of legacy scheme paths on RedoxOS)
- #138461 (Remove an outdated line from a test comment)
- #138466 (Remove myself from libs review)
Failed merges:
- #138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-14 07:02:26 +00:00
xizheyin
aad1db7373
Pass precise HirId when calling check_stability
...
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn >
2025-03-14 14:51:58 +08:00
Tshepang Mbambo
a863f2c6b2
Merge pull request #2285 from KonaeAkira/master
...
Fix grammar and remove redundant info
2025-03-14 08:50:49 +02:00
Jacob Pratt
dea8a15d21
Rollup merge of #138466 - cuviper:libs-review, r=jieyouxu
...
Remove myself from libs review
Trying to re-balance my work by reducing reviews for now.
2025-03-14 01:37:37 -04:00
Jacob Pratt
db022a82a5
Rollup merge of #138461 - WaffleLapkin:indate-comment, r=ehuss
...
Remove an outdated line from a test comment
They *used* to not work, however this was fixed in the PR that added the test. I forgot to remove this line or possibly lost its removal while rebasing.
r? `@ehuss`
2025-03-14 01:37:36 -04:00
Jacob Pratt
f6fcae0015
Rollup merge of #138457 - bjorn3:redox_scheme_paths, r=Noratrieb
...
Remove usage of legacy scheme paths on RedoxOS
The `name:/path` path syntax is getting phased out[^1] in favor of `/scheme/name/path`. Also using `null:` is no longer necessary as `/dev/null` is available on Redox OS too.
[^1]: https://gitlab.redox-os.org/redox-os/rfcs/-/blob/master/text/0006-scheme-path.md
cc `@jackpot51`
2025-03-14 01:37:36 -04:00