about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-03-14Cleanup.Jeffrey Seyfried-12/+11
2017-03-12Rollup merge of #40369 - petrochenkov:segspan, r=eddybCorey Farwell-35/+52
Give spans to individual path segments in AST And use these spans in path resolution diagnostics. The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors. HIR still doesn't have spans. Fixes https://github.com/rust-lang/rust/pull/38927#discussion_r95336667 https://github.com/rust-lang/rust/pull/38890#issuecomment-271731008 r? @nrc @eddyb
2017-03-12Auto merge of #40340 - petrochenkov:restricted, r=nikomatsakisbors-32/+40
Update syntax for `pub(restricted)` Update the syntax before stabilization. cc https://github.com/rust-lang/rust/issues/32409 r? @nikomatsakis
2017-03-11Temporarily prefix catch block with do keywordTaylor Cramer-14/+7
2017-03-11Add catch expr to AST and disallow catch as a struct nameTaylor Cramer-1/+54
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-156/+89
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
2017-03-10Give spans to individual path segments in ASTVadim Petrochenkov-35/+52
2017-03-10Update syntax for `pub(restricted)`Vadim Petrochenkov-32/+40
2017-03-10Expect macro defs in save-analysis and add expn info to spans for attr proc ↵Nick Cameron-1/+13
macros
2017-03-10Avoid using `Mark` and `Invocation` for macro defs.Jeffrey Seyfried-23/+10
2017-03-10Move `resolve_invoc` from `syntax` to `resolve`.Jeffrey Seyfried-63/+11
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-81/+79
2017-03-08Rollup merge of #40258 - est31:master, r=nikomatsakisAriel Ben-Yehuda-2/+1
Fix description of closure coercion feature Thanks to @whitequark for pointing this out.
2017-03-04Inline function to avoid naming confusion.Mark Simulacrum-8/+6
2017-03-04Fix description of closure coercion featureest31-2/+1
2017-03-03Fix fallout in unit tests.Jeffrey Seyfried-44/+36
2017-03-03Fix `token::Eof` spans.Jeffrey Seyfried-2/+6
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-275/+247
2017-03-03Introduce `syntax::parse::parser::TokenCursor`.Jeffrey Seyfried-115/+173
2017-03-03Optimize `syntax::tokenstream::Cursor`.Jeffrey Seyfried-57/+59
2017-03-03Remove lifetime parameter from `syntax::tokenstream::Cursor`.Jeffrey Seyfried-28/+34
2017-03-02Auto merge of #40216 - frewsxcv:rollup, r=frewsxcvbors-7/+33
Rollup of 7 pull requests - Successful merges: #39832, #40104, #40110, #40117, #40129, #40139, #40166 - Failed merges:
2017-03-02Rollup merge of #40129 - abonander:proc_macro_bang, r=jseyfriedCorey Farwell-0/+5
Implement function-like procedural macros ( `#[proc_macro]`) Adds the `#[proc_macro]` attribute, which expects bare functions of the kind `fn(TokenStream) -> TokenStream`, which can be invoked like `my_macro!()`. cc rust-lang/rfcs#1913, #38356 r? @jseyfried cc @nrc
2017-03-02Rollup merge of #40110 - benschreiber:nostackcheck, r=brsonCorey Farwell-7/+19
Made no_stack_check a stable_removed attribute r? @brson
2017-03-02Add support for x86-interrupt calling conventionPhilipp Oppermann-0/+9
Tracking issue: https://github.com/rust-lang/rust/issues/40180 This calling convention can be used for definining interrupt handlers on 32-bit and 64-bit x86 targets. The compiler then uses `iret` instead of `ret` for returning and ensures that all registers are restored to their original values. Usage: ``` extern "x86-interrupt" fn handler(stack_frame: &ExceptionStackFrame) {…} ``` for interrupts and exceptions without error code and ``` extern "x86-interrupt" fn page_fault_handler(stack_frame: &ExceptionStackFrame, error_code: u64) {…} ``` for exceptions that push an error code (e.g., page faults or general protection faults). The programmer must ensure that the correct version is used for each interrupt. For more details see the [LLVM PR][1] and the corresponding [proposal][2]. [1]: https://reviews.llvm.org/D15567 [2]: http://lists.llvm.org/pipermail/cfe-dev/2015-September/045171.html
2017-03-02Auto merge of #39655 - durka:recursion-limit-suggestion, r=nikomatsakisbors-4/+10
suggest doubling recursion limit in more situations Fixes #38852. r? @bluss
2017-03-02note -> helpAlex Burka-1/+1
2017-02-28Implement function-like procedural macros ( `#[proc_macro]`)Austin Bonander-0/+5
2017-02-28Add warning cycle.Jeffrey Seyfried-11/+31
2017-02-28Refactor out `parser.expect_delimited_token_tree()`.Jeffrey Seyfried-36/+13
2017-02-28Merge `repeat_idx` and `repeat_len`.Jeffrey Seyfried-17/+15
2017-02-28Remove `Token::MatchNt`.Jeffrey Seyfried-73/+78
2017-02-28Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵Jeffrey Seyfried-426/+380
`tokenstream::TokenTree::Sequence`.
2017-02-28Avoid `Token::{OpenDelim, CloseDelim}`.Jeffrey Seyfried-17/+23
2017-02-28Remove `ext::tt::transcribe::tt_next_token`.Jeffrey Seyfried-149/+124
2017-02-28Clean up `ext::tt::transcribe::TtFrame`, rename to `Frame`.Jeffrey Seyfried-61/+88
2017-02-28Remove a `loop` in `ext::tt::transcribe`.Jeffrey Seyfried-32/+23
2017-02-28rustc_save_analysis: don't pollute the codemap with fake files.Eduard Burtescu-8/+38
2017-02-25removed unneeded comment blocksBen Schreiber-5/+0
2017-02-25teach rustc about remove_stable_features and removed no-stack-chech feature. ↵Ben Schreiber-7/+24
fixes #34915
2017-02-25rustc_typeck: hook up collect and item/body check to on-demand.Eduard-Mihai Burtescu-23/+0
2017-02-25rustc: store type parameter defaults outside of ty::Generics.Eduard-Mihai Burtescu-22/+27
2017-02-25Rollup merge of #40027 - cramertj:stabilize_static_recursion, r=nrcEduard-Mihai Burtescu-3/+2
Stabilize static_recursion Fix #29719.
2017-02-25Rollup merge of #40025 - est31:master, r=eddybEduard-Mihai Burtescu-0/+7
Implement non-capturing closure to fn coercion Implements non capturing closure coercion ([RFC 1558](https://github.com/rust-lang/rfcs/blob/master/text/1558-closure-to-fn-coercion.md)). cc tracking issue #39817
2017-02-25Rollup merge of #39953 - keeperofdakeys:macro-error, r=jseyfriedEduard-Mihai Burtescu-1/+1
Provide suggestions for unknown macros imported with `use` cc https://github.com/rust-lang/rust/issues/30197 r? @jseyfried
2017-02-23Feature gateest31-0/+7
2017-02-23Move MacroKind into Def::MacroJosh Driver-1/+1
2017-02-21Stabilize static_recursionTaylor Cramer-3/+2
2017-02-21Create "The Unstable Book"Steve Klabnik-2/+7
part of #39588
2017-02-21Add long error explanationsGuillaume Gomez-20/+85