about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
AgeCommit message (Collapse)AuthorLines
2022-10-10Rollup merge of #102868 - compiler-errors:rename-assoc-tyalias-to-ty, r=TaKO8KiDylan DPC-2/+2
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
2022-10-10Rename AssocItemKind::TyAlias to AssocItemKind::TypeMichael Goulet-2/+2
2022-10-10Rollup merge of #102323 - Stoozy:master, r=cjgillotYuki Okushi-2/+31
Trying to suggest additional lifetime parameter ``@cjgillot`` This is what I have so far for #100615
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-1/+1
2022-10-01Removed unnecessary for loopstoozy-16/+9
2022-09-29Auto merge of #101887 - nnethercote:shrink-Res, r=spastorinobors-1/+1
Shrink `hir::def::Res` r? `@spastorino`
2022-09-29Emitting error regardless of new param suggestionstoozy-33/+33
2022-09-29Rollup merge of #102085 - chenyukang:code-refactor, r=cjgillotYuki Okushi-247/+366
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.
2022-09-29Shrink `hir::def::Res`.Nicholas Nethercote-1/+1
`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.
2022-09-28Proper span for new generic param suggestionstoozy-2/+7
2022-09-27Do not overwrite binders for another HirId.Camille GILLOT-20/+35
2022-09-27Properly formatting the multipart suggestionstoozy-1/+1
2022-09-26Using multipart suggestionstoozy-12/+19
2022-09-26Trying to suggest additional lifetime parameterstoozy-8/+32
2022-09-26trivial fix on fallbackyukang-3/+1
2022-09-26more code refactor on smart_resolve_report_errorsyukang-175/+207
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-16/+16
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)`
2022-09-22Fix a typo in error messageFrank Steffahn-1/+1
2022-09-21add trivial commentsyukang-2/+3
2022-09-21code refactoring smart_resolve_report_errorsyukang-173/+261
2022-09-14Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillotbors-7/+3
Simplify visitors more A successor to #100392. r? `@cjgillot`
2022-09-12Remove unused argument from `visit_poly_trait_ref`.Nicholas Nethercote-6/+2
2022-09-12Remove `path_span` argument to the `visit_path_segment` methods.Nicholas Nethercote-1/+1
The `visit_path_segment` method of both the AST and HIR visitors has a `path_span` argument that isn't necessary. This commit removes it. There are two very small and inconsequential functional changes. - One call to `NodeCollector::insert` now is passed a path segment identifier span instead of a full path span. This span is only used in a panic message printed in the case of an internal compiler bug. - Likewise, one call to `LifetimeCollectVisitor::record_elided_anchor` now uses a path segment identifier span instead of a full path span. This span is used to make some `'_` lifetimes.
2022-09-11Avoid `Iterator::last`KaDiWa-2/+2
2022-09-09Handle generic parameters.Camille GILLOT-5/+1
2022-09-09Lower RPITIT to ImplTraitPlaceholder itemMichael Goulet-1/+2
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+3
2022-09-07Add instrument and debug callsSantiago Pastorino-0/+3
2022-09-03Do not call object_lifetime_default on lifetime params.Camille GILLOT-16/+22
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-3/+1
by module
2022-09-01Directly use the `instrument` macro instead of its full pathOli Scherer-8/+8
2022-09-01Auto merge of #100707 - dzvon:fix-typo, r=davidtwcobors-1/+1
Fix a bunch of typo This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-31Fix uintended diagnostic caused by `drain(..)`Donough Liu-12/+13
2022-08-29Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errorsDylan DPC-374/+80
Remove separate indexing of early-bound regions ~Based on https://github.com/rust-lang/rust/pull/99728.~ This PR copies some modifications from https://github.com/rust-lang/rust/pull/97839 around object lifetime defaults. These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
2022-08-28Auto merge of #100497 - kadiwa4:remove_clone_into_iter, r=cjgillotbors-1/+1
Avoid cloning a collection only to iterate over it `@rustbot` label: +C-cleanup
2022-08-26Rollup merge of #100817 - vincenzopalazzo:macros/bool_spelling_sugg, r=davidtwcoMichael Goulet-5/+22
sugg: suggest the usage of boolean value when there is a typo in the keyword Fixes https://github.com/rust-lang/rust/issues/100686 This adds a new suggestion when there is a well-known typo With the following program ```rust fn main() { let x = True; } ``` Now we have the following suggestion ``` error[E0425]: cannot find value `True` in this scope --> test.rs:2:13 | 2 | let x = True; | ^^^^ not found in this scope | help: you may want to use a bool value instead | 2 | let x = true; | ~~~~ error: aborting due to previous error ``` Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-08-22sugg: suggest the usage of boolean value when there is a typo in the keywordVincenzo Palazzo-5/+22
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-08-22make some methods privateTakayuki Maeda-1/+1
2022-08-18Rollup merge of #100643 - ↵Matthias Krüger-0/+12
TaKO8Ki:point-at-type-parameter-shadowing-another-type, r=estebank Point at a type parameter shadowing another type This patch fixes a part of #97459.
2022-08-17point at a type parameter shadowing another typeTakayuki Maeda-0/+12
2022-08-13avoid cloning and then iteratingKaDiWa-1/+1
2022-08-11Suggest path separator when a dot is used on a traitLeón Orell Valerian Liehr-16/+37
2022-08-10Use &mut Diagnostic instead of &mut DiagnosticBuilder unless neededMichael Goulet-3/+3
2022-08-03Assert index sanity.Camille GILLOT-2/+7
2022-08-03Simplify debugging.Camille GILLOT-7/+3
2022-08-03Use DefIdTree instead of open-coding it.Camille GILLOT-6/+2
2022-08-03Remove index from Region::EarlyBound.Camille GILLOT-199/+24
2022-08-03Compute `object_lifetime_default` per parameter.Camille GILLOT-84/+24
2022-08-03Create a specific `ObjectLifetimeDefault` enum.Camille GILLOT-73/+39