about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-04Make sure to record deps from cached task in new solver on first runMichael Goulet-10/+22
2024-12-04Add failing testMichael Goulet-0/+25
2024-12-04Auto merge of #133799 - DianQK:llvm/19.1.5, r=nikicbors-1/+1
Update LLVM to 19.1.5 Fixes #133276. Fixes #133203. r? nikic or wg-llvm
2024-12-04Auto merge of #133841 - matthiaskrgr:rollup-2snj3hc, r=matthiaskrgrbors-830/+913
Rollup of 6 pull requests Successful merges: - #133651 (Update `NonZero` and `NonNull` to not field-project (per MCP#807)) - #133764 (rustdoc: Rename `set_back_info` to `restore_module_data`.) - #133784 (Fix MutVisitor's default implementations to visit Stmt's and BinOp's spans) - #133798 (stop replacing bivariant args with `'static` when computing closure requirements) - #133804 (Improve code for FileName retrieval in rustdoc) - #133817 (Use `eprintln` instead of `println` in bootstrap/compiletest/tidy) Failed merges: - #133810 (remove unnecessary `eval_verify_bound`) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-04Rollup merge of #133817 - clubby789:bootstrap-eprintln, r=jieyouxuMatthias Krüger-206/+210
Use `eprintln` instead of `println` in bootstrap/compiletest/tidy A big unconditional CTRL-F replace to start with to check if there's anything that CI expects to be on stdout r? `@jieyouxu`
2024-12-04Rollup merge of #133804 - GuillaumeGomez:improve-code, r=notriddleMatthias Krüger-28/+22
Improve code for FileName retrieval in rustdoc Some calls were performed twice (first in `is_real_and_local` and then in the function calling it). Also the `FileName` was matched on a few times too. r? `@notriddle`
2024-12-04Rollup merge of #133798 - lcnr:nested-bodies-opaques, r=compiler-errorsMatthias Krüger-46/+70
stop replacing bivariant args with `'static` when computing closure requirements It is unnecessary, these get constrained when checking that the opaque type is well-formed. It also results in the opaque type no longer being well formed. If you've got `fn foo<'a>() -> impl Sized + 'a` the opaque is `type Opaque<'a, 'aDummy> where 'a: 'aDummy, 'aDummy: 'a` where `'aDummy` is bivariant. If we call `foo::<'b>()` inside of a closure and its return type ends up in a type test, we start out with the WF `Opaque<'b, 'b>`, and then replace the bivariant `'b` with `'static`. `Opaque<'b, 'static>` is no longer well-formed. Given how these type tests are used, I don't think this caused any practical issues. r? types
2024-12-04Rollup merge of #133784 - dtolnay:visitspans, r=compiler-errorsMatthias Krüger-22/+10
Fix MutVisitor's default implementations to visit Stmt's and BinOp's spans The `Stmt` case is a bug introduced almost certainly unintentionally by https://github.com/rust-lang/rust/pull/126993. The code _used_ to visit and mutate `span` correctly, but got changed as follows by that PR. Notice how `span` is **copied** into the output by `|kind| Stmt { id, kind, span }` which happens after the mutation in the correct code (red) and before the mutation in the incorrect code (green). ```diff pub fn noop_flat_map_stmt<T: MutVisitor>( Stmt { kind, mut span, mut id }: Stmt, vis: &mut T, ) -> SmallVec<[Stmt; 1]> { vis.visit_id(&mut id); - vis.visit_span(&mut span); let stmts: SmallVec<_> = noop_flat_map_stmt_kind(kind, vis) .into_iter() .map(|kind| Stmt { id, kind, span }) .collect(); if stmts.len() > 1 { panic!(...); } + vis.visit_span(&mut span); stmts } ```
2024-12-04Rollup merge of #133764 - aDotInTheVoid:rename, r=GuillaumeGomezMatthias Krüger-18/+18
rustdoc: Rename `set_back_info` to `restore_module_data`. Follow-up to #133345, r? `@GuillaumeGomez` Most of the references to `info` got removed as it was clear that `module_data` makes more sense here. Makes it clearer that `save_module_data` and `restore_module_data` are a pair.
2024-12-04Rollup merge of #133651 - scottmcm:nonnull-nonzero-no-field-projection, ↵Matthias Krüger-510/+583
r=oli-obk Update `NonZero` and `NonNull` to not field-project (per MCP#807) https://github.com/rust-lang/compiler-team/issues/807#issuecomment-2506098540 was accepted, so this is the first PR towards moving the library to not using field projections into `[rustc_layout_scalar_valid_range_*]` types. `NonZero` was already using `transmute` nearly everywhere, so there are very few changes to it. `NonNull` needed more changes, but they're mostly simple, changing `.pointer` to `.as_ptr()`. r? libs cc #133324, which will tidy up some of the MIR from this a bit more, but isn't a blocker.
2024-12-04Auto merge of #133825 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 17 commits in 4c39aaff66862cc0da52fe529aa1990bb8bb9a22..05f54fdc34310f458033af8a63ce1d699fae8bf6 2024-11-25 16:36:17 +0000 to 2024-12-03 03:14:12 +0000 - test(pgo): only run on nightly (rust-lang/cargo#14887) - chore: Bump to 0.86.0; update changelog (rust-lang/cargo#14885) - docs(ref): Finish a sentence on rust-versions (rust-lang/cargo#14884) - chore(deps): update rust crate cargo_metadata to 0.19.0 (rust-lang/cargo#14878) - chore(deps): update rust crate gix to 0.68.0 (rust-lang/cargo#14879) - fix: Remove default registry reference in `info` cmd docs (rust-lang/cargo#14880) - test(pgo): determine test runnability at compile time (rust-lang/cargo#14874) - test: `requires` attribute accepts string literals for cmds (rust-lang/cargo#14875) - chore(deps): update msrv (3 versions) to v1.81 (rust-lang/cargo#14871) - chore(deps): update msrv (rust-lang/cargo#14867) - fix(fix): Migrate cargo script manifests across editions (rust-lang/cargo#14864) - feat(toml): Allow adding/removing from cargo scripts (rust-lang/cargo#14857) - Add future-incompat warning against keywords in cfgs and add raw-idents (rust-lang/cargo#14671) - test(build-std): download deps first (rust-lang/cargo#14861) - test(pgo): ensure PGO works (rust-lang/cargo#14859) - git-fetch-with-cli: Set `GIT_DIR` for bare repository compatibility (rust-lang/cargo#14860) - fix(build-std): always link to std when testing proc-macros (rust-lang/cargo#14850)
2024-12-04Auto merge of #133818 - matthiaskrgr:rollup-iav1wq7, r=matthiaskrgrbors-240/+566
Rollup of 7 pull requests Successful merges: - #132937 (a release operation synchronizes with an acquire operation) - #133681 (improve TagEncoding::Niche docs, sanity check, and UB checks) - #133726 (Add `core::arch::breakpoint` and test) - #133768 (Remove `generic_associated_types_extended` feature gate) - #133811 ([AIX] change AIX default codemodel=large) - #133812 (Update wasm-component-ld to 0.5.11) - #133813 (compiletest: explain that UI tests are expected not to compile by default) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03tidy: `println!` -> `eprintln!`clubby789-12/+12
2024-12-03compiletest: `println!` -> `eprintln!`clubby789-54/+54
2024-12-03bootstrap: `println!` -> `eprintln!`clubby789-140/+144
2024-12-03Update cargoWeihang Lo-0/+0
2024-12-03Rename `is_real_and_local` function into `filename_real_and_local`Guillaume Gomez-3/+4
2024-12-03Rollup merge of #133813 - clubby789:ui-pass-note, r=jieyouxuMatthias Krüger-4/+7
compiletest: explain that UI tests are expected not to compile by default ``` error: ui test compiled successfully! ``` is not a very useful message for someone new to the test suite, so change the wording and add a note to explain
2024-12-03Rollup merge of #133812 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-3/+12
Update wasm-component-ld to 0.5.11 This pulls in an update that supports ``@`-files` used to pass arguments to linkers to fix invocations on Windows that are large. Closes #133649
2024-12-03Rollup merge of #133811 - mustartt:change-default-codemodel, r=jieyouxuMatthias Krüger-1/+1
[AIX] change AIX default codemodel=large On AIX, for most libraries, we run out of Table of Contents (TOC) offsets very quickly due to the default 16-bit offset limit. We want the large code model should be used as the default to provide more TOC entries so the end user does not have to specify `-Ccode-model=large` for all their packages. This is even more of an issue with ThinLTO as the ThinLTO globals can very quickly use all available TOC entry. In addition, on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.
2024-12-03Rollup merge of #133768 - compiler-errors:gate, r=lcnr,jackh726Matthias Krüger-124/+300
Remove `generic_associated_types_extended` feature gate This PR retires nightly support for the `generic_associated_types_extended` feature. This feature hasn't received much attention in the last two years or so, and I believe the feature still remains both unsound and ICEy to use. I think that if we were to redesign and reimplement it, we'd want to first figure out how to implement it soundly, but in the mean time I'd prefer to clean this up. r? ``@lcnr`` cc ``@jackh726`` who added this feature gate I think
2024-12-03Rollup merge of #133726 - joshtriplett:breakpoint, r=oli-obkMatthias Krüger-13/+66
Add `core::arch::breakpoint` and test Approved in [ACP 491](https://github.com/rust-lang/libs-team/issues/491).
2024-12-03Rollup merge of #133681 - RalfJung:niches, r=wesleywiserMatthias Krüger-92/+177
improve TagEncoding::Niche docs, sanity check, and UB checks Turns out the `niche_variants` range can actually contain the `untagged_variant`. We should report this as UB in Miri, so this PR implements that. Also rename `partially_check_layout` to `layout_sanity_check` for better consistency with how similar functions are called in other parts of the compiler. Turns out my adjustments to the transmutation logic also fix https://github.com/rust-lang/rust/issues/126267.
2024-12-03Rollup merge of #132937 - xmh0511:master, r=m-ou-seMatthias Krüger-3/+3
a release operation synchronizes with an acquire operation Change: 1. `Calls to park _synchronize-with_ calls to unpark` to `Calls to unpark _synchronize-with_ calls to park` 2. `park synchronizes-with _all_ prior unpark operations` to `_all_ prior unpark operations synchronize-with park`
2024-12-03Update `NonZero` and `NonNull` to not field-project (per MCP807)Scott McMurray-510/+583
2024-12-03compiletest: explain that UI tests are expected not to compile by defaultclubby789-4/+7
2024-12-03Update wasm-component-ld to 0.5.11Alex Crichton-3/+12
This pulls in an update that supports `@`-files used to pass arguments to linkers to fix invocations on Windows that are large. Closes #133649
2024-12-03Auto merge of #133803 - matthiaskrgr:rollup-8ag5ncy, r=matthiaskrgrbors-224/+438
Rollup of 9 pull requests Successful merges: - #132612 (Gate async fn trait bound modifier on `async_trait_bounds`) - #133545 (Lint against Symbol::intern on a string literal) - #133558 (Structurally resolve in `probe_adt`) - #133696 (stabilize const_collections_with_hasher and build_hasher_default_const_new) - #133753 (Reduce false positives on some common cases from if-let-rescope lint) - #133762 (stabilize const_{size,align}_of_val) - #133777 (document -Zrandomize-layout in the unstable book) - #133779 (Use correct `hir_id` for array const arg infers) - #133796 (Update the definition of `borrowing_sub`) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-03change aix default codemodel=largeHenry Jiang-1/+1
2024-12-03Remove generic_associated_types_extended feature gateMichael Goulet-124/+300
2024-12-03Rollup merge of #133796 - TDecking:borrowing-sub, r=tgross35Matthias Krüger-3/+24
Update the definition of `borrowing_sub` Complementary PR to https://github.com/rust-lang/rust/pull/133674, which only updated `carrying_add`.
2024-12-03Rollup merge of #133779 - BoxyUwU:array_const_arg_infer_hir_id, ↵Matthias Krüger-5/+22
r=compiler-errors Use correct `hir_id` for array const arg infers Fixes #133771 `self.next_id()` results in the `DefId` for the const argument, created from the hack introduced by #133468, having no `HirId` associated with it. This then results in an ICE in metadata encoding. Fixing this then results in *another* ICE where `encode_defs` was not skipping encoding `type_of` and other queries for `DefId`s when they correspond to a `ConstArgKind::Infer` node. This only reproduces with a library crate as metadata is not encoded for binaries, and apparently we had 0 tests for `generic_arg_infer` for array lengths in a library crate so this was not caught :< cc #133589 `@voidc` r? `@compiler-errors` `@lcnr`
2024-12-03Rollup merge of #133777 - the8472:document-randomize-layout, r=jieyouxuMatthias Krüger-0/+23
document -Zrandomize-layout in the unstable book tracking issue: #106764 fixes #130462
2024-12-03Rollup merge of #133762 - RalfJung:const-size-of-val, r=workingjubileeMatthias Krüger-11/+8
stabilize const_{size,align}_of_val FCP passed [here](https://github.com/rust-lang/rust/issues/46571#issuecomment-2460285288). Fixes https://github.com/rust-lang/rust/issues/46571.
2024-12-03Rollup merge of #133753 - ↵Matthias Krüger-40/+47
dingxiangfei2009:reduce-false-positive-if-let-rescope, r=jieyouxu Reduce false positives on some common cases from if-let-rescope lint r? `@jieyouxu` We would like to identify a very common case in the ecosystem in which we do not need to apply the lint suggestion for the new Edition 2024 `if let` semantics. In this patch we excluded linting from `if let`s in statements and block tail expressions. In these simple cases, new Edition 2024 drop orders are identical to those of Edition 2021 and prior. However, conservatively we should still lint for the other cases, because [this example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2113df5ce78f161d32a1190faf5c7469) shows that the drop order changes are very pronounced, some of which are even sensitive to runtime data.
2024-12-03Rollup merge of #133696 - RalfJung:const-hashmap, r=cuviperMatthias Krüger-6/+53
stabilize const_collections_with_hasher and build_hasher_default_const_new After a lot of preparatory work, finally we can stabilize creating `HashMap` in const context. :) FCP for const_collections_with_hasher passed in https://github.com/rust-lang/rust/issues/102575. Fixes https://github.com/rust-lang/rust/issues/102575. FCP for build_hasher_default_const_new passed in https://github.com/rust-lang/rust/issues/123197. Fixes https://github.com/rust-lang/rust/issues/123197. Cc `@Amanieu` Release notes: https://github.com/rust-lang/rust/issues/133347
2024-12-03Rollup merge of #133558 - compiler-errors:structurally-resolve-probe-adt, r=lcnrMatthias Krüger-16/+20
Structurally resolve in `probe_adt` fixes #132320 r? lcnr
2024-12-03Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxuMatthias Krüger-37/+94
Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
2024-12-03Rollup merge of #132612 - compiler-errors:async-trait-bounds, r=lcnrMatthias Krüger-106/+147
Gate async fn trait bound modifier on `async_trait_bounds` This PR moves `async Fn()` trait bounds into a new feature gate: `feature(async_trait_bounds)`. The general vibe is that we will most likely stabilize the `feature(async_closure)` *without* the `async Fn()` trait bound modifier, so we need to gate that separately. We're trying to work on the general vision of `async` trait bound modifier general in: https://github.com/rust-lang/rfcs/pull/3710, however that RFC still needs more time for consensus to converge, and we've decided that the value that users get from calling the bound `async Fn()` is *not really* worth blocking landing async closures in general.
2024-12-03closure-requirements: add regression testslcnr-3/+62
2024-12-03Improve code for FileName retrieval in rustdocGuillaume Gomez-28/+21
2024-12-03Auto merge of #133792 - lqd:jemallocup, r=Mark-Simulacrumbors-19/+23
switch `jemalloc-sys` back to `tikv-jemalloc-sys`, and update to 0.6.0 Some context: - we used to use jemalloc bindings from https://github.com/gnzlbg/jemallocator, since #55238 - that crate was abandoned, picked up as a fork in https://github.com/tikv/jemallocator, so we switched to that in #83152. - then they were able to publish to the original `jemalloc-sys` bindings crate, and `jemalloc-sys` and `tikv-jemalloc-sys` became the same thing -- so I switched back to the OG crate in #96790 - they're now having publishing problems again: I've been waiting for https://github.com/tikv/jemallocator/pull/96 for the `jemalloc-sys` 0.6.0 update for a few months, but `tikv-jemalloc-sys` is already updated to 0.6.0. A perf run showed some improvements, so this PR switches back to `tikv-jemalloc-sys` to update to 0.6.0.
2024-12-03Visit Stmt span in MutVisitor::flat_map_stmtDavid Tolnay-14/+8
2024-12-03Visit BinOp span in MutVisitor::visit_exprDavid Tolnay-8/+2
2024-12-03Update the definition of `borrowing_sub`Tobias Decking-3/+24
This ensures that it matches the one in `carrying_add`.
2024-12-03Update LLVM to 19.1.5DianQK-1/+1
2024-12-03small code cleanuplcnr-10/+7
2024-12-03closure requirements: don't replace bivariant opaque argslcnr-30/+0
It is unnecessary, these get constrained when checking that the opaque type is well-formed. It also results in the opaque type no longer being well formed. If you've got `fn foo<'a>() -> impl Sized + 'a` the opaque is `type Opaque<'a, 'aDummy> where 'a: 'aDummy, 'aDummy: 'a` where `'aDummy` is bivariant. If we call `foo::<'b>()` inside of a closure and its return type ends up in a type test, we start out with the WF `Opaque<'b, 'b>`, and then replace the bivariant `'b` with `'static`. `Opaque<'b, 'static>` is no longer well-formed. Given how these type tests are used, I don't think this caused any practical issues.
2024-12-03Auto merge of #104342 - mweber15:add_file_location_to_more_types, r=wesleywiserbors-27/+350
Require `type_map::stub` callers to supply file information This change attaches file information (`DIFile` reference and line number) to struct debug info nodes. Before: ``` ; foo.ll ... !5 = !DIFile(filename: "<unknown>", directory: "") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !5, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "4cb373851db92e732c4cb5651b886dd0") ... ``` After: ``` ; foo.ll ... !3 = !DIFile(filename: "foo.rs", directory: "/home/matt/src/rust98678", checksumkind: CSK_SHA1, checksum: "bcb9f08512c8f3b8181ef4726012bc6807bc9be4") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !3, line: 3, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "9e5968c7af39c148acb253912b7f409f") ... ``` Fixes #98678 r? `@wesleywiser`
2024-12-03update instrumentationlcnr-3/+1