| Age | Commit message (Collapse) | Author | Lines |
|
In case a variable is unified with two universal regions from different
universes, use the one with the lower universe as it has a higher chance
of being compatible with the variable.
|
|
|
|
Do not implement HashStable for HashSet (MCP 533)
This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order.
The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
|
|
The crate hash is needed:
- if debug assertions are enabled, or
- if incr. comp. is enabled, or
- if metadata is being generated, or
- if `-C instrumentation-coverage` is enabled.
This commit avoids computing the crate hash when these conditions are
all false, such as when doing a release build of a binary crate.
It uses `Option` to store the hashes when needed, rather than
computing them on demand, because some of them are needed in multiple
places and computing them on demand would make compilation slower.
The commit also removes `Owner::hash_without_bodies`. There is no
benefit to pre-computing that one, it can just be done in the normal
fashion.
|
|
PR 107844 made DropAndReplace unused, let's remove it completely
from the codebase.
|
|
fix multiple issues when promoting type-test subject
Multiple interdependent fixes. See linked issues for a short description of each.
When Promoting a type-test `T: 'a` from within the closure back to its parent function, there are a couple pre-existing bugs and limitations. They were exposed by the recent changes to opaque types because the type-test subject (`T`) is no longer a simple ParamTy.
Commit 1:
Fixes #108635
Fixes #107426
Commit 2:
Fixes #108639
Commit 3:
Fixes #107516
|
|
|
|
|
|
|
|
sess.opts.unstable_opts
|
|
|
|
|
|
Improve documentation and argument naming of some TyCtxt methods
I got bit by this recently so better prevent others to end up the same as me.
|
|
|
|
rustc_middle: Remove trait `DefIdTree`
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
|
|
Rollup of 6 pull requests
Successful merges:
- #108298 (Fix ICE: check if snippet is `)`)
- #108405 (Lazily compute crate name for consider_optimizing)
- #108656 (Rustdoc search: Emit an error for unclosed generic)
- #108660 (Remove ne implementations from strings)
- #108669 (Allow checking whether a type allows being uninitialized)
- #108727 (rustc_expand: make proc-macro derive error translatable)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Allow checking whether a type allows being uninitialized
This is useful for clippy ([rust-lang/clippy#10407](https://github.com/rust-lang/rust-clippy/issues/10407)) and for the future `MaybeUninit::assume_init` panics (#100423).
|
|
r=WaffleLapkin
Lazily compute crate name for consider_optimizing
The extra query is unnecessary in the common case of not having fuel.
|
|
Remove `NormalizationError::ConstantKind`
No longer in use by `TryNormalizeAfterErasingRegionsFolder` (as of #102355 / e8150fa60cc445de7a57db634deb0668880be593 it seems). It's making `LayoutError`, etc. kinda large -- that was noticed by `@zoxc.`
|
|
|
|
|
|
Match unmatched backticks in compiler/ comments
r? ``@Nilstrieb`` as per [advice](https://github.com/rust-lang/rust/pull/108685#issuecomment-1453018499)
|
|
Match unmatched backticks in compiler/
Found with GNU grep:
```
grep -rEn '^(([^`]*`){2})*[^`]*`[^`]*$' compiler/ | rg -v '\s*[//]?.{1,2}```'
```
|
|
new solver: implement canonicalization and region constraints
see the corresponding rustc-dev-guide chapter: https://rustc-dev-guide.rust-lang.org/solve/canonicalization.html
r? ``@compiler-errors``
|
|
|
|
Don't require a region to have an `external_name` in order to be
promoted.
|
|
|
|
|
|
|
|
|
|
Make `ExprKind` the first field in `thir::Expr`
This makes its `Debug` impl print it first which is useful, as it's the most important part when looking at an expr.
|
|
Support allocations with non-Box<[u8]> bytes
This is prep work for allowing miri to support passing pointers to C code, which will require `Allocation`s to be correctly aligned. Currently, it just makes `Allocation` generic and plumbs the necessary changes through the right places.
The follow-up to this will be adding a type in the miri interpreter which correctly aligns the bytes, using that for the Miri engine, then allowing Miri to pass pointers into these allocations to C calls.
Based off of #100467, credit to ```@emarteca``` for the code
|
|
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
|
|
This is useful for clippy and for the future `MaybeUninit::assume_init`
panics.
|
|
This makes its `Debug` impl print it first which is useful, as it's the
most important part when looking at an expr.
|
|
|
|
return associated types for RPITITs
|
|
|
|
|
|
|
|
|
|
live_symbols_and_ignored_derived_traits query.
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #108376 (compiler/rustc_session: fix sysroot detection logic)
- #108400 (add llvm cgu instructions stats to perf)
- #108496 (fix #108495, postfix decrement and prefix decrement has no warning)
- #108505 (Further unify validity intrinsics)
- #108520 (Small cleanup to `one_bound_for_assoc_type`)
- #108560 (Some `infer/mod.rs` cleanups)
- #108563 (Make mailmap more correct)
- #108564 (Fix `x clean` with specific paths)
- #108571 (Add contains_key to SortedIndexMultiMap)
- #108578 (Update Fuchsia platform team members)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=michaelwoerister
Further unify validity intrinsics
Also merges the inhabitedness check into the query to further unify the
code paths.
Depends on #108364
|
|
|
|
|
|
Avoid invoking typeck from borrowck
This PR attempts to reduce direct dependencies between typeck and MIR-related queries. The goal is to have all the information transit either through THIR or through dedicated queries that avoid depending on the whole `TypeckResults`.
In a first commit, we store the type information that MIR building requires into THIR. This avoids edges between mir_built and typeck.
In the second and third commit, we wrap informations around closures (upvars, kind origin and user-provided signature) to avoid borrowck depending on typeck information.
There should be a single remaining borrowck -> typeck edge in the good path, due to inline consts.
|
|
|