summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-02-08sanitizer supportJorge Aparicio-0/+10
2017-02-08Rollup merge of #39557 - bjorn3:pp-docs, r=jseyfriedCorey Farwell-78/+89
A few documentation improvements for `syntax::print::pp` * Moved algorithm explanation to module docs * Added ``` before and after the examples * Explanation of the `rbox`, `ibox` and `cbox` names * Added docs about the breaking types to `Breaks`
2017-02-08Stabilize static in constest31-3/+2
Closes #35897.
2017-02-07Change deprecation warning to indicate custom derive support was removed ↵Jordi Polo-4/+3
from the current compiler version
2017-02-06A few documentation improvements for `syntax::print::pp`bjorn3-78/+89
* Moved algorithm explanation to module docs * Added ``` before and after the examples * Explanation of the `rbox`, `ibox` and `cbox` names * Added docs about the breaking types to `Breaks`
2017-02-05Rollup merge of #39552 - ↵Corey Farwell-1/+1
zackmdavis:more_struct_aliases_stabilization_version, r=petrochenkov correct version in which more_struct_aliases was/will be stable The stabilizing commit is 5056a437, which is not in 1.14, but is (at time of writing) on the 1.16 beta branch. [See discussion](https://github.com/rust-lang/rust/pull/39282#discussion_r99481687).
2017-02-05Rollup merge of #39454 - abonander:proc_macro_tracking_issue, r=jseyfriedCorey Farwell-1/+1
Change tracking issue for `proc_macro` feature to #38356 r? @jseyfried
2017-02-05Rollup merge of #39453 - nrc:save-path, r=nikomatsakisCorey Farwell-0/+1
save-analysis: be more paranoid about generated paths fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-02-05Rollup merge of #39442 - keeperofdakeys:expand-derives, r=jseyfriedCorey Farwell-12/+345
Expand derive macros in the MacroExpander This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver. Fixes https://github.com/rust-lang/rust/issues/39326 r? @jseyfried
2017-02-04correct version in which more_struct_aliases was/will be stableZack M. Davis-1/+1
The stabilizing commit is 5056a437, which is not in 1.14, but is (at time of writing) on the 1.16 beta branch.
2017-02-05Move derive macro expansion into the MacroExpanderJosh Driver-8/+331
This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
2017-02-05Rename CustomDerive to ProcMacroDerive for macros 1.1Josh Driver-3/+7
2017-02-05Make builtin derives a SyntaxExtensionJosh Driver-3/+9
This allows builtin derives to be registered and resolved, just like other derive types.
2017-02-04Auto merge of #38426 - vadimcn:nobundle, r=alexcrichtonbors-0/+3
Implement kind="static-nobundle" (RFC 1717) This implements the "static-nobundle" library kind (last item from #37403). Rustc handles "static-nobundle" libs very similarly to dylibs, except that on Windows, uses of their symbols do not get marked with "dllimport". Which is the whole point of this feature.
2017-02-04Auto merge of #36320 - GuillaumeGomez:rustdoc_test_info, r=alexcrichtonbors-10/+13
Add information in case of markdown block code test failure r? @steveklabnik cc @jonathandturner
2017-02-03Bump version, upgrade bootstrapAlex Crichton-13/+1
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-10/+13
2017-02-02Rollup merge of #39420 - oli-obk:sugg, r=pnkfelixGuillaume Gomez-4/+23
parser: use suggestions instead of helps with code in them
2017-02-01Change tracking issue for `proc_macro` feature to #38356Austin Bonander-1/+1
2017-02-02save-analysis: be more paranoid about generated pathsNick Cameron-0/+1
fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-01-31use suggestions instead of helps with code in themOliver Schneider-4/+23
2017-01-29Fix the falloutVadim Petrochenkov-10/+9
2017-01-28Auto merge of #39360 - osa1:typos, r=GuillaumeGomezbors-1/+1
Fix typos in libsyntax/tokenstream.rs
2017-01-28Fix typos in libsyntax/tokenstream.rsÖmer Sinan Ağacan-1/+1
2017-01-27Rollup merge of #39335 - cramertj:cramertj/can_begin_expr_fix, r=petrochenkovAlex Crichton-1/+23
Fix can_begin_expr keyword behavior Partial fix for #28784.
2017-01-27Auto merge of #39282 - petrochenkov:selfstab, r=nikomatsakisbors-4/+2
Stabilize Self and associated types in struct expressions and patterns Rebase of https://github.com/rust-lang/rust/pull/37734 Closes https://github.com/rust-lang/rust/issues/37544 r? @nikomatsakis
2017-01-26Fix can_begin_expr keyword behaviorTaylor Cramer-1/+23
2017-01-27Auto merge of #39158 - petrochenkov:bounds, r=nikomatsakisbors-433/+300
Bounds parsing refactoring 2 See https://github.com/rust-lang/rust/pull/37511 for previous discussion. cc @matklad Relaxed parsing rules: - zero bounds after `:` are allowed in all contexts. - zero predicates are allowed after `where`. - trailing separator `,` is allowed after predicates in `where` clauses not followed by `{`. Other parsing rules: - trailing separator `+` is still allowed in all bound lists. Code is also cleaned up and tests added. I haven't touched parsing of trait object types yet, I'll do it later.
2017-01-26Better comments for FIXMEsVadim Petrochenkov-2/+2
2017-01-26Auto merge of #39075 - est31:remove_reflect, r=nikomatsakisbors-5/+1
Remove Reflect PR for removing the `Reflect` trait. Opened so that a crater run can be done for testing the impact: https://github.com/rust-lang/rust/issues/27749#issuecomment-272665163 Fixes #27749
2017-01-25Auto merge of #35712 - oli-obk:exclusive_range_patterns, r=nikomatsakisbors-22/+67
exclusive range patterns adds `..` patterns to the language under a feature gate (`exclusive_range_pattern`). This allows turning ``` rust match i { 0...9 => {}, 10...19 => {}, 20...29 => {}, _ => {} } ``` into ``` rust match i { 0..10 => {}, 10..20 => {}, 20..30 => {}, _ => {} } ```
2017-01-25Stabilize Self and associated types in struct expressions and patternsVadim Petrochenkov-4/+2
2017-01-24Remove Reflectest31-5/+1
* Remove the Reflect trait * Remove the "reflect" lang feature
2017-01-24parser: Permit trailing +'s in bound listsVadim Petrochenkov-11/+3
2017-01-24Improve some expected/found error messages from parserVadim Petrochenkov-12/+49
2017-01-24Refactor parsing of generic arguments/parameters and where clausesVadim Petrochenkov-433/+271
2017-01-24Auto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakisbors-0/+388
Fix multiple labels when some don't have message The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ----^^^^^^^---- | | | | | `b` is a good letter | ``` to ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ----^^^^^^^---- | | | `b` is a good letter ``` from ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ | | | | | | `a` is a good letter ``` to ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ `a` is a good letter ``` and from ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ | | | | | | ``` to ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ ``` r? @nikomatsakis cc @jonathandturner, @GuillaumeGomez, @nrc
2017-01-24Auto merge of #39173 - jseyfried:tokenstream, r=nrcbors-827/+219
Refactor `TokenStream` r? @nrc
2017-01-24Add an option to the parser so cfg'ed out modules can still be parsedNick Cameron-1/+5
2017-01-23Remove `open_span` and `close_span` from `Delimited`.Jeffrey Seyfried-47/+35
2017-01-22Refactor `TokenStream`.Jeffrey Seyfried-781/+185
2017-01-22Auto merge of #39060 - jseyfried:improve_unused, r=nrcbors-4/+0
Improve unused `extern crate` and unused `#[macro_use]` warnings This PR - adds `unused_imports` warnings for unused `#[macro_use] extern crate` macro imports, - improves `unused_extern_crates` warnings (avoids false negatives), and - removes unused `#[macro_use]` imports and unused `extern crate`s. r? @nrc
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-4/+0
2017-01-21syntax: remove abi::Os and abi::ArchitectureWang Xuerui-48/+0
They're long dead since the switch to flexible targets, but was not removed like their consumers were. Interesting they even got maintained by various porters out there! Technically [syntax-breaking] as they're public API, but since they're unused in the compiler, the potential breakage IMO should be minimal.
2017-01-20Fix multiple labels when some don't have messageEsteban Küber-0/+388
The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ----^^^^^^^---- | | | | | `b` is a good letter | ``` to ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ----^^^^^^^---- | | | `b` is a good letter ``` and from ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ | | | | | | `a` is a good letter ``` to ``` error: foo --> test.rs:3:6 | 3 | a { b { c } d } | ^^^^-------^^^^ `a` is a good letter ```
2017-01-20Rollup merge of #39179 - petrochenkov:objparen, r=eddybAlex Crichton-2/+9
Fix regression in parsing of trait object types Fixes https://github.com/rust-lang/rust/issues/39169 Accepting parens in this position is a regression itself, introduced in Rust 1.6 by https://github.com/rust-lang/rust/pull/29870, so I hope to revert this in my next bounds refactoring patch (possibly with a warning, crater run, etc). r? @eddyb
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-428/+339
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-20Rollup merge of #38842 - abonander:proc_macro_attribute, r=jseyfriedAlex Crichton-9/+88
Implement `#[proc_macro_attribute]` This implements `#[proc_macro_attribute]` as described in https://github.com/rust-lang/rfcs/pull/1566 The following major (hopefully non-breaking) changes are included: * Refactor `proc_macro::TokenStream` to use `syntax::tokenstream::TokenStream`. * `proc_macro::tokenstream::TokenStream` no longer emits newlines between items, this can be trivially restored if desired * `proc_macro::TokenStream::from_str` does not try to parse an item anymore, moved to `impl MultiItemModifier for CustomDerive` with more informative error message * Implement `#[proc_macro_attribute]`, which expects functions of the kind `fn(TokenStream, TokenStream) -> TokenStream` * Reactivated `#![feature(proc_macro)]` and gated `#[proc_macro_attribute]` under it * `#![feature(proc_macro)]` and `#![feature(custom_attribute)]` are mutually exclusive * adding `#![feature(proc_macro)]` makes the expansion pass assume that any attributes that are not built-in, or introduced by existing syntax extensions, are proc-macro attributes * Fix `feature_gate::find_lang_feature_issue()` to not use `unwrap()` * This change wasn't necessary for this PR, but it helped debugging a problem where I was using the wrong feature string. * Move "completed feature gate checking" pass to after "name resolution" pass * This was necessary for proper feature-gating of `#[proc_macro_attribute]` invocations when the `proc_macro` feature flag isn't set. Prototype/Litmus Test: [Implementation](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/src/lib.rs#L13) -- [Usage](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/examples/post_service.rs#L35)
2017-01-20Auto merge of #38955 - estebank:highlighted-diags, r=nikomatsakisbors-10/+10
Teach Diagnostics to highlight text Support styled `Diagnostic` output: <img width="469" alt="mismatched types error with colorized types in the note" src="https://cloud.githubusercontent.com/assets/1606434/21871227/93a84198-d815-11e6-88b1-0ede3c7e28ef.png"> Closes #37532 and #38901. r? @nikomatsakis CC @jonathandturner @nagisa @nrc
2017-01-19Feature gateVadim Chugunov-0/+3