| Age | Commit message (Collapse) | Author | Lines |
|
More dupe word typos
I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
|
|
|
|
Use `full_res` instead of `expect_full_res`
Fixes #102946
Fixes #102978
|
|
|
|
and cleanup lifetime rib walking loops
|
|
|
|
|
|
unify `IsPattern` and `IsImport` enum in `show_candidates`
Follow-up of #102876
A binding cannot appear in both pattern and import at the same time, so it makes sense to unify them
r? `@compiler-errors`
|
|
|
|
rustc_hir: Less error-prone methods for accessing `PartialRes` resolution
|
|
Check uniqueness of impl items by trait item when applicable.
When checking uniqueness of item names in impl blocks, we currently use the same definition of hygiene as for toplevel items. This means that a plain item and one generated by a macro 2.0 do not collide.
This hygiene rule does not match with how impl items resolve to associated trait items. As a consequence, we misdiagnose the trait impls.
This PR proposes to consider that trait impl items are uses of the corresponding trait items during resolution, instead of checking for duplicates later. An error is emitted when a trait impl item is used twice.
There should be no stable breakage, since macros 2.0 are still unstable.
r? ``@petrochenkov``
cc ``@RalfJung``
Fixes https://github.com/rust-lang/rust/issues/71614.
|
|
Move lifetime resolution module to rustc_hir_analysis.
Now that lifetime resolution has been removed from it, this file has nothing to do in `rustc_resolve`. It's purpose is to compute Debruijn indices for lifetimes, so let's put it in type collection.
|
|
|
|
|
|
suggest candidates for unresolved import
Currently we prompt suggestion of candidates(help notes of `use xxx::yyy`) for names which cannot be resolved, but we don't do that for import statements themselves that couldn't be resolved. It seems reasonable to add candidate help information for these statements as well.
Fixes #102711
|
|
|
|
Rename `AssocItemKind::TyAlias` to `AssocItemKind::Type`
Thanks `@camsteffen` for catching this in ast too, cc https://github.com/rust-lang/rust/pull/102829#issuecomment-1272649247
|
|
|
|
|
|
Trying to suggest additional lifetime parameter
``@cjgillot`` This is what I have so far for #100615
|
|
rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`
The naming of this variant seems inconsistent given that this is not really a "type alias", and the associated type variant for `TraitItemKind` is just called `Type`.
|
|
|
|
|
|
|
|
create def ids for impl traits during ast lowering
r? `@cjgillot`
|
|
|
|
Shrink `hir::def::Res`
r? `@spastorino`
|
|
|
|
Code refactoring smart_resolve_report_errors
`smart_resolve_report_errors` https://github.com/rust-lang/rust/blob/4ecfdfac51b159f68fce608792affb34a70e6f73/compiler/rustc_resolve/src/late/diagnostics.rs#L143
is almost 600 lines of code, we should do some code refactoring.
|
|
`Res::SelfTy` currently has two `Option`s. When the second one is `Some`
the first one is never consulted. So we can split it into two variants,
`Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res`
from 24 bytes to 12. This then shrinks `hir::Path` and
`hir::PathSegment`, which are the HIR types that take up the most space.
|
|
Because this is the only occurrence of a `Res::SelfTy` with `None` and
`None` fields, and the next commit will rely on those not being present.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Resolve async fn signature even without body (e.g., in trait)
Fixes #102138
This "bail if no body" behavior was introduced in #69539 to fix #69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.
|
|
Separate definitions and HIR owners in the type system
Fixes #83158
r? `@cjgillot`
|
|
|
|
|
|
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
|
|
resolve: Set effective visibilities for imports more precisely
Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID.
|
|
Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID.
|
|
|
|
|