| Age | Commit message (Collapse) | Author | Lines |
|
- `ReFree` -> `ReLateParam`
- `ReEarlyBound` -> `ReEarlyParam`
|
|
other changes:
- `Region::new_late_bound` -> `Region::new_bound`
- `Region::is_late_bound` -> `Region::is_bound`
|
|
|
|
There's no need to collect an iterator into a `Vec`, or to call
`into_iter` at the call sites.
|
|
|
|
|
|
This reverts commit cb9467515b5a9b15aaa905683c6b4dd9e851056c, reversing
changes made to 57781b24c54f9548722927ba88c343ff28da94ce.
|
|
|
|
|
|
|
|
|
|
r? @WaffleLapkin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r=compiler-errors
Switch to `EarlyBinder` for `explicit_item_bounds`
Part of the work to finish https://github.com/rust-lang/rust/issues/105779.
This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`.
r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
|
|
|
|
EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
|
|
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
|
|
These traits exist so that folders/visitors can recurse into types of
interest: binders, types, regions, predicates, and consts. But `Region`
is non-recursive and cannot contain other types of interest, so its
methods in these traits are trivial.
This commit inlines and removes those trivial methods.
|
|
|
|
|
|
|
|
r=compiler-errors
migrate `rustc_hir_analysis` to session diagnostic [Part Two]
migrate `rustc_hir_analysis` to session diagnostic (part two)
files list:
- rustc_hir_analysis/variance/*
- rustc_hir_analysis/missing_cast_for_variadic_arg.rs
- rustc_hir_analysis/sized_unsized_cast.rs
Updates #100717
|
|
part two
files list:
rustc_hir_analysis/variance/*
rustc_hir_analysis/missing_cast_for_variadic_arg.rs
rustc_hir_analysis/sized_unsized_cast.rs
|
|
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.
|
|
|
|
in metadata
|
|
|
|
|
|
Only required until fix #107803 is merged into stage0 compiler, expected
when beta 1.69.0 is released on 2023-03-09, then this commit can be
reverted.
|
|
|
|
|
|
CC #69314
|
|
internally change regions to be covariant
Surprisingly, we consider the reference type `&'a T` to be contravaraint in its lifetime parameter. This is confusing and conflicts with the documentation we have in the reference, rustnomicon, and rustc-dev-guide. This also arguably not the correct use of terminology since we can use `&'static u8` in a place where `&' a u8` is expected, this implies that `&'static u8 <: &' a u8` and consequently `'static <: ' a`, hence covariance.
Because of this, when relating two types, we used to switch the argument positions in a confusing way:
`Subtype(&'a u8 <: &'b u8) => Subtype('b <: 'a) => Outlives('a: 'b) => RegionSubRegion('b <= 'a)`
The reason for the current behavior is probably that we wanted `Subtype('b <: 'a)` and `RegionSubRegion('b <= 'a)` to be equivalent, but I don' t think this is a good reason since these relations are sufficiently different in that the first is a relation in the subtyping lattice and is intrinsic to the type-systems, while the the second relation is an implementation detail of regionck.
This PR changes this behavior to use covariance, so..
`Subtype(&'a u8 <: &'b u8) => Subtype('a <: 'b) => Outlives('a: 'b) => RegionSubRegion('b <= 'a) `
Resolves #103676
r? `@lcnr`
|
|
|
|
|
|
EarlyBinder to fn_sig in metadata
|
|
|
|
|
|
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc)
This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble.
The changes required are moderate but non-zero:
- In some places the collections are extracted into sorted vecs.
- There are a few instances where for-loops have been changed to extends.
~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~
Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)).
Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533).
r? `@ghost`
|
|
Remove some `ref` patterns from the compiler
Previous PR: https://github.com/rust-lang/rust/pull/105368
r? `@Nilstrieb`
|
|
document + UI test `E0208` and make its output more user-friendly
Cleans up `E0208`'s output a lot. It could actually be useful for someone learning about variance now. I also added a UI test for it in `tests/ui/error-codes/` and wrote some docs for it.
r? `@GuillaumeGomez` another error code, can't be bothered to find the issue :P. Obviously there's some compiler stuff, so you'll have to hand it off.
Part of https://github.com/rust-lang/rust/issues/61137.
|
|
|
|
|