about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-05-28chore: Remove support for `concat_idents!`Trevor Gross-44/+0
`concat_idents!` was deprecated in [1] and will be removed in the near future. rust-analyzer's support is independent of rustc's, so drop RA support now to make syncing easier. [1]: https://github.com/rust-lang/rust/pull/137653
2025-05-28Auto merge of #141668 - tgross35:rollup-03gg6lf, r=tgross35bors-493/+538
Rollup of 8 pull requests Successful merges: - rust-lang/rust#140367 (add `asm_cfg`: `#[cfg(...)]` within `asm!`) - rust-lang/rust#140894 (Make check-cfg diagnostics work in `#[doc(cfg(..))]`) - rust-lang/rust#141252 (gvn: bail out unavoidable non-ssa locals in repeat) - rust-lang/rust#141517 (rustdoc: use descriptive tooltip if doctest is conditionally ignored) - rust-lang/rust#141551 (Make two transmute-related MIR lints into HIR lint) - rust-lang/rust#141591 (ci: fix llvm test coverage) - rust-lang/rust#141647 (Bump master `stage0` compiler) - rust-lang/rust#141659 (Add `Result::map_or_default` and `Option::map_or_default`) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-27Disable libunwind cross-architecture unwindingKhem Raj-2/+1
Building with _LIBUNWIND_IS_NATIVE_ONLY disables code for cross-architecture unwinding it is disabled by default in LLVM [1], replicate the cmake behavior in bootstrap process It also enables some additional code that handles PAC-specific unwind info it helps compiling with the -mbranch-protection=pac or -mbranch-protection=standard flags This fixes build with clang/musl on aarch64 [1] https://github.com/llvm/llvm-project/commit/85624c5de3e831ffa01fdc2d159e3d69c30de08d Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-27Rollup merge of #141647 - jieyouxu:bump-master-stage0, r=pietroalbiniTrevor Gross-460/+460
Bump master `stage0` compiler To include beta backport of revert rust-lang/rust#141024 which should undo linker warnings during bootstrapping of Windows MSVC targets due to rust-lang/rust#140176. Closes rust-lang/rust#141395. r? `@Mark-Simulacrum` (or release)
2025-05-27Rollup merge of #141591 - marcoieni:fix-llvm-test-coverage, r=KobzolTrevor Gross-2/+2
ci: fix llvm test coverage try-job: x86_64-gnu-llvm-19-1 try-job: x86_64-gnu-llvm-20-1
2025-05-27Rollup merge of #141517 - ↵Trevor Gross-21/+30
lolbinarycat:rustdoc-doctest-tooltip-ignore-141092, r=notriddle rustdoc: use descriptive tooltip if doctest is conditionally ignored fixes https://github.com/rust-lang/rust/issues/141092 here's what it looks like now: ![screenshot](https://github.com/user-attachments/assets/71e679fe-8828-439d-a2ce-b9187ad3aeea)
2025-05-27Rollup merge of #140894 - Urgau:check-cfg-rustdoc, r=GuillaumeGomezTrevor Gross-8/+45
Make check-cfg diagnostics work in `#[doc(cfg(..))]` This PR makes it so that the check-cfg `unexpected_cfgs` lint, is correctly emitted in `rustdoc`'s `#[doc(cfg(..))]`. This is achieved by adding a custom trait to `cfg_matches` (the method that emits the lint) which permits `rustc` and `rustdoc` to each have their way to emitting lints (via buffered lints/AST for `rustc` and via `TyCtxt`/HIR for `rustdoc`). The reason this is required is because buffered lints operates on the AST but `rustdoc` uses the HIR and by the time `rustdoc` calls `cfg_matches` we are way passed the point where buffered lints have been drain and emitted. Best reviewed commit by commit. r? `@jieyouxu` (for the compiler part) r? `@GuillaumeGomez` (for the rustdoc part)
2025-05-27Rollup merge of #140367 - folkertdev:asm-cfg, r=nnethercoteTrevor Gross-2/+1
add `asm_cfg`: `#[cfg(...)]` within `asm!` tracking issue: https://github.com/rust-lang/rust/issues/140364 blocked on: https://github.com/rust-lang/rust/pull/140490 This feature was discussed in https://github.com/rust-lang/rust/issues/140279. It allows configuring templates and operands in the assembly macros, for example: ```rust asm!( // or global_asm! or naked_asm! "nop", #[cfg(target_feature = "sse2")] "nop", // ... #[cfg(target_feature = "sse2")] a = const 123, // only used on sse2 ); ``` r? `@tgross35` cc `@traviscross` `@Amanieu` Now builds on https://github.com/rust-lang/rust/pull/140490, which should be merged first.
2025-05-28fix: Skip pattern analysis on type mismatchesShoyu Vanilla-0/+17
2025-05-27Auto merge of #129658 - saethlin:spare-a-crumb, r=jhprattbors-4/+1
Add some track_caller info to precondition panics Currently, when you encounter a precondition check, you'll always get the caller location of the implementation of the precondition checks. But with this PR, you'll be told the location of the invalid call. Which is useful. I thought of this while looking at https://github.com/rust-lang/rust/pull/129642#issuecomment-2311703898. The changes to `tests/ui/const*` happen because the const-eval interpreter skips `#[track_caller]` frames in its backtraces. The perf implications of this are: * Increased debug binary sizes. The caller_location implementation requires that the additional data we want to display here be stored in const allocations, which are deduplicated but not across crates. There is no impact on optimized build sizes. The panic path and the caller location data get optimized out. * The compile time hit to opt-incr-patched bitmaps happens because the patch changes the line number of some function calls with precondition checks, causing us to go from 0 dirty CGUs to 1 dirty CGU. * The other compile time hits are marginal but real, and due to doing a handful of new queries. Adding more useful data isn't completely free.
2025-05-27make link not inlineTshepang Mbambo-1/+3
2025-05-27Rollup merge of #141645 - klensy:fluent-b, r=jieyouxuMatthias Krüger-1/+1
bump fluent-* crates This bumps fluent-* crates, switching to more up-to-date deps, reducing number of old ones. changelogs is pure refactoring: https://github.com/projectfluent/fluent-rs/blob/fluent-bundle%400.16.0/fluent-bundle/CHANGELOG.md https://github.com/projectfluent/fluent-rs/blob/fluent-bundle%400.16.0/fluent-syntax/CHANGELOG.md
2025-05-27Rollup merge of #141495 - compiler-errors:rename-unpack, r=fmeaseMatthias Krüger-36/+36
Rename `{GenericArg,Term}::unpack()` to `kind()` A well-deserved rename IMO. r? `@oli-obk` or `@lcnr` (or anyone) cc `@rust-lang/types,` but I'd be surprised if this is controversial.
2025-05-27bootstrap: Remove `bin_root` from `PATH`Vadim Petrochenkov-1/+0
2025-05-27CI: Add cargo tests to aarch64-apple-darwinEric Huss-1/+3
This adds running of cargo's tests to the aarch64-apple-darwin job. The reason for this is that tier-1 targets are ostensibly supposed to run tests for host tools, but we are not doing that here. We do have fairly good coverage in Cargo's CI, but we don't have much coverage of beta or stable. I think it would be good to have a fallback here.
2025-05-27Merge pull request #2417 from smanilov/patch-16nora-2/+2
Make links in coinduction.md clickable
2025-05-27Avoid including text direction codepoints in lint messagesMatthew Jasper-0/+12
2025-05-27Make links in coinduction.md clickableStan Manilov-2/+2
Although they are clickable in the github preview, they aren't in the actual rendered HTML on https://rustc-dev-guide.rust-lang.org/. This commit fixes that.
2025-05-27Link to description of opaque typesStan Manilov-1/+1
2025-05-27Do not get proc_macro from the sysroot in rustcbjorn3-1/+2
With the stage0 refactor the proc_macro version found in the sysroot will no longer always match the proc_macro version that proc-macros get compiled with by the rustc executable that uses this proc_macro. This will cause problems as soon as the ABI of the bridge gets changed to implement new features or change the way existing features work. To fix this, this commit changes rustc crates to depend directly on the local version of proc_macro which will also be used in the sysroot that rustc will build.
2025-05-27Auto merge of #141644 - compiler-errors:rollup-gl5hize, r=compiler-errorsbors-6/+16
Rollup of 17 pull requests Successful merges: - rust-lang/rust#140591 (Fix malformed suggestion for E0061 when method is a macro token in macro context) - rust-lang/rust#141536 (Improve `ambiguous_wide_pointer_comparisons` lint compare diagnostics) - rust-lang/rust#141552 (Pull out dedicated `cfg_version` syntax test from feature gate test) - rust-lang/rust#141556 (bootstrap: translate Windows paths in a way that works for both Cygwin and MSYS2) - rust-lang/rust#141563 (Remove out-of-date `noop_*` names.) - rust-lang/rust#141568 (dist: make sure llvm-project submodule is present) - rust-lang/rust#141580 (Use more detailed spans in dyn compat errors within bodies) - rust-lang/rust#141582 (intrinsics, ScalarInt: minor cleanup) - rust-lang/rust#141584 (Support `opaque_types_defined_by` for `SyntheticCoroutineBody`) - rust-lang/rust#141587 (Add missing edition directives for async-await tests) - rust-lang/rust#141594 (Add `generic_arg_infer` test) - rust-lang/rust#141596 (rustc book: fix erratic sentence by making it more simple) - rust-lang/rust#141599 (Remove an unnecessary use of `Box::into_inner`.) - rust-lang/rust#141611 (Update mdbook to 0.4.51) - rust-lang/rust#141616 (Remove spastorino from vacations) - rust-lang/rust#141623 (use custom types to clarify arguments to `emit_ptr_va_arg`) - rust-lang/rust#141635 (further dedup `WalkItemKind` for `mut_visit` and `visit`) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-27Update tests with Range parameter to `BTreeMap::extract_if` etc.Sidney Cammeresi-1/+1
2025-05-27rustdoc: linking to a local proc macro no longer warnsbinarycat-8/+28
fixes https://github.com/rust-lang/rust/issues/91274 Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-27distcheck: document what distcheck is intended to exerciseJieyou Xu-1/+20
2025-05-27Bump master `stage0` compilerJieyou Xu-460/+460
To include beta backport of revert <https://github.com/rust-lang/rust/pull/141024> which should undo linker warnings during bootstrapping of Windows MSVC targets due to <https://github.com/rust-lang/rust/pull/140176>.
2025-05-27attempt to fix squash on WindowsRalf Jung-1/+22
2025-05-27Rename unpack to kindMichael Goulet-36/+36
2025-05-27bump fluent-* cratesklensy-1/+1
2025-05-27Rollup merge of #141611 - ehuss:update-mdbook, r=Mark-SimulacrumMichael Goulet-3/+3
Update mdbook to 0.4.51 This fixes a silly regression introduced in 0.4.50 that broke the search hotkey (https://github.com/rust-lang/rust/pull/141457). Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0451
2025-05-27Rollup merge of #141596 - tshepang:patch-2, r=UrgauMichael Goulet-2/+2
rustc book: fix erratic sentence by making it more simple
2025-05-27Rollup merge of #141568 - onur-ozkan:141393-fix, r=KobzolMichael Goulet-0/+8
dist: make sure llvm-project submodule is present Zero-config `x install` fails when bootstrap tries to copy files from the LLVM submodule because it's not properly initialized/handled. This diff handles that. Fixes https://github.com/rust-lang/rust/issues/141393
2025-05-27Rollup merge of #141556 - jeremyd2019:patch-1, r=jieyouxuMichael Goulet-1/+3
bootstrap: translate Windows paths in a way that works for both Cygwin and MSYS2 Cygwin defaults to rooting Windows paths in /cygdrive/X, while MSYS2 configures them to be /X. Regardless of configuration, drives are always accessible as /proc/cygdrive/X, so use that. If there are other shells on Windows that are supported and use /X style paths, perhaps something more complicated needs to be done. r? `@jieyouxu` `@Berrysoft` `@mati865`
2025-05-27Merge pull request #4212 from tiif/setflRalf Jung-8/+262
Support F_GETFL and F_SETFL for fcntl
2025-05-27ci: use ghcr registry for x86_64-gnu-tools jobMarcoIeni-1/+1
2025-05-27Make `Semantics<'db, DB>` support `Semantics<'db, dyn HirDatabase>`, by use ↵Vincent Esche-1/+1
of `DB: ?Sized`
2025-05-27Support F_GETFL and F_SETFL for fcntltiif-8/+262
2025-05-27move asm parsing code into `rustc_parse`Folkert de Vries-2/+1
2025-05-27pacify clippyRalf Jung-3/+1
2025-05-27fmtThe Miri Cronjob Bot-2/+8
2025-05-27Merge from rustcThe Miri Cronjob Bot-288/+516
2025-05-27Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-05-27Fix inference of `AsyncFnX` return typeChayim Refael Friedman-11/+81
2025-05-27Reduce `P<T>` to a typedef of `Box<T>`.Nicholas Nethercote-3/+3
Keep the `P` constructor function for now, to minimize immediate churn. All the `into_inner` calls are removed, which is nice.
2025-05-27Streamline `visibility_print_with_space`.Nicholas Nethercote-41/+37
Moving the visibility stuff into the `from_fn` avoids the `Cow` and makes the code a little shorter and simpler.
2025-05-27Streamline `TypeAliasPart::get`.Nicholas Nethercote-17/+16
- `ret` only ever gets at most one entry, so it can be an `Option` instead of a `Vec`. - Which means we can use `filter_map` instead of `flat_map`. - Move `trait_` next to the `ret` assignment, which can only happen once. - No need for `impls` to be a `Vec`, it can remain an iterator. - Avoid `Result` when collecting `impls`.
2025-05-26Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hirChayim Refael Friedman-29/+74
fix: Fix IDE resolution of item macros
2025-05-26ci: move tests from x86_64-gnu-llvm-19 job to aarch64MarcoIeni-3/+71
2025-05-26diagnostic translations work is on pauseTshepang Mbambo-1/+0
2025-05-26Remove rustdoc askama migration from getting startedAlona Enraght-Moony-1/+0
This effort is blocked, so pointing new contributors here would be setting them up for failure. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/about.3A.20status.20of.20askama.20migration/with/497389045
2025-05-26rustdoc: use custom `CfgMatchesLintEmitter` to make check-cfg workUrgau-8/+45