about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late/lifetimes.rs
AgeCommit message (Collapse)AuthorLines
2022-10-10Move lifetime resolution module to rustc_hir_analysis.Camille GILLOT-1899/+0
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-29Emitting error regardless of new param suggestionstoozy-33/+33
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-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-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-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-1/+1
by module
2022-09-01Directly use the `instrument` macro instead of its full pathOli Scherer-8/+8
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-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-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-25Update file description.Camille GILLOT-5/+6
2022-07-25Report elision failures on the AST.Camille GILLOT-186/+38
2022-07-14Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillotDylan DPC-2/+80
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.
2022-07-12make for<> in closures a possible place to suggest adding named lifetimeMaybe Waffle-3/+31
2022-07-12Lower closure binders to hir & properly check themMaybe Waffle-1/+48
2022-07-05Return a FxIndexSet in is_late_bound query.Camille GILLOT-2/+2
This return value is iterated upon by borrowck, hence the need to preserve a deterministic iteration order.
2022-06-22Auto merge of #98279 - cjgillot:all-fresh-nofn, r=petrochenkovbors-38/+35
Create elided lifetime parameters for function-like types Split from https://github.com/rust-lang/rust/pull/97720 This PR refactor lifetime generic parameters in bare function types and parenthesized traits to introduce the additional required lifetimes as fresh parameters in a `for<>` bound. This PR does the same to lifetimes appearing in closure signatures, and as-if introducing `for<>` bounds on closures (without the associated change in semantics). r? `@petrochenkov`
2022-06-21Use CreateParameter mode for closures too.Camille GILLOT-37/+32
2022-06-21Always create parameters for functions-like types.Camille GILLOT-1/+3
2022-06-21This comment is out dated and misleadingSantiago Pastorino-3/+0
Arms are about TAIT and RPIT, as the variants clearly show.
2022-06-06Rollup merge of #97312 - cjgillot:no-path-in-scope, r=compiler-errorsDylan DPC-97/+8
Compute lifetimes in scope at diagnostic time The set of available lifetimes is currently computed during lifetime resolution on HIR. It is only used for one diagnostic. In this PR, HIR lifetime resolution just reports whether elided lifetimes are well-defined at the place of use. The diagnostic code is responsible for building a list of lifetime names if elision is not allowed. This will allow to remove lifetime resolution on HIR eventually.
2022-06-04Completely remove LifetimeScopeForPath.Camille GILLOT-83/+5
2022-06-04Compute lifetimes in scope at diagnostic time.Camille GILLOT-22/+11
2022-06-03Fail gracefully when encountering an HRTB in APIT.Camille GILLOT-7/+64