summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
AgeCommit message (Collapse)AuthorLines
2022-10-27Additional revert fixesMichael Goulet-1/+1
2022-10-04Fix a typo in error messageFrank Steffahn-1/+1
(cherry picked from commit 696472a5867dafa35c5262da709677075fab9dc8)
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
2022-08-03Make object_lifetime_defaults a cross-crate query.Camille GILLOT-41/+19
2022-07-28Remove guess_head_span.Camille GILLOT-6/+1
2022-07-27Rollup merge of #99728 - cjgillot:ast-lifetimes-anon-clean, r=petrochenkovGuillaume Gomez-512/+56
Clean up HIR-based lifetime resolution Based on https://github.com/rust-lang/rust/pull/97313. Fixes #98932. r? `@petrochenkov`
2022-07-26Pacify tidy.Camille GILLOT-1/+0
2022-07-26Stop creating anonymous late lifetimes.Camille GILLOT-36/+1
2022-07-26Remove resolve_elided_lifetimes.Camille GILLOT-53/+6
2022-07-26Stop resolving lifetime elision on HIR.Camille GILLOT-425/+52
2022-07-26Replace LifetimeRes::Anonymous by LifetimeRes::Infer.Camille GILLOT-2/+2
2022-07-26Remove the distinction between LifetimeName::Implicit and ↵Camille GILLOT-4/+4
LifetimeName::Underscore.
2022-07-26Rollup merge of #99729 - cjgillot:rm-unused-tuple, r=michaelwoeristerMatthias Krüger-1/+1
Remove unused tuple fields Found by https://github.com/rust-lang/rust/pull/95977
2022-07-25Unused tuple fields in rustc_resolve.Camille GILLOT-1/+1
2022-07-25Update file description.Camille GILLOT-5/+6
2022-07-25Report elision failures on the AST.Camille GILLOT-758/+317
2022-07-19Rollup merge of #99401 - TaKO8Ki:avoid-symbol-to-&str-conversions, r=nnethercoteMatthias Krüger-8/+13
Avoid `Symbol` to `&str` conversions `Symbol::as_str` is a slowish operation, so this patch removes some usages of it.
2022-07-18avoid `Symbol` to `&str` conversionsTakayuki Maeda-8/+13
2022-07-14Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillotDylan DPC-3/+85
Implement `for<>` lifetime binder for closures This PR implements RFC 3216 ([TI](https://github.com/rust-lang/rust/issues/97362)) and allows code like the following: ```rust let _f = for<'a, 'b> |a: &'a A, b: &'b B| -> &'b C { b.c(a) }; // ^^^^^^^^^^^--- new! ``` cc ``@Aaron1011`` ``@cjgillot``
2022-07-13Add feature gate.Camille GILLOT-1/+16
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-1/+4
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.