about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
2019-09-05or-patterns: syntax: adjust `visit` and `mut_visit`.Mazdak Farrokhzad-9/+8
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-7/+7
2019-08-24Modifies how Arg, Arm, Field, FieldPattern and Variant are visitedCaio-25/+29
Part of the necessary work to accomplish #63468.
2019-08-17initial implementation of or-pattern parsingDan Robertson-1/+1
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-17Initial implementation of or patternsvarkor-4/+3
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-3/+3
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-1/+1
2019-08-14Merge Variant and Variant_Caio-4/+4
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-1/+1
2019-08-02Replace "existential" by "opaque"varkor-2/+2
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-1/+1
2019-07-28Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasperMazdak Farrokhzad-5/+10
Lint attributes on function arguments Fixes #61238. cc #60406
2019-07-28Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.Mazdak Farrokhzad-8/+6
2019-07-28Add 'ast::PatKind::Rest'.Mazdak Farrokhzad-1/+1
2019-07-27Lint attributes on function argumentsCaio-5/+10
2019-06-24Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkovbors-4/+2
Remove `ast::Guard` With the introduction of `ast::ExprKind::Let` in https://github.com/rust-lang/rust/pull/60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](https://github.com/rust-lang/rust/issues/51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here. However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...). r? @petrochenkov
2019-06-23Remove redundant syntax::ast::Guard.Mazdak Farrokhzad-4/+2
2019-06-23let_chains: Remove ast::ExprKind::{IfLet, WhileLet} from visitors and ↵Mazdak Farrokhzad-12/+4
introduce ::Let.
2019-06-09Allow attributes in formal function parametersCaio-1/+2
2019-06-07syntax: Treat error literals in more principled wayVadim Petrochenkov-2/+1
2019-06-06syntax: Use `Token` in visitors and fix a mut visitor testVadim Petrochenkov-3/+3
2019-06-06syntax: Use `Token` in `TokenTree::Token`Vadim Petrochenkov-1/+1
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-2/+2
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-7/+14
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-1/+1
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-3/+0
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e. Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing changes made to 12bf98155249783583a91863c5dccf9e346f1226. Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
2019-05-24Remove `ObsoleteInPlace`varkor-4/+0
2019-05-07Implement built-in await syntaxTaylor Cramer-0/+1
Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature.
2019-04-21Introduce `ArgSource` for diagnostics.David Wood-0/+3
This commit introduces an `ArgSource` enum that is lowered into the HIR so that diagnostics can correctly refer to the argument pattern's original name rather than the generated pattern.
2019-04-20Feature gate async fn methodsvarkor-0/+10
2019-03-29Rollup merge of #59510 - varkor:rename-type_parameters, r=eddybMazdak Farrokhzad-9/+9
Rename `type_parameters` to `generics` and so on Some old variable names had fallen through the generics generalisation pull requests.
2019-03-29Rename `type_parameters` to `generics` and so onvarkor-9/+9
2019-03-27Visit path in `walk_mac`varkor-2/+2
2019-02-28Auto merge of #57760 - dlrobertson:varargs1, r=alexregbors-1/+1
Support defining C compatible variadic functions ## Summary Add support for defining C compatible variadic functions in unsafe rust with `extern "C"` according to [RFC 2137]. ## Details ### Parsing When parsing a user defined function that is `unsafe` and `extern "C"` allow variadic signatures and inject a "spoofed" `VaList` in the new functions signature. This allows the user to interact with the variadic arguments via a `VaList` instead of manually using `va_start` and `va_end` (See [RFC 2137] for details). ### Codegen When running codegen for a variadic function, remove the "spoofed" `VaList` from the function signature and inject `va_start` when the arg local references are created for the function and `va_end` on return. ## TODO - [x] Get feedback on injecting `va_start/va_end` in MIR vs codegen - [x] Properly inject `va_end` - It seems like it should be possible to inject `va_end` on the `TerminatorKind::Return`. I just need to figure out how to get the `LocalRef` here. - [x] Properly call Rust defined C variadic functions in Rust - The spoofed `VaList` causes problems here. Related to: #44930 r? @ghost [RFC 2137]: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md
2019-02-27Support defining C compatible variadic functionsDan Robertson-1/+1
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-4/+11
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
2019-02-10rustc: doc commentsAlexander Regueiro-3/+3
2019-02-07Add lowering errors for const genericsvarkor-0/+2
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07libsyntax => 2018Taiki Endo-3/+4
2019-01-14Remove `ThinTokenStream`.Nicholas Nethercote-1/+1
`TokenStream` is now almost identical to `ThinTokenStream`. This commit removes the latter, replacing it with the former.
2018-12-27AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-endVadim Petrochenkov-0/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10Remove `tokenstream::Delimited`.Nicholas Nethercote-1/+1
Because it's an extra type layer that doesn't really help; in a couple of places it actively gets in the way, and overall removing it makes the code nicer. It does, however, move `tokenstream::TokenTree` further away from the `TokenTree` in `quote.rs`. More importantly, this change reduces the size of `TokenStream` from 48 bytes to 40 bytes on x86-64, which is enough to slightly reduce instruction counts on numerous benchmarks, the best by 1.5%. Note that `open_tt` and `close_tt` have gone from being methods on `Delimited` to associated methods of `TokenTree`.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-09-01Auto merge of #53815 - F001:if-let-guard, r=petrochenkovbors-1/+5
refactor match guard This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114 The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers. r? @petrochenkov
2018-08-30introduce Guard enumF001-1/+5
2018-08-19Rename `Catch` variants to `TryBlock`Scott McMurray-1/+1
(Not `Try` since `QuestionMark` is using that.)
2018-07-18Implement existential typesOliver Schneider-0/+7
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-1/+1