about summary refs log tree commit diff
path: root/compiler/rustc_hir/src
AgeCommit message (Collapse)AuthorLines
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
2022-05-29Make lifetime errors more precise in the presence of `Fresh` lifetimes.Camille GILLOT-0/+11
2022-05-22Lifetime variance fixes for rustdocMichael Goulet-4/+4
2022-05-22factor out the rvalue lifetime ruleDing Xiang Fei-1/+1
remove region_scope_tree from RegionCtxt Apply suggestions from code review Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-05-21Rollup merge of #97223 - cjgillot:linear-hir-tree, r=jackh726Guillaume Gomez-1/+12
Remove quadratic behaviour from -Zunpretty=hir-tree. Closes https://github.com/rust-lang/rust/issues/97115
2022-05-21Auto merge of #97239 - jhpratt:remove-crate-vis, r=joshtriplettbors-2/+1
Remove `crate` visibility modifier FCP to remove this syntax is just about complete in #53120. Once it completes, this should be merged ASAP to avoid merge conflicts. The first two commits remove usage of the feature in this repository, while the last removes the feature itself.
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-2/+1
2022-05-20Auto merge of #95418 - cjgillot:more-disk, r=davidtwcobors-4/+4
Cache more queries on disk One of the principles of incremental compilation is to allow saving results on disk to avoid recomputing them. This PR investigates persisting a lot of queries whose result are to be saved into metadata. Some of the queries are cheap reads from HIR, but we may also want to get rid of these reads for incremental lowering.
2022-05-20Remove quadratic behaviour from -Zunpretty=hir-tree.Camille GILLOT-1/+12
2022-05-19Update IfLet syntaxEric Holk-1/+1
2022-05-19Borrow guard patterns for the body of the guardEric Holk-0/+14
2022-05-18Auto merge of #96863 - SparrowLii:let, r=michaelwoeristerbors-5/+3
use `hir::Let` in `hir::Guard::IfLet` This PR fixes the FIXME about using `hir::Let` in `hir::Guard::IfLet`
2022-05-13rename visit item-like methodsMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>