about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-21Rollup merge of #138694 - LuuuXXX:fix-platform-support-book, r=jieyouxuMatthias Krüger-3/+3
Fix: add ohos target notes
2025-03-21Merge pull request #19405 from ChayimFriedman2/no-expandLukas Wirth-68/+31
minor: Remove unnecessary expansions
2025-03-21Auto merge of #138761 - flip1995:clippy-subtree-update, r=Manishearthbors-1143/+4610
Clippy subtree update r? `@Manishearth` Cargo.lock update is because of the `ui_test` dependency bump in Clippy.
2025-03-21jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`Alona Enraght-Moony-2/+17
2025-03-20Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgrbors-52/+89
Rollup of 8 pull requests Successful merges: - #138435 (Add support for postfix yield expressions) - #138685 (Use `Option<Ident>` for lowered param names.) - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc) - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`) - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`) - #138731 (coverage: Add LLVM plumbing for expansion regions) - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`) - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-20Merge commit '1e5237f4a56ae958af7e5824343eacf737b67083' into ↵Philipp Krones-1144/+4611
clippy-subtree-update
2025-03-20Remove unnecessary expansionsChayim Refael Friedman-68/+31
In the body source map, we record each macro call with the `ExprOrPatId` it resolved to, so to lookup the `ExprId` of some node, we don't need to expand it!
2025-03-20Auto merge of #138515 - petrochenkov:cfgtrace, r=nnethercotebors-1/+5
expand: Leave traces when expanding `cfg_attr` attributes Currently `cfg_trace` just disappears during expansion, but after this PR `#[cfg_attr(some tokens)]` will leave a `#[cfg_attr_trace(some tokens)]` attribute instead of itself in AST after expansion (the new attribute is built-in and inert, its inner tokens are the same as in the original attribute). This trace attribute can then be used by lints or other diagnostics, #133823 has some examples. Tokens in these trace attributes are set to an empty token stream, so the traces are non-existent for proc macros and cannot affect any user-observable behavior. This is also a weakness, because if a proc macro processes some code with the trace attributes, they will be lost, so the traces are best effort rather than precise. The next step is to do the same thing with `cfg` attributes (`#[cfg(TRUE)]` currently remains in both AST and tokens after expanding, it should be replaced with a trace instead). The idea belongs to `@estebank.`
2025-03-20Update `ParamEnv` section for `TypingEnv` changesBoxy-211/+211
2025-03-20interpret memory access hooks: also pass through the Pointer used for the accessRalf Jung-0/+3
2025-03-20Rollup merge of #138735 - jieyouxu:drop-llvm-alias, r=nikicMatthias Krüger-7/+10
Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group Because it's way too easy to confuse LLVM Icebreakers ping group versus trying to ping WG-llvm. And AFAIK, icebreakers-llvm isn't really used in a good while. I also fixed the rustc-dev-guide docs about ``@rustbot` ping llvm` (and changed that to the raw ping group name ``@rustbot` icebreakers-llvm`) because it's very confusing. Previously discussed in [#t-compiler/wg-llvm > Ping group renaming](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Ping.20group.20renaming/with/453005029). FYI `@rust-lang/wg-llvm` FYI `@RalfJung` (since you asked in https://github.com/rust-lang/rust/pull/138120#issuecomment-2710466874) r? `@nikic` (or wg-llvm)
2025-03-20Rollup merge of #138685 - ↵Matthias Krüger-37/+42
nnethercote:use-Option-Ident-for-lowered-param-names, r=compiler-errors Use `Option<Ident>` for lowered param names. Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`. - If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type. - If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs. This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases. Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in #138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing. r? ``@compiler-errors``
2025-03-20Rollup merge of #138435 - eholk:prefix-yield, r=oli-obkMatthias Krüger-8/+37
Add support for postfix yield expressions We've been having a discussion about whether we want postfix yield, or want to stick with prefix yield, or have both. I figured it's easy enough to support both for now and let us play around with them while the feature is still experimental. This PR treats `yield x` and `x.yield` as semantically equivalent. There was a suggestion to make `yield x` have a `()` type (so it only works in coroutines with `Resume = ()`. I think that'd be worth trying, either in a later PR, or before this one merges, depending on people's opinions. #43122
2025-03-20Merge pull request #2199 from sagudev/patch-1Vadim Petrochenkov-3/+3
Fix rib example
2025-03-20update completion filesonur-ozkan-48/+370
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-20add test for `Config::is_running_on_ci`onur-ozkan-0/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-20make it possible to override CI/non-CI environment behaviouronur-ozkan-26/+28
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-20Auto merge of #138695 - nikic:llvm-20.1.1, r=dianqkbors-0/+0
Update to LLVM 20.1.1 Fixes https://github.com/rust-lang/rust/issues/138212. Fixes https://github.com/rust-lang/rust/issues/137909.
2025-03-20Merge pull request #2295 from lolbinarycat/rustdoc-htmldocck许杰友 Jieyou Xu (Joe)-8/+119
add new section on the `rustdoc` test suite
2025-03-20Merge from rustcThe Miri Cronjob Bot-1469/+1840
2025-03-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-20Disambiguate between wg-llvm and icebreakers-llvm in rustc-dev-guideJieyou Xu-7/+10
2025-03-20Auto merge of #137930 - nnethercote:use-Wunused-crate-dependencies, ↵bors-0/+1
r=jieyouxu,Nadrieril Use `Wunused-crate-dependencies` for the compiler An implementation of https://github.com/rust-lang/compiler-team/issues/844. r? `@jieyouxu`
2025-03-19add postfix completion for const blockgvozdvmozgu-20/+86
2025-03-20Use `-Wunused_crate_dependencies` for compiler crates.Nicholas Nethercote-0/+1
It's very useful. There are some false positives involving integration tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a false positive involving `rustc_driver_impl`'s `rustc_randomized_layouts` feature. And I removed a `rustc_span` mention in a doc comment in `rustc_log` because it wasn't integral to the comment but caused a dev-dependency.
2025-03-19Add mipsel maintainerLukas Woodtli-1/+30
2025-03-19use correct code block markersTshepang Mbambo-4/+3
This makes this command pass mdbook test --chapter "Remarks on perma-unstable features"
2025-03-19Rollup merge of #138001 - meithecatte:privately-uninhabited, r=NadrierilMatthias Krüger-4/+5
mir_build: consider privacy when checking for irrefutable patterns This PR fixes #137999. Note that, since this makes the compiler reject code that was previously accepted, it will probably need a crater run. I include a commit that factors out a common code pattern into a helper function, purely because the fact that this was repeated all over the place was bothering me. Let me know if I should split that into a separate PR instead.
2025-03-19Update GCC submoduleJakub Beránek-0/+0
2025-03-19Respect `--src` bootstrap flagJakub Beránek-45/+49
Previously it was simply ignored.
2025-03-19Fix bug in `get_git_modified_files`Jakub Beránek-1/+4
It was ignoring files without extension.
2025-03-19Simplify `get_git_modified_files`Jakub Beránek-10/+5
It only ever returned `Some`, so `Option` was useless in its return type.
2025-03-19Auto merge of #138693 - matthiaskrgr:rollup-ejq8mwp, r=matthiaskrgrbors-49/+59
Rollup of 10 pull requests Successful merges: - #136177 (clarify BufRead::{fill_buf, consume} docs) - #138654 (Remove the regex dependency from coretests) - #138655 (rustc-dev-guide sync) - #138656 (Remove double nesting in post-merge workflow) - #138658 (CI: mirror alpine and centos images to ghcr) - #138659 (coverage: Don't store a body span in `FunctionCoverageInfo`) - #138661 (Revert: Add *_value methods to proc_macro lib) - #138670 (Remove existing AFIDT implementation) - #138674 (Various codegen_llvm cleanups) - #138684 (use then in docs for `fuse` to enhance readability) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-19Use `Option<Ident>` for lowered param names.Nicholas Nethercote-37/+42
Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`. - If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type. - If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs. This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases. Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in #138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing.
2025-03-19Update to LLVM 20.1.1Nikita Popov-0/+0
2025-03-19Auto merge of #138653 - matthiaskrgr:rollup-fwwqmr7, r=matthiaskrgrbors-2/+3
Rollup of 7 pull requests Successful merges: - #136320 (exit: document interaction with C) - #138080 (Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml`) - #138301 (Implement `read_buf` for Hermit) - #138569 (rustdoc-json: Add tests for `#[repr(...)]`) - #138635 (Extract `for_each_immediate_subpat` from THIR pattern visitors) - #138642 (Unvacation myself) - #138644 (Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-19Set linkcheck in `ci.yml`Jakub Beránek-0/+1
2025-03-19Fix: add ohos target notesLuuuXXX-3/+3
2025-03-19Rollup merge of #138661 - RalfJung:revert-rustc-dev-breakage, r=petrochenkovMatthias Krüger-9/+2
Revert: Add *_value methods to proc_macro lib This reverts https://github.com/rust-lang/rust/pull/136355. That PR caused unexpected breakage: - the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others - rustc_lexer can no longer be published to crates.io, which impacts RA See https://github.com/rust-lang/rust/issues/138647 for context. Cc `@GuillaumeGomez` `@Amanieu`
2025-03-19Rollup merge of #138656 - Kobzol:post-merge-unnest, r=marcoieniMatthias Krüger-8/+1
Remove double nesting in post-merge workflow See [this](https://github.com/rust-lang/rust/pull/138630#issuecomment-2732224491) :) Can be tested with: ```bash #!/bin/bash PARENT_COMMIT=493c38ba371929579fe136df26eccd9516347c7a SHA=259fdb521200c9abba547302fc2c826479ef26b2 printf "<details>\n<summary>What is this?</summary>\n" >> output.log printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log printf "</details>\n\n" >> output.log cargo run --release post-merge-report ${PARENT_COMMIT} ${SHA} >> output.log ``` I think that it's better to leave the notice in CI, to avoid generating it in citool, which can also be executed locally. r? `@marcoieni`
2025-03-19Rollup merge of #138655 - Kobzol:rdg-sync, r=jieyouxuMatthias Krüger-32/+56
rustc-dev-guide sync r? `@jieyouxu`
2025-03-19Reject `{true,false}` as revision namesJieyou Xu-8/+35
Because they would imply `--cfg={true,false}` otherwise, and the test writer has to use `cfg(r#true)` and `cfg(r#false)` in the test.
2025-03-19Auto merge of #138690 - jieyouxu:temp-disable-fuchsia, r=Kobzolbors-7/+10
Temporarily disable Fuchsia test job to unblock queue See <https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/fuchsia.20failure/with/506637259> for efforts to fix the test job. This PR temporarily disables the Fuchsia test job to unblock the queue, so that neither the Fuchsia maintainers nor T-infra maintainers should feel pressured to fix the job ASAP. Please feel free to re-enable once the test job is fixed. FYI `@erickt` since you or other Fuchsia maintainers will need to revert this change to merge Fuchsia test job fixes in the future. r? infra-ci
2025-03-19Temporarily disable Fuchsia test job to unblock queueJieyou Xu-7/+10
See <https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/fuchsia.20failure/with/506637259> for efforts to fix the test job.
2025-03-19change test name to sth meaningfulAli Bektas-3/+2
2025-03-19Fix span info for mir::OperandAli Bektas-82/+147
Fixes #19172
2025-03-18Refactor YieldKind so postfix yield must have an expressionEric Holk-8/+8
2025-03-18update filename in linkbinarycat-1/+1
2025-03-18normalize link titlesbinarycat-2/+2
2025-03-18clean up wording/grammar and mention double quotesbinarycat-4/+5