about summary refs log tree commit diff
path: root/src/libsyntax/ext/build.rs
AgeCommit message (Collapse)AuthorLines
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-6/+6
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-1/+1
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-1/+1
2019-08-14Rollup merge of #63543 - c410-f3r:variant, r=c410-f3rMazdak Farrokhzad-8/+8
Merge Variant and Variant_ Extracted from #63468.
2019-08-14Merge Variant and Variant_Caio-8/+8
2019-08-13Add NodeId for Arm, Field and FieldPatCaio-0/+2
2019-08-10resolve: Remove remaining special cases from built-in macrosVadim Petrochenkov-1/+1
2019-08-05Drop explicit span argument from mk_name_value_itemMark Rousskov-2/+1
2019-08-05Drop span argument from mk_list_itemMark Rousskov-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-1/+1
2019-07-31Use Ident::new over setting span position via builderMark Rousskov-4/+4
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-399/+130
2019-07-31Remove span argument from mk_attr_{inner,outer}Mark Rousskov-1/+1
Always the same as the passed MetaItem
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-3/+3
MetaItem.span was always equivalent
2019-07-31Remove AttrId from Attribute constructorsMark Rousskov-1/+1
2019-07-31Unify spanned and non-spanned Attribute ctorsMark Rousskov-1/+1
There is no difference in the code/arguments, so go with the shorter name throughout the code.
2019-07-28Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasperMazdak Farrokhzad-0/+1
Lint attributes on function arguments Fixes #61238. cc #60406
2019-07-28Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.Mazdak Farrokhzad-2/+2
2019-07-27Lint attributes on function argumentsCaio-0/+1
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-06-09Allow attributes in formal function parametersCaio-2/+3
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-8/+8
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-18/+15
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-5/+1
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-27Pass symbols to `ExtCtxt::std_path` instead of strings.Nicholas Nethercote-24/+14
Because this function is hot. Also remove the dead `ty_option` function.
2019-05-23Auto merge of #60174 - matthewjasper:add-match-arm-scopes, r=pnkfelixbors-1/+2
Add match arm scopes and other scope fixes * Add drop and lint scopes for match arms. * Lint attributes are now respected on match arms. * Make sure we emit a StorageDead if we diverge when initializing a temporary. * Adjust MIR pretty printing of scopes for locals. * Don't generate duplicate lint scopes for `let statements`. * Add some previously missing fake borrows for matches. closes #46525 cc @rust-lang/compiler
2019-05-22Eliminate unnecessary `Ident::with_empty_ctxt`sVadim Petrochenkov-1/+1
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-3/+3
2019-05-21Give match arms an HirId and a SpanMatthew Jasper-1/+2
2019-05-11Simplify conversions between tokens and semantic literalsVadim Petrochenkov-6/+5
2019-05-11Keep the original token in `ast::Lit`Vadim Petrochenkov-2/+4
2019-05-11Turn `ast::Lit` into a structVadim Petrochenkov-5/+5
2019-04-21Introduce `ArgSource` for diagnostics.David Wood-1/+2
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-21Introduce `LocalSource` into the AST.David Wood-0/+3
This will be used to keep track of the origin of a local in the AST. In particular, it will be used by `async fn` lowering for the locals in `let <pat>: <ty> = __arg0;` statements.
2019-03-24Separate variant id and variant constructor id.David Wood-0/+1
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
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-27Rename variadic to c_variadicDan Robertson-1/+1
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-1/+1
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-20remove a bit of dead codeAleksey Kladov-6/+0
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-02-07Support const generics in derivevarkor-1/+19
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07libsyntax => 2018Taiki Endo-9/+10
2018-12-27Get rid of `Block::recovered`Vadim Petrochenkov-1/+0
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-04Address review commentsVadim Petrochenkov-9/+7
2018-12-04syntax: Rename some keywordsVadim Petrochenkov-1/+1
`CrateRoot` -> `PathRoot`, `::` doesn't necessarily mean crate root now `SelfValue` -> `SelfLower`, `SelfType` -> `SelfUpper`, both `self` and `Self` can be used in type and value namespaces now
2018-11-08Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.Nicholas Nethercote-1/+1
Because it results in fewer allocations and small speedups on some benchmarks.
2018-10-26Give each PathSegment a NodeIdNick Cameron-2/+6
2018-09-10Track whether module declarations are inline (fixes #12590)Tinco Andringa-0/+1
2018-08-19mv codemap() source_map()Donato Sciarra-1/+1