about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2018-02-23Rollup merge of #48429 - toidiu:patch-1, r=nikomatsakisManish Goregaokar-1/+1
update tracking issue for nll Point to the new tracing issue for nll For reference https://github.com/rust-lang/rust/issues/44928
2018-02-23Rollup merge of #48083 - ↵Manish Goregaokar-5/+3
jseyfried:improve_tuple_struct_field_access_hygiene, r=petrochenkov Improve tuple struct field access hygiene Fixes #47312 by fixing a span bug. r? @nrc
2018-02-23Auto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkovbors-63/+100
Fix span of visibility This PR 1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`. 2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`. This PR is motivated by the bug found in rustfmt (https://github.com/rust-lang-nursery/rustfmt/issues/2398). The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
2018-02-22update tracking issue for nlltoidiu-1/+1
Point to the new tracing issue for nll
2018-02-20stage0 cfg cleanupMark Simulacrum-1/+0
2018-02-18Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkorGuillaume Gomez-4/+4
fix more typos found by codespell.
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-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-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
2018-01-30Run rustfmt on macro_parser.rsMark Mansi-4/+6
2018-01-30Run rustfmt on quoted.rsMark Mansi-10/+21
2018-01-30Update the macro parser to allow at most once repetitions for `?` KleeneMark Mansi-16/+22
2018-01-30Allow `?` as a KleeneOp in the macro parserMark Mansi-46/+84
2018-01-30The `static` keyword can now begin expressionsJohn Kåre Alsaker-0/+1