about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-05-04Auto merge of #140549 - BoxyUwU:proper_const_norm, r=lcnrbors-347/+474
Set groundwork for proper const normalization r? lcnr Updates a lot of our normalization/alias infrastructure to be setup to handle mgca aliases and normalization once const items are represented more like aliases than bodies. Inherent associated consts are still super busted, I didn't update the assertions that IACs the right arg setup because that winds up being somewhat involved to do *before* proper support for normalizing const aliases is implemented. I dont *intend* for this to have any effect on stable. We continue normalizing via ctfe on stable and the codepaths in `project` for consts should only be reachable with mgca or ace.
2025-05-03Auto merge of #140535 - dtolnay:hashbrown, r=tgross35bors-2/+2
Update hashbrown dependency to unblock ExtractIf improvements Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3 Relevant to me, this release includes https://github.com/rust-lang/hashbrown/pull/616 which unblocks https://github.com/rust-lang/rust/pull/139764.
2025-05-03Auto merge of #140502 - nikic:llvm-20.1.4, r=dianqkbors-0/+0
Update to LLVM 20.1.4 Fixes https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Why.20is.20the.20compiler.20failing.20on.20below.20code.3F.
2025-05-03Auto merge of #140613 - matthiaskrgr:rollup-yag6z7w, r=matthiaskrgrbors-488/+502
Rollup of 7 pull requests Successful merges: - #138712 (resolve: Support imports of associated types and glob imports from traits) - #140395 (organize and extend forbidden target feature tests) - #140576 (Remove fragile equal-pointers-unequal tests.) - #140582 (Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist`) - #140595 (doc(std): fix typo lchown -> lchmod) - #140597 (zkvm: remove schmerik as target maintainer) - #140604 (yet another small borrowck cleanup ) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-03Rollup merge of #140604 - lcnr:revealing-use-prep, r=compiler-errorsMatthias Krüger-30/+39
yet another small borrowck cleanup The last borrowck changes from #139587 which can be reviewed entirely separately. r? `@compiler-errors`
2025-05-03Rollup merge of #140597 - SchmErik:rm-schmerik, r=UrgauMatthias Krüger-1/+0
zkvm: remove schmerik as target maintainer I am no longer actively working on this target so I would like to be dropped from this list.
2025-05-03Rollup merge of #140595 - lolbinarycat:std-set_permissions-typo, r=cuviperMatthias Krüger-1/+1
doc(std): fix typo lchown -> lchmod chown is irrelevant here, as this function does not affect file ownership. chmod is the correct function to reference here.
2025-05-03Rollup merge of #140582 - GuillaumeGomez:update-sysinfo, r=KobzolMatthias Krüger-84/+166
Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist` This release is mostly bugfixes and code improvements.
2025-05-03Rollup merge of #140576 - m-ou-se:fragile-tests, r=compiler-errorsMatthias Krüger-201/+0
Remove fragile equal-pointers-unequal tests. Same as https://github.com/rust-lang/rust/pull/139176 --- These tests were added in #127003 These tests stop working when I change implementation details of format_args!(). These tests shouldn't rely on such implementation details. Do these tests test anything that isn't already covered by other tests? If so, they should be expressed in a less fragile way that doesn't rely on internal details of format_args!(). cc `@GrigorenkoPV,` author of these tests.
2025-05-03Rollup merge of #140395 - RalfJung:target-feature-tests, r=petrochenkovMatthias Krüger-58/+128
organize and extend forbidden target feature tests In particular this adds some loongarch tests for https://github.com/rust-lang/rust/pull/135015, Cc `@heiher` Seems like the tests change so much git does not detect the renames; a commit-by-commit review should help. try-job: `x86_64-gnu-llvm-20-*`
2025-05-03Rollup merge of #138712 - petrochenkov:impasst, r=fmeaseMatthias Krüger-113/+168
resolve: Support imports of associated types and glob imports from traits Follow up to https://github.com/rust-lang/rust/pull/134754, part of https://github.com/rust-lang/rust/issues/134691. This PR also closes https://github.com/rust-lang/rust/issues/138711 now. Prohibiting `use Trait::AssocType;` at name resolution stage doesn't make sense, the name itself is perfectly resolveable. It's a type checker's problem that the necessary generic args are not passed when the imported `AssocType` is used, so an error should be reported there. And since we can import associated trait items now, glob imports from traits can also be allowed.
2025-05-03Auto merge of #140464 - oli-obk:successors-mut-perf, r=petrochenkovbors-76/+61
Use a closure instead of three chained iterators Fixes the perf regression from #123948 That PR had chained a third option to the iterator which apparently didn't optimize well
2025-05-03Auto merge of #140608 - matthiaskrgr:rollup-twv6muy, r=matthiaskrgrbors-167/+316
Rollup of 8 pull requests Successful merges: - #139343 (Change signature of File::try_lock and File::try_lock_shared) - #140505 (linker: Quote symbol names in .def files) - #140534 (PassWrapper: adapt for llvm/llvm-project@f137c3d592e96330e450a8fd63ef…) - #140546 (Remove backtrace dep from anyhow in features status dump tool) - #140548 (Emit user type annotations for free consts in pattern position) - #140564 (Use present indicative tense in std::io::pipe() API docs) - #140568 (Add regression test for #140545) - #140606 (Improve hir pretty printing) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-03Rollup merge of #140606 - nnethercote:hir-pp, r=dtolnayMatthias Krüger-95/+95
Improve hir pretty printing It's currently pretty bad, so a few small improvements can make a big difference. r? `@dtolnay`
2025-05-03Rollup merge of #140568 - moxian:reg-140545, r=compiler-errorsMatthias Krüger-0/+29
Add regression test for #140545 Closes #140545 I am not very knowledgable about the typesystem internals, so I couldn't come up with a good name for the test. But I'm happy to move it to a more appropriate place if there is one (`tests/ui/impl-trait/non-defining-uses` maybe?) r? types (or reroll as appropriate if this is not actually a T-types issue; i'm clueless)
2025-05-03Rollup merge of #140564 - ↵Matthias Krüger-3/+3
ebkalderon:use-present-indicative-in-std-io-pipe-docs, r=tgross35 Use present indicative tense in std::io::pipe() API docs The inline documentation for all other free functions in the `std::io` module use the phrase "creates a" instead of "create a", except for the currently nightly-only `std::io::pipe()` function. This commit updates the text to align with the predominant wording in the `std::io` module. I recognize this PR is quite a minuscule nitpick, so feel free to ignore and close if you disagree and/or there are bigger fish to fry. Thanks in advance! :smile: Relates to https://github.com/rust-lang/rust/issues/127154.
2025-05-03Rollup merge of #140548 - BoxyUwU:gci_patterns_user_ty_annotation, ↵Matthias Krüger-2/+26
r=compiler-errors Emit user type annotations for free consts in pattern position This previously wasnt done because free consts couldn't have any generic parameters that need to be preserved for borrowck. This is no longer the case with `feature(generic_const_items)` r? fmease
2025-05-03Rollup merge of #140546 - LegNeato:anyhowbacktrace, r=jieyouxuMatthias Krüger-4/+1
Remove backtrace dep from anyhow in features status dump tool According to `anyhow`'s Cargo.toml: > On compilers older than 1.65, features=["backtrace"] may be used to enable > backtraces via the `backtrace` crate. This feature has no effect on 1.65+ > besides bringing in an unused dependency, as `std::backtrace` is always > preferred. So this is just bringing in an unused dependency.
2025-05-03Rollup merge of #140534 - erickt:llvm-21, r=cuviperMatthias Krüger-0/+5
PassWrapper: adapt for llvm/llvm-project@f137c3d592e96330e450a8fd63ef… …7e8877fc1908 In LLVM 21 PR https://github.com/llvm/llvm-project/pull/130940 `TargetRegistry::createTargetMachine` was changed to take a `const Triple&` and has deprecated the old `StringRef` method. ``@rustbot`` label llvm-main
2025-05-03Rollup merge of #140505 - petrochenkov:expquote, r=bjorn3Matthias Krüger-1/+13
linker: Quote symbol names in .def files To support weird symbol names, including dots in particular. cc [#134767](https://github.com/rust-lang/rust/pull/134767#issuecomment-2839397610)
2025-05-03Rollup merge of #139343 - cberner:filelock_wouldblock, r=workingjubileeMatthias Krüger-62/+144
Change signature of File::try_lock and File::try_lock_shared These methods now return Result<(), TryLockError> instead of Result<bool, Error> to make their use less errorprone These methods are unstable under the "file_lock" feature. The related tracking issue is https://github.com/rust-lang/rust/pull/130999 and this PR changes the signatures as discussed by libs-api: https://github.com/rust-lang/rust/issues/130994#issuecomment-2770838848
2025-05-03`CreateResult` wrap more fields in `Frozen`lcnr-4/+4
2025-05-03TypeChecker take fields by reflcnr-8/+8
2025-05-03add `ReverseSccGraph::compute`lcnr-18/+27
2025-05-03Avoid an indent for labelled loops.Nicholas Nethercote-6/+5
2025-05-03Fix some hir pretty-printing over-indenting.Nicholas Nethercote-35/+36
2025-05-03Improve hir pretty-printing of attributes.Nicholas Nethercote-21/+49
2025-05-03Auto merge of #140442 - osiewicz:collector-walk-less-fine-grained-locking, ↵bors-27/+38
r=wesleywiser mono collector: Reduce # of locking while walking the graph While profiling Zed's dev build I've noticed that while most of the time `upstream_monomorphizations` takes a lot of time in monomorpization_collector, in some cases (e.g. build of `editor` itself) the rest of monomorphization_collector_graph_walk dominates it. Most of the time is spent in collect_items_rec. This PR aims to reduce the number of locks taking place; instead of locking output MonoItems once per children of current node, we do so once per *current node*. We also get to reuse locks for mentioned and used items. While this commit does not reduce Wall time of Zed's build, it does shave off CPU time (measured with `cargo build -j1`) from 48s to 47s. I've also tested it with parallel frontend against Zed and ripgrep and found no regressions.
2025-05-03Enable `BoxMarker` drop checking.Nicholas Nethercote-5/+1
All the box open/close issues have been fixed.
2025-05-03Fix hir pretty-printing of `global_asm!`.Nicholas Nethercote-4/+6
One of the boxes isn't closed, and this causes everything after it to be over-indented.
2025-05-03Remove opaque type printing.Nicholas Nethercote-9/+1
As far as I can tell, this code is not actually reachable.
2025-05-03Remove fake `BoxMarker`s.Nicholas Nethercote-19/+1
They don't appear to do anything -- no test output is affected -- and no other pretty-printing code looks like this.
2025-05-02Auto merge of #140596 - matthiaskrgr:rollup-s7tzr34, r=matthiaskrgrbors-309/+403
Rollup of 9 pull requests Successful merges: - #140485 (Optimize the codegen for `Span::from_expansion`) - #140509 (transmutability: merge contiguous runs with a common destination) - #140519 (Use select in projection lookup in `report_projection_error`) - #140521 (interpret: better error message for out-of-bounds pointer arithmetic and accesses) - #140536 (Rename `*Guard::try_map` to `filter_map`.) - #140550 (Stabilize `select_unpredictable`) - #140563 (extend the list of registered dylibs on `test::prepare_cargo_test`) - #140572 (Add useful comments on `ExprKind::If` variants.) - #140574 (Add regression test for 133065) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-02Add a regression testmoxian-0/+29
for #140545
2025-05-02zkvm: remove schmerik from maintainers listErik Kaneda-1/+0
2025-05-02Rollup merge of #140574 - reddevilmidzy:add-test, r=compiler-errorsMatthias Krüger-0/+31
Add regression test for 133065 closes: #133065
2025-05-02Rollup merge of #140572 - nnethercote:comment-ExprKind-If, r=compiler-errorsMatthias Krüger-0/+9
Add useful comments on `ExprKind::If` variants. Things that aren't obvious and took me a while to work out. r? `@BoxyUwU`
2025-05-02Rollup merge of #140563 - onur-ozkan:extend-dylib-paths, r=jieyouxuMatthias Krüger-3/+3
extend the list of registered dylibs on `test::prepare_cargo_test` self-explanatory Fixes #140299
2025-05-02Rollup merge of #140550 - Amanieu:stabilize_select_unpredictable, ↵Matthias Krüger-5/+1
r=workingjubilee Stabilize `select_unpredictable` FCP completed in tracking issue #133962.
2025-05-02Rollup merge of #140536 - zachs18:mapped-guard-filter-map, r=AmanieuMatthias Krüger-59/+61
Rename `*Guard::try_map` to `filter_map`. Rename `std::sync::*Guard::try_map` to `filter_map`. 1. Analogous to `std::cell::Ref(Mut)::filter_map`. 2. Doesn't imply `Try` genericizability. r? `@Amanieu` (or other T-libs-api) Tracking issue for `mapped_lock_guards`: https://github.com/rust-lang/rust/issues/117108
2025-05-02Rollup merge of #140521 - RalfJung:oob-error, r=saethlinMatthias Krüger-213/+202
interpret: better error message for out-of-bounds pointer arithmetic and accesses Fixes https://github.com/rust-lang/rust/issues/93881 r? `@saethlin`
2025-05-02Rollup merge of #140519 - compiler-errors:name-based-comparison, r=oli-obkMatthias Krüger-20/+62
Use select in projection lookup in `report_projection_error` Using `for_each_relevant_impl` doesn't actually select the correct impl; we can use `select` here to actually get the correct impl with certainty. Follow-up to https://github.com/rust-lang/rust/pull/140278. r? oli-obk
2025-05-02Rollup merge of #140509 - tmiasko:merge-contiguous-ranges, r=jswrennMatthias Krüger-7/+19
transmutability: merge contiguous runs with a common destination Based on #140380. r? `@jswrenn` `@joshlf`
2025-05-02Rollup merge of #140485 - Jarcho:from_expansion_opt, r=petrochenkovMatthias Krüger-2/+15
Optimize the codegen for `Span::from_expansion` See https://godbolt.org/z/bq65Y6bc4 for the difference. the new version is less than half the number of instructions. Also tried fully writing the function by hand: ```rust sp.ctxt_or_parent_or_marker != 0 && ( sp.len_with_tag_or_marker == BASE_LEN_INTERNED_MARKER || sp.len_with_tag_or_marker & PARENT_TAG == 0 ) ``` But that was no better than this PR's current use of `match_span_kind`.
2025-05-02Auto merge of #140406 - Urgau:autorefs-perf, r=nnethercotebors-4/+11
perf: delay checking of `#[rustc_no_implicit_autorefs]` in autoref lint Try to address the regression seen in https://github.com/rust-lang/rust/pull/123239#issuecomment-2835418470 by delaying the checking of `#[rustc_no_implicit_autorefs]` on method call.
2025-05-02doc(std): fix typo lchown -> lchmodbinarycat-1/+1
2025-05-02Auto merge of #140581 - Zalathar:rollup-ig2jb9v, r=Zalatharbors-223/+1723
Rollup of 12 pull requests Successful merges: - #134034 (handle paren in macro expand for let-init-else expr) - #137474 (pretty-print: Print shebang at the top of the output) - #138872 (rustc_target: RISC-V `Zfinx` is incompatible with `{ILP32,LP64}[FD]` ABIs) - #139046 (Improve `Lifetime::suggestion`) - #139206 (std: use the address of `errno` to identify threads in `unique_thread_exit`) - #139608 (Clarify `async` block behaviour) - #139847 (Delegate to inner `vec::IntoIter` from `env::ArgsOs`) - #140159 (Avoid redundant WTF-8 checks in `PathBuf`) - #140197 (Document breaking out of a named code block) - #140389 (Remove `avx512dq` and `avx512vl` implication for `avx512fp16`) - #140430 (Improve test coverage of HIR pretty printing.) - #140507 (rustc_target: RISC-V: feature addition batch 3) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-02linker: Quote symbol names in .def filesVadim Petrochenkov-1/+13
To support weird symbol names, including dots in particular.
2025-05-02resolve: Support imports of associated types and glob imports from traitsVadim Petrochenkov-113/+168
2025-05-02Update sysinfo to `0.35.0` in `src/tools/opt-dist`Guillaume Gomez-68/+35