about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-09Merge pull request #2271 from rust-lang/tshepang-patch-1许杰友 Jieyou Xu (Joe)-2/+1
fix text
2025-03-08ignore-stage0 and only-stage0 do not existTshepang Mbambo-1/+1
2025-03-08fix textTshepang Mbambo-2/+1
- There is more than just target and stage - There is only 3 stages, so don't mention them specially
2025-03-08link to latest major llvm update prTshepang Mbambo-1/+2
2025-03-08only a few are needed as examplesTshepang Mbambo-6/+0
2025-03-08numbers were not sequential, so stop tryingTshepang Mbambo-7/+7
2025-03-08re-add gnu lib and tweak commentSteven Malis-2/+5
2025-03-08Don't link against advapi32, except on win7.Steven Malis-11/+14
2025-03-08Reduce verbosity of GCC build logJakub Beránek-2/+11
2025-03-08Auto merge of #138224 - onur-ozkan:fix-multiple-candidates, r=jieyouxubors-3/+11
skip `compile::Std` and `compile::Rustc` on `forced_compiler` Fixes https://github.com/rust-lang/rust/issues/138220 Set `download-rustc = true/false` and run `x test tests/ui/meta/no_std-extern-libc.rs --force-rerun` to debug it.
2025-03-08skip `compile::Std` and `compile::Rustc` on `forced_compiler`onur-ozkan-3/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-08Auto merge of #138208 - jhpratt:rollup-hlqyu51, r=jhprattbors-7/+15
Rollup of 5 pull requests Successful merges: - #136642 (Put the alloc unit tests in a separate alloctests package) - #137528 (Windows: Fix error in `fs::rename` on Windows 1607) - #137685 (self-contained linker: conservatively default to `-znostart-stop-gc` on x64 linux) - #137757 (On long spans, trim the middle of them to make them fit in the terminal width) - #138189 (Mention `env` and `option_env` macros in `std::env::var` docs) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-08Generated doc update¨Florian-2/+2
2025-03-08Fix syntax fixup producing invalid punctuation¨Florian-88/+105
Fixes #19206. Fixes #18244.
2025-03-08Update bootstrap to edition 2024Jakub Beránek-24/+51
2025-03-08Remove unneeded parentheses.Markus Reiter-1/+1
2025-03-08Fix formatting.Markus Reiter-34/+7
2025-03-08Use `rustc_abi` code for SIMD layout in rust-analyzerMoulins-39/+7
2025-03-08Remove most manual LayoutData creations and move them to `rustc_abi`Moulins-78/+20
...either as: - methods on LayoutCalculator, for faillible operations; - constructors on LayoutData, for infaillible ones.
2025-03-08bootstrap: Fix stack printing when a step cycle is detectedZalathar-2/+75
2025-03-08consider `explicit_implied_const_bounds`Deadbeef-1/+30
2025-03-08Rollup merge of #137757 - estebank:trim-spans, r=davidtwcoJacob Pratt-1/+0
On long spans, trim the middle of them to make them fit in the terminal width When encountering a single line span that is wider than the terminal, we keep context at the start and end of the span but otherwise remove the code from the middle. This is somewhat independent from whether the left and right margins of the output have been trimmed as well. ``` error[E0308]: mismatched types --> $DIR/long-span.rs:6:15 | LL | ... = [0, 0, 0, 0, ..., 0, 0]; | ^^^^^^^^^^^^^...^^^^^^^ expected `u8`, found `[{integer}; 1681]` ``` Address part of https://github.com/rust-lang/rust/issues/137680 (missing handling of the long suggestion). Fix https://github.com/rust-lang/rust/issues/125581. --- Change the way that underline positions are calculated by delaying using the "visual" column position until the last possible moment, instead using the "file"/byte position in the file, and then calculating visual positioning as late as possible. This should make the underlines more resilient to non-1-width unicode chars. Unfortunately, as part of this change (which fixes some visual bugs) comes with the loss of some eager tab codepoint handling, but the output remains legible despite some minor regression on the "margin trimming" logic. --- `-Zteach` is perma-unstable, barely used, the highlighting logic buggy and the flag being passed around is tech-debt. We should likely remove `-Zteach` in its entirely.
2025-03-08Rollup merge of #136642 - bjorn3:separate_alloctest_crate, r=cuviperJacob Pratt-6/+15
Put the alloc unit tests in a separate alloctests package Same rationale as https://github.com/rust-lang/rust/pull/135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
2025-03-08Auto merge of #138205 - onur-ozkan:fix-build-cycle, r=jieyouxubors-17/+21
handle precompiled compiler more properly Fixes the build cycle problem reported on [#t-infra/bootstrap > Cycle on &#96;aarch64-apple&#96;](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Cycle.20on.20.60aarch64-apple.60/with/504231609).
2025-03-08update doc-comment for `forced_compiler`onur-ozkan-2/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-08handle precompiled compiler more properlyonur-ozkan-15/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-07Rollup merge of #138013 - Kobzol:ci-post-merge-analysis, r=marcoieniJacob Pratt-10/+283
Add post-merge analysis CI workflow This PR adds a post-merge analysis workflow, which was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Reporting.20test.20suite.20statistics.20after.20merge). The workflow currently analyzes test suite results from bootstrap metrics. It downloads metrics for all known jobs in the parent and current (HEAD) commit, compares them and prints a truncated diff. It then posts this diff to the merged PR as a comment. Later I also want to add other statistics to the analysis, e.g. changes in CI/bootstrap step durations. It can be tested locally e.g. using this: ``` cargo run --release --manifest-path src/ci/citool/Cargo.toml post-merge-report 3cb02729ab3c6583a3b1d1845c5e22b674f04b8d fd17deacce374a4185c882795be162e17b557050 ``` This uses a slightly older commit as a parent, to have more results in the diff (normally the diff won't be so large). CC `@jieyouxu` r? `@marcoieni`
2025-03-07Rollup merge of #137957 - Noratrieb:no, r=wesleywiserJacob Pratt-3/+1
Remove i586-pc-windows-msvc See [MCP 840](https://github.com/rust-lang/compiler-team/issues/840). I left a specialized error message that should help users that hit this in the wild (for example, because they use it in their CI). ``` error: Error loading target specification: the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead. Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch. Run `rustc --print target-list` for a list of built-in targets ``` ``@workingjubilee`` ``@calebzulawski`` fyi portable-simd uses this target in CI, if you wanna remove it already before this happens
2025-03-07Rollup merge of #137537 - jieyouxu:daily-rmake, r=KobzolJacob Pratt-1/+16
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) #137532. Follow-up to #137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by #137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at https://github.com/rust-lang/rust/pull/135822.
2025-03-07Update cargoWeihang Lo-1/+0
2025-03-08Specify rust lints for `compiler/` crates via Cargo.Nicholas Nethercote-4/+9
By naming them in `[workspace.lints.rust]` in the top-level `Cargo.toml`, and then making all `compiler/` crates inherit them with `[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`, because they're a bit different.) The advantages of this over the current approach: - It uses a standard Cargo feature, rather than special handling in bootstrap. So, easier to understand, and less likely to get accidentally broken in the future. - It works for proc macro crates. It's a shame it doesn't work for rustc-specific lints, as the comments explain.
2025-03-07Auto merge of #138177 - matthiaskrgr:rollup-y0ikkzz, r=matthiaskrgrbors-10/+54
Rollup of 6 pull requests Successful merges: - #134797 (Ergonomic ref counting) - #137549 (Clean up various LLVM FFI things in codegen_llvm) - #137977 (Reduce `kw::Empty` usage, part 1) - #138042 (Suggest struct or union to add generic that impls trait) - #138141 (tests: fix some typos in comment) - #138150 (Streamline HIR intravisit `visit_id` calls for items) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-08fix: do not apply editorconfig to git commit msgPrajwal S N-0/+3
The `max_line_length` property was set to 100 for all filetypes, which led to git commit messages being wrapped at 100 characters instead of the usual 75. This introduces an exception for the special file used by git to write commit messages. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-08fix(hir): `VariantDef` is `impl HasSource`Prajwal S N-3/+70
A new syntax node `ast::VariantDef` has been introduced to map between the HIR node and the AST. The files have been updated with `cargo test -p xtask`. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-07Use `intrinsics::assume` instead of `hint::assert_unchecked`.Markus Reiter-2/+8
2025-03-07Never inline `lookup_slow`.Markus Reiter-0/+2
2025-03-07Move all alloc integration tests to a new alloctests cratebjorn3-6/+15
2025-03-07Rollup merge of #138150 - nnethercote:streamline-intravisit-visit_id, r=oli-obkMatthias Krüger-1/+1
Streamline HIR intravisit `visit_id` calls for items A small clean up.
2025-03-07Rollup merge of #137977 - nnethercote:less-kw-Empty-1, r=spastorinoMatthias Krüger-4/+4
Reduce `kw::Empty` usage, part 1 This PR fixes some confusing `kw::Empty` usage, fixing a crash test along the way. r? ```@spastorino```
2025-03-07Rollup merge of #134797 - spastorino:ergonomic-ref-counting-1, r=nikomatsakisMatthias Krüger-5/+49
Ergonomic ref counting This is an experimental first version of ergonomic ref counting. This first version implements most of the RFC but doesn't implement any of the optimizations. This was left for following iterations. RFC: https://github.com/rust-lang/rfcs/pull/3680 Tracking issue: https://github.com/rust-lang/rust/issues/132290 Project goal: https://github.com/rust-lang/rust-project-goals/issues/107 r? ```@nikomatsakis```
2025-03-07Remove highlighting of spans on `-Zteach`Esteban Küber-1/+0
`-Zteach` is perma-unstable, barely used, the highlighting logic buggy and the flag being passed around is tech-debt. We should likely remove `-Zteach` in its entirely.
2025-03-07Remove explicit error message when build.rs failsAli Bektas-3/+3
2025-03-07Auto merge of #138148 - onur-ozkan:fix-llvm-bitcode-build, r=jieyouxubors-4/+4
use target compiler on llvm-bitcode-linker The build compiler is already resolved inside the `ToolBuild` step, so we should pass only the target compilers for `Mode::ToolRustc` tools. Fixes https://github.com/rust-lang/rust/issues/138123 r? ghost try-job: dist-powerpc64le-linux
2025-03-07Small code improvement in rustdoc hidden stripperGuillaume Gomez-10/+12
2025-03-07Add helper methods checking for "#[non_exhaustive] that's active"Maja Kądziołka-4/+5
A check for `#[non_exhaustive]` is often done in combination with checking whether the type is local to the crate, in a variety of ways. Create a helper method and standardize on it as the way to check for this.
2025-03-07Log build script error output in `load_cargo::load_workspace_at`Arthur Baars-0/+8
2025-03-07Merge pull request #4223 from Stypox/ctrl-c-backtraceRalf Jung-1/+5
Show interpreter backtrace error on Ctrl+C
2025-03-07Document that `rmake.rs`/`run-make-support` may not use unstable features许杰友 Jieyou Xu (Joe)-0/+4
2025-03-07Temporarily depend on `os_pipe` in `run-make-support` and re-export it许杰友 Jieyou Xu (Joe)-0/+6
For `broken-pipe-no-ice` until std `anonymous_pipe` stabilizes.
2025-03-07Prevent `rmake.rs` from using any nightly/unstable features许杰友 Jieyou Xu (Joe)-0/+5