about summary refs log tree commit diff
path: root/compiler/rustc_hir/src
AgeCommit message (Collapse)AuthorLines
2022-07-21Address more nitsMichael Goulet-1/+1
2022-07-21Do if-expression obligation stuff less eagerlyMichael Goulet-0/+10
2022-07-20Introduce AnonymousLifetimeRib::Elided and use it for implied 'static.Camille GILLOT-1/+1
2022-07-20Remove unused StableMap and StableSet types from rustc_data_structuresMichael Woerister-1/+1
2022-07-20Use FxIndexMap instead of otherwise unused StableMap for WEAK_ITEMS_REFS.Michael Woerister-6/+6
2022-07-15Rollup merge of #99119 - TaKO8Ki:remove-string-matching-about-methods, ↵Dylan DPC-0/+8
r=cjgillot Refactor: remove a string matching about methods This patch remove a string matching about methods and adds some rustfix tests.
2022-07-15simplify `suggest_deref_ref_or_into`Takayuki Maeda-0/+8
2022-07-14Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillotDylan DPC-13/+30
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-12Add back expr size checksMaybe Waffle-1/+1
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-19/+17
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.
2022-07-12Lower closure binders to hir & properly check themMaybe Waffle-2/+21
2022-07-12Comment out expr size checkMaybe Waffle-1/+1
2022-07-11add tests for async awaitDing Xiang Fei-3/+2
2022-07-11move else block into the `Local` structDing Xiang Fei-10/+8
2022-07-11lower let-else in MIR insteadDing Xiang Fei-7/+15
2022-07-09Rollup merge of #99043 - compiler-errors:derive-nit, r=cjgillotDylan DPC-24/+4
Collapse some weirdly-wrapping derives self-explanatory
2022-07-08Collapse some weirdly-wrapping derivesMichael Goulet-24/+4
2022-07-08Implement IntoDiagnosticArg for hir::ConstContextMichael Goulet-0/+3
2022-07-07Auto merge of #99024 - matthiaskrgr:rollup-8ygpcpg, r=matthiaskrgrbors-2/+2
Rollup of 9 pull requests Successful merges: - #97917 (Implement ExitCodeExt for Windows) - #98844 (Reword comments and rename HIR visiting methods.) - #98979 (interpret: use AllocRange in UninitByteAccess) - #98986 (Fix missing word in comment) - #98994 (replace process exit with more detailed exit in src/bootstrap/*.rs) - #98995 (Add a test for #80471) - #99002 (suggest adding a derive for #[default] applied to variants) - #99004 (Add a test for #70408) - #99017 (Replace boolean argument for print_where_clause with an enum to make code more clear) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-07Reword comments and rename HIR visiting methods.Camille GILLOT-2/+2
2022-07-06Make AST lowering a query.Camille GILLOT-1/+5
2022-07-01Factor out hir::Node::BindingCameron Steffen-2/+0
2022-06-28Auto merge of #98222 - cjgillot:single-wf, r=michaelwoeristerbors-34/+0
Only keep a single query for well-formed checking There are currently 3 queries to perform wf checks on different item-likes. This complexity is not required. This PR replaces the query by: - one query per item; - one query to invoke it for a whole module. This allows to remove HIR `ParItemLikeVisitor`.
2022-06-22Auto merge of #98279 - cjgillot:all-fresh-nofn, r=petrochenkovbors-5/+11
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-21Only keep a single well-formed query.Camille GILLOT-34/+0
2022-06-21Use CreateParameter mode for closures too.Camille GILLOT-2/+7
2022-06-21Always create parameters for functions-like types.Camille GILLOT-2/+1
2022-06-19Leave the responsibility to create `Fresh` lifetimes to lowering.Camille GILLOT-1/+3
2022-06-19Rollup merge of #98165 - WaffleLapkin:once_things_renamings, r=m-ou-seMatthias Krüger-4/+4
once cell renamings This PR does the renamings proposed in https://github.com/rust-lang/rust/issues/74465#issuecomment-1153703128 - Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}` - Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}` (I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc) ```@rustbot``` label +T-libs-api -T-libs
2022-06-18Auto merge of #98153 - nnethercote:fix-MissingDoc-quadratic-behaviour, ↵bors-1/+1
r=cjgillot Fix `MissingDoc` quadratic behaviour Best reviewed one commit at a time. r? `@cjgillot`
2022-06-17Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoeristerbors-52/+46
Split up `Definitions` and `ResolverAstLowering`. Split off https://github.com/rust-lang/rust/pull/95573 r? `@michaelwoerister`
2022-06-16Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`Maybe Waffle-4/+4
2022-06-16Remove unused `hir_id` arg from `visit_attribute`.Nicholas Nethercote-1/+1
2022-06-15Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011Yuki Okushi-13/+18
Make `ExprKind::Closure` a struct variant. Simple refactor since we both need it to introduce additional fields in `ExprKind::Closure`. r? ``@Aaron1011``
2022-06-14Separate `source_span` and `expn_that_defined` from `Definitions`.Camille GILLOT-51/+5
2022-06-14Make ResolverAstLowering a struct.Camille GILLOT-1/+41
2022-06-11Address commentsMichael Goulet-9/+4
2022-06-11Handle empty where-clause betterMichael Goulet-10/+16
2022-06-12Make `ExprKind::Closure` a struct variant.Camille GILLOT-13/+18
2022-06-11feat(fix): update some linkskyoto7250-2/+2
2022-06-07Don't suggest adding let in certain if conditionsMichael Goulet-0/+14
2022-06-06Rollup merge of #97312 - cjgillot:no-path-in-scope, r=compiler-errorsDylan DPC-0/+2
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-06Rollup merge of #97683 - cjgillot:no-apit-hrtb, r=nagisaMatthias Krüger-1/+1
Fail gracefully when encountering an HRTB in APIT. Fixes https://github.com/rust-lang/rust/issues/96954 ~The first commit will be merged as part of https://github.com/rust-lang/rust/pull/97415~
2022-06-04Compute lifetimes in scope at diagnostic time.Camille GILLOT-0/+2
2022-06-03Make hir().get_generics and generics_of consistent.Camille GILLOT-12/+9
2022-06-03Fail gracefully when encountering an HRTB in APIT.Camille GILLOT-1/+1
2022-06-03Manipulate lifetimes by LocalDefId for region resolution.Camille GILLOT-24/+36
2022-06-02Rollup merge of #97023 - cjgillot:uniform-anon, r=estebankDylan DPC-0/+11
Diagnose anonymous lifetimes errors more uniformly between async and regular fns Async fns and regular fns are desugared differently. For the former, we create a generic parameter at HIR level. For the latter, we just create an anonymous region for typeck. I plan to migrate regular fns to the async fn desugaring. Before that, this PR attempts to merge the diagnostics for both cases. r? ```@estebank```
2022-05-31Apply track_caller to closure on `expect_non_local()`Yuki Okushi-1/+5
2022-05-30Default methods of traits are also AssocFn defs as they essentially desugar ↵Oli Scherer-0/+1
to a method in a new impl block