about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/path.rs
AgeCommit message (Collapse)AuthorLines
2022-12-06Add help for `#![feature(impl_trait_in_fn_trait_return)]`Josh Stone-6/+13
This adds a new variant `ImplTraitContext::FeatureGated`, so we can generalize the help for `return_position_impl_trait_in_trait` to also work for `impl_trait_in_fn_trait_return`.
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-16/+5
2022-11-24Use kw::Empty for elided lifetimes in path.Camille GILLOT-1/+1
2022-11-22`rustc_ast_lowering`: remove `ref` patternsMaybe Waffle-4/+4
2022-11-17Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵Nicholas Nethercote-1/+1
patterns.
2022-10-25adopt to compiler changesMaybe Waffle-1/+1
2022-10-25Feature gate `impl_trait_in_fn_trait_return`Maybe Waffle-1/+4
2022-10-25Allow `impl Fn() -> impl Trait` in return positionMaybe Waffle-1/+12
This allows writing the following function signatures: ```rust fn f0() -> impl Fn() -> impl Trait; fn f3() -> &'static dyn Fn() -> impl Trait; ``` These signatures were already allowed for common traits and associated types, there is no reason why `Fn*` traits should be special in this regard.
2022-10-11rustc_hir: Less error-prone methods for accessing `PartialRes` resolutionVadim Petrochenkov-4/+6
2022-09-14Pass ImplTraitContext as &, there's no need for that to be &mutSantiago Pastorino-10/+8
2022-09-06Pass ImplTraitContext as &mut to avoid the need of ↵Santiago Pastorino-8/+10
ImplTraitContext::reborrow later on
2022-09-05Auto merge of #101228 - nnethercote:simplify-hir-PathSegment, r=petrochenkovbors-4/+4
Simplify `hir::PathSegment` r? `@petrochenkov`
2022-09-05Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwcoDylan DPC-1/+1
Improve HIR stats #100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection. r? `@davidtwco`
2022-09-05Make `hir::PathSegment::hir_id` non-optional.Nicholas Nethercote-3/+3
2022-09-05Make `hir::PathSegment::res` non-optional.Nicholas Nethercote-1/+1
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-08-29Use `&'hir Ty` everywhere.Nicholas Nethercote-1/+1
For consistency, and because it makes HIR measurement simpler and more accurate.
2022-08-22Migrate ast_lowering::path to SessionDiagnosticJean CASPAR-15/+8
2022-07-06Remove `sess` field from LoweringContext.Camille GILLOT-2/+2
2022-06-21Always create parameters for functions-like types.Camille GILLOT-29/+22
2022-06-17Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoeristerbors-0/+1
Split up `Definitions` and `ResolverAstLowering`. Split off https://github.com/rust-lang/rust/pull/95573 r? `@michaelwoerister`
2022-06-15Refactor path segment parameter errorEdwinRy-19/+26
2022-06-14Make ResolverAstLowering a struct.Camille GILLOT-0/+1
2022-06-07Instrument important fns in AST loweringSantiago Pastorino-1/+1
2022-05-31Remove ImplTraitContext::reborrowSantiago Pastorino-9/+7
2022-05-31Move defs and bounds from Universal to LoweringContextSantiago Pastorino-3/+3
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-5/+5
2022-04-27Create a specific struct for lifetime capture.Camille GILLOT-27/+25
2022-04-27Use LifetimeRes during lowering.Camille GILLOT-91/+85
2022-04-17Lint elided lifetimes in path on the AST.Camille GILLOT-35/+4
2022-02-17Add more information to `impl Trait` deny errorMichael Goulet-5/+11
2022-01-17Use Term in ProjectionPredicatekadmin-1/+1
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
2021-12-27Tighten span when suggesting lifetime on pathMichael Goulet-1/+3
2021-12-03Rollup merge of #91273 - Badel2:ice-index-str, r=estebankMatthias Krüger-9/+13
Fix ICE #91268 by checking that the snippet ends with a `)` Fix #91268 Previously it was assumed that the last character of `snippet` will be a `)`, so using `snippet.len() - 1` as an index should be safe. However as we see in the test, it is possible to enter that branch without a closing `)`, and it will trigger the panic if the last character happens to be multibyte. The fix is to ensure that the snippet ends with `)`, and skip the suggestion otherwise.
2021-11-30Simplify lowering.Camille GILLOT-37/+31
2021-11-30Lint elided lifetimes in path during lifetime resolution.Camille GILLOT-19/+3
2021-11-26Fix ICE #91268 by checking that the snippet ends with a `)`Badel2-9/+13
2021-09-20Do not store visibility in *ItemRef.Camille GILLOT-11/+2
2021-09-01Compute item_generics_num_lifetimes during resolution.Camille GILLOT-9/+2
2021-08-29ast_lowering: Introduce `lower_span` for catching all spans entering HIRVadim Petrochenkov-7/+15
2021-07-19Better errors when we don't have implicit statics in trait objectsjackh726-0/+1
2021-05-12Add more precise span informations to generic typesGiacomo Stevanato-23/+44
2021-05-11improve diagnosts for GATsb-naber-0/+5
2021-03-15More precise spans for HIR pathsVadim Petrochenkov-5/+8
2021-02-04lowering of generic args in AssocTyConstraintb-naber-2/+5
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2021-01-10Rework diagnostics for wrong number of generic argsPatryk Wychowaniec-3/+3
2020-10-30Implement rustc side of report-future-incompatAaron Hill-2/+2
2020-10-30Fix some more clippy warningsJoshua Nelson-4/+2
2020-08-30mv compiler to compiler/mark-0/+433