about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-07-27Make a lint insteadGuillaume Gomez-32/+7
2017-07-27Throw errors when doc comments are added where they're unusedGuillaume Gomez-5/+36
2017-07-27Auto merge of #43489 - petrochenkov:mutref, r=GuillaumeGomezbors-2/+12
Better diagnostics and recovery for `mut ref` in patterns Fixes https://github.com/rust-lang/rust/issues/43286 Supersedes https://github.com/rust-lang/rust/pull/43451 r? @GuillaumeGomez
2017-07-27Auto merge of #43477 - est31:master, r=alexcrichtonbors-1/+1
Switch to begin_panic again In https://github.com/rust-lang/rust/pull/42938 we made the compiler emit a call to begin_panic_new in order to pass column info to it. Now with stage0 updated (https://github.com/rust-lang/rust/pull/43320), we can safely change begin_panic and start emitting calls for it again.
2017-07-26Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturonbors-5/+2
Stabilize more APIs for the 1.20.0 release In addition to the few stabilizations that have already landed, this cleans up the remaining APIs that are in `final-comment-period` right now to be stable by the 1.20.0 release
2017-07-26Better diagnostics and recovery for `mut ref` in patternsVadim Petrochenkov-2/+12
2017-07-26Rollup merge of #43463 - nrc:catch-span, r=petrochenkovMark Simulacrum-1/+1
Fix the spans of catch blocks to include the `do`
2017-07-25Switch to begin_panic againest31-1/+1
In https://github.com/rust-lang/rust/pull/42938 we made the compiler emit a call to begin_panic_new in order to pass column info to it. Now with stage0 updated (https://github.com/rust-lang/rust/pull/43320), we can safely change begin_panic and start emitting calls for it again.
2017-07-25Stabilize the `compile_error_macro` featureAlex Crichton-5/+2
Stabilizes: * `compile_error!` as a macro defined by rustc Closes #40872
2017-07-25Fix the spans of catch blocks to include the `do`Nick Cameron-1/+1
2017-07-24Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-SimulacrumMark Simulacrum-0/+15
rustc: Add some build scripts for librustc crates This commit adds some "boilerplate" build scripts to librustc/libsyntax crates to declare dependencies on various environment variables that are configured throughout the build. Cargo recently gained the ability to depend on environment variables in build scripts which can help trigger recompilation of a crate. This should fix weird bugs where after you make a commit or a few days later you'll get weird "not built with the same compiler" errors hopefully.
2017-07-24Make the macro parser theory description more accuratePiotr Czarnecki-100/+102
2017-07-23Auto merge of #43096 - estebank:ascription-help, r=nikomatsakisbors-1/+16
Point at `:` when using it instead of `;` When triggering type ascription in such a way that we can infer a statement end was intended, add a suggestion for the change. Always point out the reason for the expectation of a type is due to type ascription. Fix #42057, #41928.
2017-07-23Auto merge of #43386 - oli-obk:suggestions, r=nikomatsakisbors-1/+1
Adjust new suggestions to the suggestion guidelines Addresses https://github.com/rust-lang/rust/pull/42033#discussion_r127694915 guidelines are https://github.com/rust-lang/rust/blob/master//src/librustc_errors/diagnostic.rs#L212-L224
2017-07-23Lambda expressions honor no struct literal restrictionAleksey Kladov-1/+4
2017-07-22rustc: Add some build scripts for librustc cratesAlex Crichton-0/+15
This commit adds some "boilerplate" build scripts to librustc/libsyntax crates to declare dependencies on various environment variables that are configured throughout the build. Cargo recently gained the ability to depend on environment variables in build scripts which can help trigger recompilation of a crate. This should fix weird bugs where after you make a commit or a few days later you'll get weird "not built with the same compiler" errors hopefully.
2017-07-22Auto merge of #43352 - estebank:macro-span-replacement, r=petrochenkovbors-7/+52
Use the macro structure spans instead of the invocation Fix #42104, CC #2887.
2017-07-21make JSON error byte position start at top of fileZack M. Davis-3/+2
The `hi` and `lo` offsets in a span are relative to a `CodeMap`, but this doesn't seem to be terribly useful for tool consumers who don't have the codemap, but might want the byte offset within an actual file? Resolves #35164.
2017-07-21Review commentsEsteban Küber-5/+6
2017-07-21Adjust new suggestions to the suggestion guidelinesOliver Schneider-1/+1
2017-07-20Use the macro structure spans instead of the invocationEsteban Küber-7/+51
2017-07-18Catch expression does not require semicolon to be a statementAleksey Kladov-1/+2
2017-07-18Unify rules about commas in match arms and semicolons in expressionsAleksey Kladov-10/+2
2017-07-17Add flag to hide code on inline suggestionsEsteban Küber-3/+3
Now there's a way to add suggestions that hide the suggested code when presented inline, to avoid weird wording when short code snippets are added at the end.
2017-07-17Change some helps to suggestionsOliver Schneider-2/+2
2017-07-16Point at `:` when using it instead of `;`Esteban Küber-1/+16
When triggering type ascription in such a way that we can infer a statement end was intended, add a suggestion for the change. Always point out the reason for the expectation of a type is due to type ascription.
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