| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
yet another small borrowck cleanup
The last borrowck changes from #139587 which can be reviewed entirely separately.
r? `@compiler-errors`
|
|
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.
|
|
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.
|
|
Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist`
This release is mostly bugfixes and code improvements.
|
|
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.
|
|
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-*`
|
|
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.
|
|
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
|
|
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
|
|
Improve hir pretty printing
It's currently pretty bad, so a few small improvements can make a big difference.
r? `@dtolnay`
|
|
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)
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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)
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
All the box open/close issues have been fixed.
|
|
One of the boxes isn't closed, and this causes everything after it to be
over-indented.
|
|
As far as I can tell, this code is not actually reachable.
|
|
They don't appear to do anything -- no test output is affected -- and no
other pretty-printing code looks like this.
|
|
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
|
|
for #140545
|
|
|
|
Add regression test for 133065
closes: #133065
|
|
Add useful comments on `ExprKind::If` variants.
Things that aren't obvious and took me a while to work out.
r? `@BoxyUwU`
|
|
extend the list of registered dylibs on `test::prepare_cargo_test`
self-explanatory
Fixes #140299
|
|
r=workingjubilee
Stabilize `select_unpredictable`
FCP completed in tracking issue #133962.
|
|
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
|
|
interpret: better error message for out-of-bounds pointer arithmetic and accesses
Fixes https://github.com/rust-lang/rust/issues/93881
r? `@saethlin`
|
|
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
|
|
transmutability: merge contiguous runs with a common destination
Based on #140380.
r? `@jswrenn` `@joshlf`
|
|
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`.
|
|
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.
|
|
|
|
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
|
|
To support weird symbol names, including dots in particular.
|
|
|
|
|