about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2018-02-22begin crate-relative paths with `crate`Niko Matsakis-10/+9
2018-02-22support unit tests with return values that implement `Terminaton`Niko Matsakis-42/+129
Extend `Termination` trait with a method to determine what happens with a unit test. This commit incorporates work by Bastian Köcher <git@kchr.de>.
2018-02-23Fix parsing of extern paths in types and poly-traitsVadim Petrochenkov-1/+1
2018-02-22update tracking issue for nlltoidiu-1/+1
Point to the new tracing issue for nll
2018-02-20make `#[unwind]` attribute specify expectations more clearlyNiko Matsakis-1/+73
You can now choose between the following: - `#[unwind(allowed)]` - `#[unwind(aborts)]` Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though I think we should change this eventually.
2018-02-20stage0 cfg cleanupMark Simulacrum-1/+0
2018-02-19When encountering invalid token after `unsafe`, mention `{`Esteban Küber-0/+2
2018-02-18Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkorGuillaume Gomez-4/+4
fix more typos found by codespell.
2018-02-17Fix span bug.Jeffrey Seyfried-1/+1
2018-02-17fix more typos found by codespell.Matthias Krüger-4/+4
2018-02-18Fix up tests and typosSeiichi Uchida-2/+2
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-13/+13
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-68/+95
2018-02-18Add a span field to Visibility::RestrictedSeiichi Uchida-6/+15
This span covers the whole visibility expression: e.g. `pub (in path)`.
2018-02-18Add a closing parenthesis to the span of Visibility::CrateSeiichi Uchida-2/+3
2018-02-16Remove unneeded string allocationsAlex Crawford-4/+4
2018-02-14Rollup merge of #48167 - Mark-Simulacrum:remove-allocation-codemap, r=estebankkennytm-3/+5
Remove allocation from width of character function. Locally this seems to eliminate the problem or at least resolve most of the issue. Fixes #48153. r? @estebank
2018-02-14Rollup merge of #48154 - estebank:issue-31481, r=nikomatsakiskennytm-5/+16
Continue parsing function after finding `...` arg When encountering a variadic argument in a function definition that doesn't accept it, if immediately after there's a closing paren, continue parsing as normal. Otherwise keep current behavior of emitting error and stopping. Fix #31481.
2018-02-14Rollup merge of #48130 - ollie27:stab, r=Mark-Simulacrumkennytm-1/+1
Correct a few stability attributes * `core_float_bits`, `duration_core`, `path_component_asref`, and `repr_align` were stabalized in 1.25.0 not 1.24.0. * Impls for `NonNull` involving unstable things should remain unstable. * `Duration` should remain stable since 1.3.0 so it appears correctly in the `std` docs. * `cursor_mut_vec` is an impl on only stable things so should be marked stable.
2018-02-13Make nested impl Trait a hard errorTaylor Cramer-69/+1
2018-02-12Remove allocation from width of character function.Mark Simulacrum-3/+5
2018-02-11Continue parsing function after finding `...` argEsteban Küber-5/+16
When encountering a variadic argument in a function definition that doesn't accept it, if immediately after there's a closing paren, continue parsing as normal. Otherwise keep current behavior of emitting error and stopping.
2018-02-11Auto merge of #47752 - mark-i-m:at-most-once-rep, r=nikomatsakisbors-53/+177
Implement `?` macro repetition See rust-lang/rfcs#2298 (with disposition merge)
2018-02-10Correct a few stability attributesOliver Middleton-1/+1
2018-02-08Use the right tracking issueMark Mansi-3/+1
2018-02-08Fix span bug.Jeffrey Seyfried-5/+3
2018-02-08Add `rustc_args_required_const` to the feature whitelistAlex Crichton-0/+5
Unfortunately left out it means that when the `#![feature(proc_macro)]` flag is in effect it fails to find `rustc_args_required_const` for expansion. This version, however, is verified to work with stdsimd's requirements!
2018-02-07libsyntax/ext: trailing commas in builtin macrosMichael Lamparski-2/+4
Most notably this changes 'syntax::ext::base::get_single_str_from_tts' to accept a trailing comma, and revises the documentation so that this aspect is not surprising. I made this change under the understanding that this crate is private rustc implementation detail (I hope this is correct!). After reviewing all call sites, I believe the revised semantics are closer to the intended spirit of the function.
2018-02-07Rollup merge of #47613 - estebank:rustc_on_unimplemented, r=nikomatsakisManish Goregaokar-17/+14
Add filtering options to `rustc_on_unimplemented` - Add filtering options to `rustc_on_unimplemented` for local traits, filtering on `Self` and type arguments. - Add a way to provide custom notes. - Tweak binops text. - Add filter to detect wether `Self` is local or belongs to another crate. - Add filter to `Iterator` diagnostic for `&str`. Partly addresses #44755 with a different syntax, as a first approach. Fixes #46216, fixes #37522, CC #34297, #46806.
2018-02-05Stabilize use_nested_groupsPietro Albini-26/+2
2018-02-04Rollup merge of #47947 - goodmanjonathan:stabilize_match_beginning_vert, ↵kennytm-18/+4
r=petrochenkov Stabilize feature(match_beginning_vert) With this feature stabilized, match expressions can optionally have a `|` at the beginning of each arm. Reference PR: rust-lang-nursery/reference#231 Closes #44101
2018-02-03Auto merge of #47845 - Zoxc:gen-fixes, r=nikomatsakisbors-0/+1
Generator bugfixes r? @nikomatsakis
2018-02-02Rollup merge of #47914 - etaoins:improve-char-escape-in-lexer-msg, ↵kennytm-12/+19
r=petrochenkov Improve char escaping in lexer messages Currently ', " and \ are escaped as \', \" and \\ respectively. This leads to confusing messages such as `error: unknown start of token: \\` when encountering a single backslash. Fix by emitting printable ASCII characters directly. This will still escape \r, \n, \t and Unicode characters. Fixes #47902
2018-02-02Auto merge of #47465 - estebank:include-space-after-mut, r=nikomatsakisbors-2/+24
Include space in suggestion `mut` in bindings Fix #46614.
2018-02-01Fix test after rebaseEsteban Küber-5/+1
2018-02-01Remove support for `Self` in attributesEsteban Küber-7/+1
2018-02-01Fix testsEsteban Küber-1/+1
2018-02-01Rework `parse_ident_attr`Esteban Küber-25/+26
2018-02-01Add filtering options to `rustc_on_unimplemented`Esteban Küber-6/+12
- filter error on the evaluated value of `Self` - filter error on the evaluated value of the type arguments - add argument to include custom note in diagnostic - allow the parser to parse `Self` when processing attributes - add custom message to binops
2018-02-01Change offset to `0`Esteban Küber-1/+1
2018-02-01Auto merge of #47540 - Manishearth:suggestion, r=nrcbors-10/+36
Add approximate suggestions for rustfix This adds `span_approximate_suggestion()` that lets you emit a suggestion marked as "non-machine applicable" in the JSON output. UI users see no difference. This is for when rustc and clippy wish to emit suggestions which will make sense to the reader (e.g. they may have placeholders like `<type>`) but are not source-applicable, so that rustfix/etc can ignore these. fixes #39254
2018-02-01Improve char escaping in lexer messagesRyan Cumming-12/+19
Currently ', " and \ are escaped as \', \" and \\ respectively. This leads to confusing messages such as `error: unknown start of token: \\` when encountering a single backslash. Fix by emitting printable ASCII characters directly. This will still escape \r, \n, \t and Unicode characters. Fixes #47902
2018-01-31Auto merge of #45752 - estebank:highlight-primary, r=nikomatsakisbors-1/+3
Highlight code on diagnostics when underlined Highlight the label's span with the respective color: <img width="692" alt="" src="https://user-images.githubusercontent.com/1606434/32411026-a1842482-c18d-11e7-9933-6510eefbad19.png"> Fix #42112.
2018-01-30Update a few commentsMark Mansi-1/+4
2018-01-30stabilize match_beginning_vertJonathan Goodman-18/+4
2018-01-30Fix trailing whitespaceMark Mansi-1/+1
2018-01-30Improved tests + typo fixes + assertMark Mansi-0/+2
2018-01-30Add feature gate + testsMark Mansi-10/+76
2018-01-30Fix typo in error message + update testsMark Mansi-1/+1
2018-01-30Attempted fix for `?` kleene opMark Mansi-23/+21