about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
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
2018-06-27Generate the `NodeId` for `existential type` in the ASTOliver Schneider-1/+1
2018-06-21async await desugaring and testsTaylor Cramer-2/+5
2018-06-21Parse async fn header.Without Boats-7/+5
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20Fix additional commentsvarkor-1/+1
2018-06-20Make GenericBound explicitvarkor-6/+2
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-2/+2
2018-06-20Rename TraitTyParamBound to ParamBound::Traitvarkor-1/+1
2018-06-20Take advantage of the lifetime refactoringvarkor-8/+3
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-9/+9
2018-06-20Lift bounds into GenericParamvarkor-6/+5
2018-06-20Simply joint lifetime/type iterationvarkor-1/+1
2018-06-20Refactor counting methodsvarkor-2/+2
2018-06-20Rename structures in astvarkor-7/+7
2018-06-20Refactor ast::GenericParam as a structvarkor-9/+9
2018-06-20Refactor hir::GenericParam as a structvarkor-1/+3
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-7/+7
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Make method and variable names more consistentvarkor-3/+3
2018-06-20Rename "parameter" to "arg"varkor-6/+6
2018-06-20Rename PathParameter(s) to GenericArg(s)varkor-11/+16
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-2/+2
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-1/+2
2018-05-30rustc: don't visit lifetime parameters through visit_lifetime.Eduard-Mihai Burtescu-2/+2
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+4
2018-05-19rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded ↵Eduard-Mihai Burtescu-5/+10
constants".
2018-05-16label-break-value: Parsing and AST/HIR changesest31-1/+4
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-04-12AST/HIR: Merge field access expressions for named and numeric fieldsVadim Petrochenkov-3/+0
2018-04-06Remove more duplicated spansVadim Petrochenkov-20/+20
2018-04-06Rename `ast::Variant_::name` into `ident` + Fix rebaseVadim Petrochenkov-2/+2
2018-04-06Get rid of `SpannedIdent`Vadim Petrochenkov-5/+5
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-1/+1