about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-02-06improve CI cache docsMarcoIeni-4/+20
2025-02-06Rollup merge of #136630 - jieyouxu:render_tests, r=ChrisDentonMatthias Krüger-0/+3
Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering I don't really know how to test if this unbreaks CI (since #136607 reported that this breaks the CI test rendering *sometimes*). Fixes #136607. r? `@ChrisDenton` (two Windows process tests, but feel free to reroll)
2025-02-06Rollup merge of #136393 - oli-obk:pattern-type-lit-oflo-checks, ↵Matthias Krüger-21/+17
r=compiler-errors Fix accidentally not emitting overflowing literals lints anymore in patterns This was regressed in https://github.com/rust-lang/rust/pull/134228 (not in beta yet). The issue was that previously we nested `hir::Expr` inside `hir::PatKind::Lit`, so it was linted by the expression code. So now I've set it up for visitors to be able to directly visit literals and get all literals
2025-02-06Auto merge of #136471 - safinaskar:parallel, r=SparrowLiibors-102/+104
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` This is continuation of https://github.com/rust-lang/rust/pull/132282 . I'm pretty sure I did everything right. In particular, I searched all occurrences of `Lrc` in submodules and made sure that they don't need replacement. There are other possibilities, through. We can define `enum Lrc<T> { Rc(Rc<T>), Arc(Arc<T>) }`. Or we can make `Lrc` a union and on every clone we can read from special thread-local variable. Or we can add a generic parameter to `Lrc` and, yes, this parameter will be everywhere across all codebase. So, if you think we should take some alternative approach, then don't merge this PR. But if it is decided to stick with `Arc`, then, please, merge. cc "Parallel Rustc Front-end" ( https://github.com/rust-lang/rust/issues/113349 ) r? SparrowLii `@rustbot` label WG-compiler-parallel
2025-02-06Merge pull request #4179 from rayslava/masterRalf Jung-1/+6
allow code to call geteuid()
2025-02-06bootstrap: reset some test suite metadata when starting a new test suite许杰友 Jieyou Xu (Joe)-0/+3
2025-02-06create `initial_rustdoc` field in `Build`onur-ozkan-1/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-06Replace link with a https based oneMartin Liska-1/+1
2025-02-06Merge from rustcThe Miri Cronjob Bot-276/+384
2025-02-06Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-02-06allow code to call geteuid()Slava Barinov-1/+6
2025-02-05Rollup merge of #136587 - GuillaumeGomez:update-gui-tests, r=notriddleJubilee-2/+1
Update browser-ui-test version to `0.20.2` r? `@notriddle`
2025-02-05Rollup merge of #136558 - madsmtm:apple-host-tooling, r=jieyouxuJubilee-0/+12
Document minimum supported host tooling on macOS In particular we support macOS 10.12 (same as for binaries produced by `rustc`) and Xcode 9.2 (the highest Xcode version that runs on macOS 10.12.6). I have this installed on a MacBook Pro from 2013 that sits below my desk, and am occasionally testing it. I am documenting this now because it was unclear in https://github.com/rust-lang/rust/issues/136523. (I'm not inherently against bumping these one day, but that's a separate discussion, let's at least document what we support right now). `@rustbot` label O-macos
2025-02-06ci: upgrade to crosstool-ng 1.27.0WANG Rui-24/+7
2025-02-06Auto merge of #136265 - notriddle:notriddle/clean-up, r=fmeasebors-17/+15
rustdoc: use ThinVec for generic arg parts This reduces the size of both these args, and of path segments, so should measurably help with memory use.
2025-02-05Only apply LTO to rustdoc at stage 2Jakub Beránek-11/+17
It doesn't make much sense at stage 1, and it was broken anyway.
2025-02-05Auto merge of #136572 - jieyouxu:rollup-mtyaisw, r=jieyouxubors-22/+35
Rollup of 12 pull requests Successful merges: - #132547 (cg_gcc: Directly use rustc_abi instead of reexports) - #135572 (tests: Port `split-debuginfo` to rmake.rs) - #135964 (Make cenum_impl_drop_cast a hard error) - #136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - #136304 (Reject negative literals for unsigned or char types in pattern ranges and literals) - #136418 (uefi: process: Add support for command environment variables) - #136449 (std: move network code into `sys`) - #136517 (implement inherent str constructors) - #136536 (Rename and Move some UI tests to more suitable subdirs) - #136537 (Update `compiler-builtins` to 0.1.145) - #136555 (Rename `slice::take...` methods to `split_off...`) - #136567 (Arbitrary self types v2: recursion test) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-05Auto merge of #136253 - notriddle:notriddle/aot-minify, r=GuillaumeGomezbors-32/+35
rustdoc: run css and html minifier at build instead of runtime This way, adding a bunch of comments to the JS files won't make rustdoc slower. Meant to address https://github.com/rust-lang/rust/pull/136161#issuecomment-2622069453
2025-02-05Removed dependency on the field-offset crate.David Venhoek-4/+0
2025-02-05Re-enable "jump to def" feature on rustc docsGuillaume Gomez-1/+2
2025-02-05Update browser-ui-test version to `0.20.2`Guillaume Gomez-2/+1
2025-02-05fixup: fix the compiler path in one more DockerfileAlan Somers-3/+3
2025-02-05Remove the `rustc-perf-wrapper` toolJakub Beránek-234/+0
2025-02-05Update bootstrap completionsJakub Beránek-76/+3428
2025-02-05Update rustc-dev-guideJakub Beránek-3/+1
2025-02-05Build Rustdoc when a Doc benchmark is requestedJakub Beránek-2/+21
2025-02-05Move `x perf` directly into bootstrapJakub Beránek-19/+194
2025-02-05Revert "CI: build FreeBSD artifacts on FreeBSD 13.4"Alan Somers-6/+6
This reverts commit cf34545720986d99712e3b542e8f395360c75095. That commit led to a regression of https://github.com/rust-lang/rust/issues/132185 . So my analysis that the problem lay in FreeBSD 13.2's specific LLVM version was clearly wrong. Revert that commit until we can figure out the real root cause. Fixes #132185
2025-02-05Rename [default|extra]_cflags -> cc_[|un]handled_clagsMads Marquart-18/+24
Makes it explicit that these are in relation to the cc-rs crate.
2025-02-05Uniformly handle HIR literals in visitors and lintsOli Scherer-21/+17
2025-02-05Merge pull request #19099 from Veykril/push-qxylslwltsqyLukas Wirth-22/+29
Use interior mutability for loaded `ProcMacrorv::expanders`
2025-02-05Rollup merge of #136536 - DuskyElf:master, r=jieyouxu许杰友 Jieyou Xu (Joe)-16/+1
Rename and Move some UI tests to more suitable subdirs ## Affected Tests - tests/ui/issues/issue-48838.rs -> tests/ui/enum/closure-in-enum-issue-48838.rs https://github.com/rust-lang/rust/issues/48838 - tests/ui/issues/issue-40350.rs -> tests/ui/enum/enum-inside-enum-issue-40350.rs https://github.com/rust-lang/rust/issues/40350 - tests/ui/issues/issue-41272.rs -> tests/ui/expr/if/if-let-no-match-guards-issue-41272.rs https://github.com/rust-lang/rust/issues/41272 - tests/ui/issues/issue-40408.rs -> tests/ui/lexer/floating-point-0e10-issue-40408.rs https://github.com/rust-lang/rust/issues/40408 - tests/ui/issues/issue-40136.rs -> tests/ui/macros/const-expr-invocations-issue-40136.rs https://github.com/rust-lang/rust/issues/40136 - tests/ui/issues/issue-40845.rs -> tests/ui/macros/macros-in-trait-positions-issue-40845.rs https://github.com/rust-lang/rust/issues/40845 - tests/ui/issues/issue-41213.rs -> tests/ui/match/enum-and-break-in-match-issue-41213.rs https://github.com/rust-lang/rust/issues/41213 - tests/ui/issues/issue-40782.rs -> tests/ui/suggestions/for-loop-missing-in.rs https://github.com/rust-lang/rust/issues/40782 - tests/ui/issues/issue-40827.rs -> tests/ui/trait-bounds/deep-level-Send-bound-check-issue-40827.rs https://github.com/rust-lang/rust/issues/40827 - tests/ui/issues/issue-40610.rs -> tests/ui/typeck/coercion-check-for-addition-issue-40610.rs https://github.com/rust-lang/rust/issues/40610 - tests/ui/issues/issue-40883.rs -> tests/ui/codegen/StackColoring-not-blowup-stack-issue-40883.rs https://github.com/rust-lang/rust/issues/40883 - tests/ui/issues/issue-40861.rs -> tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.rs https://github.com/rust-lang/rust/issues/40861 - tests/ui/issues/issue-41139.rs -> tests/ui/typeck/unsized-rvalue-issue-41139.rs https://github.com/rust-lang/rust/issues/41139 - tests/ui/issues/issue-40749.rs -> tests/ui/wf/range-expr-root-of-constant-issue-40749.rs https://github.com/rust-lang/rust/issues/40749 - tests/ui/issues/issue-40235.rs -> tests/ui/while/while-let-scope-issue-40235.rs https://github.com/rust-lang/rust/issues/40235
2025-02-05Rollup merge of #135572 - jieyouxu:migrate-split-debuginfo, r=davidtwco许杰友 Jieyou Xu (Joe)-6/+34
tests: Port `split-debuginfo` to rmake.rs Part of #121876. This PR supersedes #128754 and is co-authored with `@Oneirical.` ## Known limitations - In general, like the `Makefile` version, this test in its present form is also somewhat funny because for the most part it merely checks for existence/absence of output artifacts but makes no attempt to actually check if the debuginfo is at all usable. ## Changes This PR ports `tests/run-make/split-debuginfo` to rmake.rs. This is an **initial** port, and certainly could be cleaned up and/or enhanced. The original Makefile version had several functional problems. I fixed some of them, but also left some existing issues as-is. 1. The linux/non-linux final branch had a conditional interpolation of `UNSTABLE_OPTIONS := -Zunstable-options`. However, one of the use sites was `-C $(UNSTABLE_OPTIONS) split-debuginfo`. This indicates to me that this run-make test is not run in CI under a non-linux + non-windows + non-darwin environment, because that would've failed as this would expand to `-C -Zunstable-options split-debuginfo`. I fixed this in the rmake.rs version, but I'm not sure if this distinction is worth keeping at all if it's not tested in CI. 2. There are several comments that were discovered to be wrong. I tried to fix them in the rmake.rs version as well. 3. The check for path remapping / lack of path remapping through ```make objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1 ``` is incorrect, because that looks at the single line of that contains `DW_AT_GNU_dwo_name`. This is unfortunately wrong because empirical evidence shows that with `objdump`[^objdump], the check actually needs to look at the attribute value of `DW_AT_comp_dir` on the previous line not `DW_AT_GNU_dwo_name`[^gnu-ext]. Example output of `objdump`: ```text <10> DW_AT_comp_dir : (indirect string, offset: 0xafb48): /home/joe/repos/rust <14> DW_AT_GNU_dwo_name: (indirect string, offset: 0x5d1b0): foo.foo.fc848df41df7a00d-cgu.0.rcgu.dwo ``` In the rmake.rs version I used a 2-line sliding window to check for `DW_AT_comp_dir` and `DW_AT_GNU_dwo_name`, but to look at `DW_AT_comp_dir` specifically. 4. I included a bunch of FIXMEs and ENHANCEMENTs I noticed regarding the test because I didn't want to fix them in this initial port[^enhancement]. 5. The Makefile version didn't test *anything* on Windows (both windows-msvc and windows-gnu). I added some *very* basic and *very* sparse checks for windows-msvc, but I am not willing to spend the effort to expand test coverage to windows-gnu in this initial port. 6. This run-make test is way too big. But I didn't want to expend the effort of breaking this up in this initial port. [^objdump]: the output format differs between `objdump` and `llvm-objdump`, but the same is true for `llvm-objdump` that this is looking at the wrong line. [^gnu-ext]: AFAICT that is a GNU DWARF attribute extension, since it isn't mentioned in DWARFv5 spec [^enhancement]: For instance, the previous path remapping check could in theory be precisely inspected by inspecting `.debug_info` section to look for attribute value of `DW_AT_comp_dir`. But that involves resolving the value of the indirect string, which means you have to: (1) look for offset into string offset table and (2) use *that* offset to find the string itself in the string table. The split part of "split-debuginfo" makes this murky for me, so I wasn't able to replace `llvm-objdump` textual output substring matches with more precise `object` + `gimli` inspections. ## Review advice - I'm sorry for how long the rmake.rs test ended up, but a lot of it is comments and just vertical space due to formatting. If there's any ways to make this test less long / convoluted, advice would be appreciated. - This PR *intentionally* introduces several intermediate commits for the `Makefile`, mostly to illustrate the problems I discovered when looking at the original `Makefile` version. This is intended to highlight the existing problems in the `Makefile` version for the reviewer[^squash]. - There are several intentional non-functional commits: 1. Reindent the `Makefile` to make the platform conditional gating more obvious. 2. Collapse nested if-else branches into an else if construct, which is not supported by GNU Make 3.80. 3. Remove all redundant `-C debuginfo=2` when `-g` is already specified. - This PR is best reviewed commit-by-commit. [^squash]: I intend to squash these intermediate commits away after the reviewer concludes that the current form of the rmake.rs test is acceptable for merge. Before then, I'll keep them to help with review. --- try-job: x86_64-msvc try-job: i686-msvc try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: test-various
2025-02-05Use interior mutability for loaded `ProcMacrorv::expanders`Lukas Wirth-22/+29
2025-02-05Merge pull request #4178 from RalfJung/rustupRalf Jung-242/+403
Rustup
2025-02-05Do not include excluded files even when the client opens themChayim Refael Friedman-121/+217
This require a pretty big modification, because this is a new kind of file: exists - but ignore it.
2025-02-05Merge pull request #18912 from vishruth-thimmaiah/fix_named_struct_assistLukas Wirth-1/+101
fix: upmap ranges in convert_tuple_struct_to_named_struct assist
2025-02-05bump default max parallelism up to 20Ralf Jung-2/+2
2025-02-05Merge from rustcRalf Jung-239/+400
2025-02-05Preparing for merge from rustcRalf Jung-1/+1
2025-02-05Merge pull request #4177 from psumbera/solaris-no-flockRalf Jung-77/+77
Use fcntl locking on Solaris instead of flock which is missing there.
2025-02-05use cfg_matchRalf Jung-82/+77
2025-02-05Fix build on Solaris where is no flock().Petr Sumbera-3/+8
2025-02-05Merge pull request #19097 from Veykril/push-xmkmkwplqnlrLukas Wirth-4/+6
Bump proc-macro2 in xtask
2025-02-05Auto merge of #136564 - fmease:rollup-qcjjcm7, r=fmeasebors-205/+299
Rollup of 8 pull requests Successful merges: - #128045 (#[contracts::requires(...)] + #[contracts::ensures(...)]) - #136263 (rustdoc: clean up a bunch of ts-expected-error declarations in main) - #136375 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 1)) - #136392 (bootstrap: add wrapper macros for `feature = "tracing"`-gated `tracing` macros) - #136396 (rustdoc-json-types: Document that crate name isn't package name.) - #136405 (rustdoc-book: Clean up section on `--output-format`) - #136502 (Mark `std::fmt::from_fn` as `#[must_use]`) - #136509 (Add tests for nested macro_rules edition behavior) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-05Bump proc-macro2 in xtaskLukas Wirth-4/+6
2025-02-05Merge pull request #19094 from ChayimFriedman2/use-bodyLaurențiu Nicola-3/+43
fix: Fix IDE resolution of `use` inside a body
2025-02-05Rollup merge of #136405 - aDotInTheVoid:unstable-doc, r=notriddleLeón Orell Valerian Liehr-5/+11
rustdoc-book: Clean up section on `--output-format` Followup to #134531. Tracking issues #76578 and #134529 I guess. r? ``@GuillaumeGomez``
2025-02-05Rollup merge of #136396 - aDotInTheVoid:crate-isnt-package-whyyy, ↵León Orell Valerian Liehr-0/+7
r=GuillaumeGomez rustdoc-json-types: Document that crate name isn't package name. This wasn't clear from the docs before: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/.E2.9C.94.20Getting.20external.20crate.20names.20as.20defined. CC `@kpreid` r? `@GuillaumeGomez`
2025-02-05Rollup merge of #136392 - jieyouxu:wrap-tracing, r=onur-ozkanLeón Orell Valerian Liehr-51/+99
bootstrap: add wrapper macros for `feature = "tracing"`-gated `tracing` macros Follow-up to https://github.com/rust-lang/rust/pull/136091#discussion_r1930219425. - Add wrapper macros for `error!`, `warn!`, `info!`, `debug!` and `trace!`, which `cfg(feature = "tracing")`-gates the underlying `tracing` macros. They expand to nothing if `"tracing"` feature is not enabled. - This is not done for `span!` or `event!` because they can return span guards, and you can't really wrap that. - This is also not possible for `tracing::instrument` attribute proc-macro unless you use another attribute proc-macro to wrap that. It's not *great*, because `tracing::instrument` and `tracing::{span,event}` can't be wrapped this way. Can test locally with: ```bash $ BOOTSTRAP_TRACING=bootstrap=TRACE ./x check src/bootstrap/ ``` r? ``@onur-ozkan`` (or reroll)