about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-26linker: Fix escaping style for response files on WindowsVadim Petrochenkov-13/+37
If we use a С/С++ compiler as linker, then Posix-style escaping should be used.
2025-02-26`manual_strip`: use existing identifier instead of placeholder (#14188)Alex Macleod-21/+188
When the manually stripped entity receives a name as the first use through a simple `let` statement, this name can be used in the generated `if let Some(…)` expression instead of a placeholder. Fix #14183 changelog: [`manual_strip`]: reuse existing identifier in suggestion when possible
2025-02-26Add `unnecessary_debug_formatting` lintSamuel Moelius-14/+314
Address review comments Fix adjacent code Required now that the lint is pedantic Add inline formatting tests Add note re formatting changes Address `unnecessary_map_or` warnings Address additional review comments Typo Update Clippy version
2025-02-26Fix Windows `Command` search path bugChris Denton-1/+74
2025-02-26Restore usage of io::Errorbjorn3-4/+7
2025-02-26Auto merge of #137354 - FractalFir:intern_with_cap, r=FractalFirbors-24/+33
Change interners to start preallocated with an increased capacity Inspired by https://github.com/rust-lang/rust/issues/137005. Added a `with_capacity` function to `InternedSet`. Changed the `CtxtInterners` to start with `InternedSets` preallocated with a capacity. This *does* increase memory usage at very slightly(by ~1 MB at the start), altough that increase quickly disaperars for larger crates(since they require such capacity anyway). A local perf run indicates this improves compiletimes for small crates(like `ripgrep`), without a negative effect on larger ones.
2025-02-26revert accidental change in get_closest_merge_commitRalf Jung-0/+1
2025-02-26Make -Z unpretty=mir suggest -Z dump-mir as wellMaja Kądziołka-0/+2
2025-02-26Add a test case for #137646DianQK-0/+67
2025-02-26Auto merge of #137036 - jieyouxu:drivers-license, r=Kobzolbors-0/+6
Include version number of libs being built in cargo lib metadata (esp. `librustc_driver*.so`) Previously, on a non-stable channel, it's possible for two builds from different versioned sources (e.g. 1.84.0 vs 1.84.1) to produce a `librustc_driver*.so` with the same filename hashes. This causes problems with side-by-side installs wrt. linker search paths because 1.84.1 rustc bin and 1.84.0 rustc bin may try to link to the "same" `librustc_driver*.so` (same filename hash) but fail because the contents of the so is actually different. We try to mitigate this by including the version number of artifacts being built via `__CARGO_DEFAULT_LIB_METADATA` (kind of an ugly hack, but I don't think cargo has a way for us to tell cargo to use a package version override). Fixes #136701 (mitigates, really). ### Testing Tested manually[^host] by: ```bash $ cat src/version 1.86.0 $ ./x build library # w/ compiler profile, (non-stable) dev channel $ lddtree build/host/stage1/bin/rustc rustc => build/host/stage1/bin/rustc (interpreter => /lib64/ld-linux-x86-64.so.2) librustc_driver-ea1b1b2291881cc4.so => build/host/stage1/bin/../lib/librustc_driver-ea1b1b2291881cc4.so [...] ``` and observing that changing `src/version` to bump a point release causes `librustc_driver*.so` to have a different hash while sources are unmodified otherwise. ```bash $ cat src/version 1.86.1 $ ./x build library # w/ compiler profile, (non-stable) dev channel $ lddtree build/host/stage1/bin/rustc rustc => build/host/stage1/bin/rustc (interpreter => /lib64/ld-linux-x86-64.so.2) librustc_driver-746badadbcb74721.so => build/host/stage1/bin/../lib/librustc_driver-746badadbcb74721.so [...] ``` cc `@clan` `@demize` could you check that if you backport this change against 1.84.{0,1} as reported in #136701, that the produced `rustc` binary works, under the context of the Gentoo build system setup? [^host]: on a `x86_64-unknown-linux-gnu` host, no cross
2025-02-26Update gcc submoduleJakub Beránek-0/+0
To add support for the x87 feature.
2025-02-26Auto merge of #137651 - fmease:rollup-s3s7m6f, r=fmeasebors-119/+487
Rollup of 14 pull requests Successful merges: - #136576 (pass optimization level to llvm-bitcode-linker) - #137154 (Add UTF-8 validation fast paths in `Wtf8Buf`) - #137311 (Enable `f16` for MIPS) - #137320 (fix(rustdoc): Fixed stability version in rustdoc) - #137529 (remove few unused args) - #137544 (tests: Add regression test for derive token invalidation (#81099)) - #137559 (run some tests on emscripten again) - #137601 (ssa/mono: deduplicate `type_has_metadata`) - #137603 (codegen_llvm: avoid `Deref` impls w/ extern type) - #137604 (trait_sel: resolve vars in host effects) - #137609 (Complete the list of resources used in rustdoc output) - #137613 (hir_analysis: skip self type of host effect preds in variances_of) - #137614 (fix doc in library/core/src/pin.rs) - #137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-26Rollup merge of #137622 - jdonszelmann:fix-137589, r=compiler-errorsLeón Orell Valerian Liehr-6/+87
fix attribute-related ICE when parsing macro on the rhs of a name-value attribute r? ``@oli-obk`` Closes: #137589
2025-02-26Rollup merge of #137614 - xizheyin:issue-134874, r=cuviperLeón Orell Valerian Liehr-2/+2
fix doc in library/core/src/pin.rs Fixes #134874
2025-02-26Rollup merge of #137613 - davidtwco:const-traits-variances, r=compiler-errorsLeón Orell Valerian Liehr-0/+25
hir_analysis: skip self type of host effect preds in variances_of Discovered as part of an implementation of rust-lang/rfcs#3729 - w/out this then when introducing const trait bounds: many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this test. r? ``@oli-obk``
2025-02-26Rollup merge of #137609 - ColinPitrat:master, r=GuillaumeGomezLeón Orell Valerian Liehr-0/+21
Complete the list of resources used in rustdoc output The Nanum Barun Gothic Font was missing in the list and should clearly be mentionned. Arguably referencing the Rust logos is not really necessary as the file mentions "third party resources" but it doesn't hurt and should make things clearer for anybody who wants to publish their Rust doc.
2025-02-26Rollup merge of #137604 - davidtwco:host-effect-resolve-vars, r=compiler-errorsLeón Orell Valerian Liehr-0/+38
trait_sel: resolve vars in host effects In the standard library, the `Extend` impl for `Iterator` (specialised with `TrustedLen`) has a parameter which is constrained by a projection predicate. This projection predicate provides a value for an inference variable but - if the default bound is `const Sized` instead of `Sized` - host effect evaluation wasn't resolving variables first. Added a test that doesn't depend on a rust-lang/rfcs#3729 implementation. Adding the extra resolve can the number of errors in some tests when they gain host effect predicates, but this is not unexpected as calls to `resolve_vars_if_possible` can cause more error tainting to happen.
2025-02-26Rollup merge of #137603 - davidtwco:extern-types-no-deref, r=lcnrLeón Orell Valerian Liehr-30/+31
codegen_llvm: avoid `Deref` impls w/ extern type `rustc_codegen_llvm` relied on `Deref` impls where `Deref::Target` was or contained an extern type - in my experimental implementation of rust-lang/rfcs#3729, this isn't possible as the `Target` associated type's `?Sized` bound cannot be relaxed backwards compatibly (unless we come up with some way of doing this). In later pull requests with the rust-lang/rfcs#3729 implementation, breakage like this could only occur for nightly users relying on the `extern_types` feature. Upstreaming this to avoid needing to keep carrying this patch locally, and I think it'll necessarily need to change eventually.
2025-02-26Rollup merge of #137601 - davidtwco:deduplicate-type-has-metadata, ↵León Orell Valerian Liehr-30/+24
r=fmease,bjorn3 ssa/mono: deduplicate `type_has_metadata` The implementation of the `type_has_metadata` function is duplicated in `rustc_codegen_ssa` and `rustc_monomorphize`, so move this to `rustc_middle`.
2025-02-26Rollup merge of #137559 - folkertdev:run-more-emscripten-tests, r=fmeaseLeón Orell Valerian Liehr-21/+9
run some tests on emscripten again these were ignored because of #45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still I believe this is the try-job for emscripten? probably a good idea to run that first. ~~try-job: test-various~~ try-job: dist-various-1
2025-02-26Rollup merge of #137544 - petrochenkov:deritest, r=fmeaseLeón Orell Valerian Liehr-0/+172
tests: Add regression test for derive token invalidation (#81099) Closes https://github.com/rust-lang/rust/issues/81099.
2025-02-26Rollup merge of #137529 - klensy:unused3, r=lcnrLeón Orell Valerian Liehr-24/+9
remove few unused args
2025-02-26Rollup merge of #137320 - tapanprakasht:fix-doc-version-stability, r=notriddleLeón Orell Valerian Liehr-0/+40
fix(rustdoc): Fixed stability version in rustdoc Tries to fix https://github.com/rust-lang/rust/issues/137141 Fixed by adding checks glob exports
2025-02-26Rollup merge of #137311 - martn3:enable-f16-mips, r=tgross35León Orell Valerian Liehr-1/+0
Enable `f16` for MIPS Blocked on https://github.com/rust-lang/compiler-builtins/pull/762 It seems as if `f16` works on MIPS now according to my testing on Rust master with LLVM 20, and I was asked [here](https://github.com/rust-lang/rust/pull/137167#issuecomment-2669387820) to create PRs with my changes. I only tested on the flavour of `mipsel-unknown-linux-gnu` hardware that happens to be available to me, so I can't say anything about other MIPS hardware, but from a casual skimming of the LLVM code ([1], [2]) it seems like `f16` should work on all MIPS hardware. So enable it for all MIPS hardware. [1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370 [2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388 `@rustbot` label +O-MIPS +F-f16_and_f128 +S-blocked Tracking issue for f16: https://github.com/rust-lang/rust/issues/116909 r? `@tgross35`
2025-02-26Rollup merge of #137154 - thaliaarchi:wtf8-fast-paths, r=ChrisDentonLeón Orell Valerian Liehr-3/+27
Add UTF-8 validation fast paths in `Wtf8Buf` This adds two more fast paths for UTF-8 validation in `Wtf8Buf`, making use of the `is_known_utf8` flag added in https://github.com/rust-lang/rust/pull/96869 (Optimize `Wtf8Buf::into_string` for the case where it contains UTF-8). r? `@ChrisDenton`
2025-02-26Rollup merge of #136576 - usamoi:pass-more-llbc, r=fmeaseLeón Orell Valerian Liehr-2/+2
pass optimization level to llvm-bitcode-linker optimization level is not passed to llbc, which should be a mistake
2025-02-26Auto merge of #136921 - Kobzol:gcc-build, r=onur-ozkanbors-62/+55
Build GCC on CI Previously, we have downloaded a specific commit of GCC and prebuilt it inside Docker using the `build-gccjit.sh` script. This PR removes that scripts and uses the bootstrap GCC step. This allows us to use the `src/gcc` submodule for determining which GCC should be built, and it also moves the logic closer to LLVM, which is also built by bootstrap. A few things to note: - The `sccache` option is currently in the `llvm` block, so the GCC build uses `llvm.ccache`, which is a bit weird :) We could either add `gcc.ccache`, or (what I think would be better) to just move `ccache` to the `build` section, as I don't think that it will be necessary to use ccache for LLVM, but not for GCC. - When the GCC codegen backend is built, it needs to depend on a step that first builds GCC. This is currently done in a hacky way. The proper solution is to create a separate step for the GCC codegen backend, but that is a larger change. Let me know what you think. r? `@onur-ozkan` try-job: i686-msvc-1 try-job: x86_64-mingw-1
2025-02-25configuration option to lint `incompatible_msrv` in test codeBryce Berger-1/+87
2025-02-25Auto merge of #137594 - RalfJung:miri-sync, r=RalfJungbors-298/+715
Miri subtree update r? `@ghost` try-job: x86_64-gnu-aux
2025-02-25tests: fix up new test for nocapture -> capture(none) changeAugie Fackler-2/+2
Same motivation as #136287, but for a newly introduced test. Rather than over-constraining here, we just match the sret and accept pretty much all other attributes. @rustbot label llvm-main r? @nikic
2025-02-25Merge pull request #2263 from BoxyUwU/rustc-pull2Boxy-40727/+65781
Rustc pull
2025-02-25Merge from rustcBoxy-40726/+65780
2025-02-25Preparing for merge from rustcBoxy-1/+1
2025-02-25More precisely document `Global::deallocate()`'s safety.Kevin Reid-2/+8
There is a subtlety which "other conditions must be upheld by the caller" does not capture: `GlobalAlloc`/`alloc::dealloc()` require that the provided layout will be *equal*, not just that it "fits", the layout used to allocate. This is always true here due to how `allocate()`, `grow()`, and `shrink()` are implemented (they never return a larger allocation than requested), but that is a non-local property of the implementation, so it should be documented explicitly.
2025-02-26fix #137508Takayuki Maeda-1/+78
rename ui tests check if res is trait def fix typo regression test for #137554
2025-02-25Don't suggest constraining unstable associated typesMichael Goulet-1/+33
2025-02-25Auto merge of #137608 - fmease:rollup-h4siso6, r=fmeasebors-385/+245
Rollup of 8 pull requests Successful merges: - #137370 (adjust_abi: make fallback logic for ABIs a bit easier to read) - #137444 (Improve behavior of `IF_LET_RESCOPE` around temporaries and place expressions) - #137464 (Fix invalid suggestion from type error for derive macro) - #137539 ( Add rustdoc-gui regression test for #137082 ) - #137576 (Don't doc-comment BTreeMap<K, SetValZST, A>) - #137595 (remove `simd_fpow` and `simd_fpowi`) - #137600 (type_ir: remove redundant part of comment) - #137602 (feature: fix typo in attribute description) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-25Merge pull request #2262 from Kobzol/rustc-pull-ci-fixJakub Beránek-1/+1
Fix posting message to Zulip
2025-02-25Fix posting message to ZulipJakub Beránek-1/+1
2025-02-25Fix rebaseEsteban Küber-1/+1
2025-02-25fix #137589Jana Dönszelmann-6/+87
2025-02-25disable float non-determinism for now to be able to complete the syncRalf Jung-36/+47
2025-02-25add doc comment detailEsteban Küber-0/+6
2025-02-25Make E0609 a structured errorEsteban Küber-21/+51
2025-02-25Make E0614 a structured errorEsteban Küber-22/+32
``` error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced --> $DIR/long-E0614.rs:10:5 | LL | *x; | ^^ can't be dereferenced | = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt' = note: consider using `--verbose` to print the full type name to the console ```
2025-02-25Make E0529 a structured errorEsteban Küber-25/+64
2025-02-25Add testsEsteban Küber-0/+67
2025-02-25Teach structured errors to display short `Ty`Esteban Küber-167/+216
Make it so that every structured error annotated with `#[derive(Diagnostic)]` that has a field of type `Ty<'_>`, the printing of that value into a `String` will look at the thread-local storage `TyCtxt` in order to shorten to a length appropriate with the terminal width. When this happen, the resulting error will have a note with the file where the full type name was written to. ``` error[E0618]: expected function, found `((..., ..., ..., ...), ..., ..., ...)`` --> long.rs:7:5 | 6 | fn foo(x: D) { //~ `x` has type `(... | - `x` has type `((..., ..., ..., ...), ..., ..., ...)` 7 | x(); //~ ERROR expected function, found `(... | ^-- | | | call expression requires function | = note: the full name for the type has been written to 'long.long-type-14182675702747116984.txt' = note: consider using `--verbose` to print the full type name to the console ```
2025-02-25Auto merge of #137611 - fmease:rollup-ln673ux, r=fmeasebors-42/+221
Rollup of 6 pull requests Successful merges: - #135480 (Don't require method impls for methods with `Self:Sized` bounds for impls for unsized types) - #137360 (Use `as_chunks` in `analyze_source_file_sse2`) - #137460 (downgrade bootstrap `cc`) - #137515 (Update `compiler-builtins` to 0.1.148) - #137522 (use stage 2 on cargo and clippy tests when possible) - #137597 (Revert accidental cargo submodule update) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-25fix: attr cast for espidfSergio Gasquez-1/+1