summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-08-23Fix tests and falloutAlex Crichton-1/+1
2017-08-23Ensure that generic arguments don't end up in attribute paths.Jeffrey Seyfried-1/+7
2017-08-17Some tidying up around include!Nick Cameron-5/+6
2017-08-13Auto merge of #43831 - alexcrichton:beta-next, r=alexcrichtonbors-5/+12
Backporting accepted PRs to beta Backport of: * https://github.com/rust-lang/rust/pull/43735 * https://github.com/rust-lang/rust/pull/43546 * https://github.com/rust-lang/rust/pull/43513 * https://github.com/rust-lang/rust/pull/43373 * https://github.com/rust-lang/rust/pull/43315
2017-08-13syntax: avoid loading the same source-file multiple timesAriel Ben-Yehuda-2/+3
We already had a cache for file contents, but we read the source-file before testing the cache, causing obvious slowness, so this just avoids loading the source-file when the cache already has the contents.
2017-08-12Stabilize the `compile_error_macro` featureAlex Crichton-5/+2
Stabilizes: * `compile_error!` as a macro defined by rustc Closes #40872
2017-08-12Add a feature gateest31-0/+10
@alexcrichton figured out a way how to do it :)
2017-07-17Change some helps to suggestionsOliver Schneider-2/+2
2017-07-15Auto merge of #43224 - jseyfried:fix_macro_idents_regression, r=nrcbors-1/+2
macros: fix regression involving identifiers in `macro_rules!` patterns. Fixes #42019. r? @nrc
2017-07-15Auto merge of #43185 - durka:thread-local-pub-restricted, r=alexcrichtonbors-8/+19
support pub(restricted) in thread_local! (round 2) Resurrected #40984 now that the issue blocking it was fixed. Original description: `pub(restricted)` was stabilized in #40556 so let's go! Here is a [playground](https://play.rust-lang.org/?gist=f55f32f164a6ed18c219fec8f8293b98&version=nightly&backtrace=1). I changed the interface of `__thread_local_inner!`, which is supposedly unstable but this is not checked for macros (#34097 cc @petrochenkov @jseyfried), so this may be an issue.
2017-07-13Fix regression involving identifiers in `macro_rules!` patterns.Jeffrey Seyfried-1/+2
2017-07-11let #[allow_internal_unstable] cover :visAlex Burka-8/+19
2017-07-11Make a few functions non-publicMark Simulacrum-9/+4
2017-07-11Refactor cur_cmnt_and_lit away.Mark Simulacrum-46/+38
The literal index was increased in only next_lit, so it isn't necessary: code now uses an iterator. The cur_cmnt field is also moved to be increased in print_comment instead of after each call to print_comment.
2017-07-11Refactor methods onto Printer struct.Mark Simulacrum-322/+315
No (intentional) changes to behavior. This is intended to avoid the anti-pattern of having to import individual methods throughout code.
2017-07-11Auto merge of #42913 - kennytm:fix-40569-ident-without-backtrack, r=jseyfriedbors-4/+70
Only match a fragment specifier the if it starts with certain tokens. When trying to match a fragment specifier, we first predict whether the current token can be matched at all. If it cannot be matched, don't bother to push the Earley item to `bb_eis`. This can fix a lot of issues which otherwise requires full backtracking (#42838). In this PR the prediction treatment is not done for `:item`, `:stmt` and `:tt`, but it could be expanded in the future. Fixes #24189. Fixes #26444. Fixes #27832. Fixes #34030. Fixes #35650. Fixes #39964. Fixes the 4th comment in #40569. Fixes the issue blocking #40984.
2017-07-10Auto merge of #43109 - pnkfelix:fix-link_args-gate, r=nikomatsakisbors-7/+6
Fix feature gate for `#[link_args(..)]` attribute Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute. See also #29596 and #43106
2017-07-10Fix feature gate for `#[link_args(..)]` attribute so that it will fireFelix S. Klock II-7/+6
regardless of context of attribute. Extend the gating test to include the attribute in "weird" places.
2017-07-10Store all generic arguments for method calls in ASTVadim Petrochenkov-58/+36
2017-07-08Auto merge of #43097 - PlasmaPower:large-align, r=eddybbors-5/+5
Raise alignment limit from 2^15 to 2^31 - 1 Fixes #42960
2017-07-08Auto merge of #43019 - kevinmehall:cleanup-errors, r=nikomatsakisbors-1/+0
Remove unused code from librustc_errors While extracting librustc_errors into a [reusable library](https://github.com/kevinmehall/codemap-diagnostic), I noticed some obsolete code that the `dead_code` warning missed because it was marked `pub` but not used elsewhere.
2017-07-08Lower alignment limit down to 2^31 - 1 (from LLVM)Lee Bousfield-3/+3
2017-07-08Raised alignment limit from 2^15 to 2^31Lee Bousfield-5/+5
2017-07-07Auto merge of #42809 - seanmonstar:stable-associated-consts, r=nikomatsakisbors-14/+3
remove associated_consts feature gate Currently struggling to run tests locally (something about jemalloc target missing). cc #29646
2017-07-07syntax: Apply recovery for casts to type ascriptionVadim Petrochenkov-46/+53
Fix spans, add some comments
2017-07-07Fix spans for binary operator expression with interpolated identifiersVadim Petrochenkov-5/+12
2017-07-07Only match a fragment specifier the if it starts with certain tokens.kennytm-4/+70
Fixes #24189. Fixes #26444. Fixes #27832. Fixes #34030. Fixes #35650. Fixes #39964. Fixes the 4th comment in #40569. Fixes the issue blocking #40984.
2017-07-06Remove unused code from librustc_errorsKevin Mehall-1/+0
2017-07-06Only underline suggestion if it is not the only code being shownEsteban Küber-1/+1
2017-07-06Add extra whitespace for suggestionsEsteban Küber-4/+4
2017-07-06remove associated_consts feature gateSean McArthur-14/+3
2017-07-06Disallow `$($v:vis)*`. Fix #42755.kennytm-0/+1
2017-07-06Auto merge of #42727 - alexcrichton:allocators-new, r=eddybbors-7/+23
rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-7/+23
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-59/+75
2017-07-02Output line column info when panickingest31-5/+6
2017-06-29Auto merge of #42902 - petrochenkov:keydcrate, r=jseyfriedbors-50/+41
Make `$crate` a keyword Fixes https://github.com/rust-lang/rust/issues/42898 r? @jseyfried or @nrc
2017-06-29Give a tracking-issue number for unsized tuple coercion.Masaki Hara-1/+1
2017-06-29Move unsized_tuple_coercion behind a feature gate.Masaki Hara-0/+6
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-42/+33
2017-06-29Make `$crate` a keywordVadim Petrochenkov-8/+8
2017-06-29Rollup merge of #42886 - durka:pplmm-mwe, r=petrochenkovAriel Ben-Yehuda-1/+3
syntax: allow negative integer literal expression to be interpolated as pattern Fixes #42820. r? @jseyfried
2017-06-27syntax: allow negative integer literal expression to be interpolated as patternAlex Burka-1/+3
2017-06-26Update and fix a few testsAlex Crichton-2/+2
2017-06-26Address review comments.Jeffrey Seyfried-17/+39
2017-06-26Add `LazyTokenStream`.Jeffrey Seyfried-80/+122
2017-06-26Implement `quote!` and other `proc_macro` API.Jeffrey Seyfried-41/+245
2017-06-26Clean up `tokenstream::Cursor` and `proc_macro`.Jeffrey Seyfried-27/+27
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-118/+109
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-06-24Add a feature gate for the `#[allow_fail]` attributePaul Woolcock-1/+8