about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-03-11Auto merge of #58021 - ishitatsuyuki:57667-fix, r=RalfJungbors-33/+6
Fix fallout from #57667
2019-03-09Rollup merge of #59045 - topecongiro:expose-new_sub_parser_from_file, r=CentrilMazdak Farrokhzad-1/+1
Expose new_sub_parser_from_file This function is useful when external tools like rustfmt want to parse internal files without parsing a whole crate. cc https://github.com/rust-lang/rustfmt/issues/3427.
2019-03-09Rollup merge of #58762 - petrochenkov:unwind, r=Mark-SimulacrumMazdak Farrokhzad-32/+18
Mention `unwind(aborts)` in diagnostics for `#[unwind]` Simplify input validation for `#[unwind]`, add tests cc https://github.com/rust-lang/rust/issues/58760 r? @Mark-Simulacrum
2019-03-09Expose new_sub_parser_from_filetopecongiro-1/+1
This function is useful when external tools like rustfmt want to parse internal files without parsing a whole crate.
2019-03-09Fix fallout from #57667ishitatsuyuki-33/+6
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-29/+33
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08Rollup merge of #58984 - estebank:multi-treat-err-as-bug, r=oli-obkPietro Albini-3/+3
Teach `-Z treat-err-as-bug` to take a number of errors to emit `-Z treat-err-as-bug` will cause `rustc` to panic after the first error is reported, like previously. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 2 errors have been reported. Fix #58983.
2019-03-08Rollup merge of #58961 - estebank:issue-58462, r=varkorPietro Albini-2/+2
On incorrect cfg literal/identifier, point at the right span CC #58462
2019-03-08Rollup merge of #58861 - estebank:fix-negative-traits, r=petrochenkovPietro Albini-24/+28
Expand where negative supertrait specific error is shown Fix #58857. r? @petrochenkov
2019-03-07Fix with_emitter callersEsteban Küber-2/+2
2019-03-06Make `-Z treat-err-as-bug` take a number of errors to be emittedEsteban Küber-1/+1
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 3 errors have been reported.
2019-03-06Rely on drop to emit unclosed delimsEsteban Küber-1/+0
2019-03-06Simplify codeEsteban Küber-24/+14
2019-03-06Always emit mismatched delim errors, never panicEsteban Küber-3/+2
2019-03-06Collect unclosed delimiters in parent parserEsteban Küber-4/+13
2019-03-06Emit missing unclosed delimiter errorsEsteban Küber-11/+15
2019-03-06Panic when unmatched delimiters aren't emittedEsteban Küber-1/+8
2019-03-06Emit unclosed delimiters during recoveryEsteban Küber-0/+1
2019-03-06Bail when encountering a second unexpected token in the same spanEsteban Küber-4/+10
2019-03-06Do not panic on missing close parenEsteban Küber-1/+3
Fix #58856.
2019-03-06Surround found token with `Esteban Küber-1/+1
2019-03-05On incorrect cfg literal/identifier, point at the right spanEsteban Küber-1/+1
2019-03-02Fix C-variadic function printingDan Robertson-3/+0
There is no longer a need to append the string `", ..."` to a functions args as `...` is parsed as an argument and will appear in the functions arguments.
2019-03-01Expand where negative supertrait specific error is shownEsteban Küber-24/+28
Fix #58857.
2019-02-28Auto merge of #57760 - dlrobertson:varargs1, r=alexregbors-67/+95
Support defining C compatible variadic functions ## Summary Add support for defining C compatible variadic functions in unsafe rust with `extern "C"` according to [RFC 2137]. ## Details ### Parsing When parsing a user defined function that is `unsafe` and `extern "C"` allow variadic signatures and inject a "spoofed" `VaList` in the new functions signature. This allows the user to interact with the variadic arguments via a `VaList` instead of manually using `va_start` and `va_end` (See [RFC 2137] for details). ### Codegen When running codegen for a variadic function, remove the "spoofed" `VaList` from the function signature and inject `va_start` when the arg local references are created for the function and `va_end` on return. ## TODO - [x] Get feedback on injecting `va_start/va_end` in MIR vs codegen - [x] Properly inject `va_end` - It seems like it should be possible to inject `va_end` on the `TerminatorKind::Return`. I just need to figure out how to get the `LocalRef` here. - [x] Properly call Rust defined C variadic functions in Rust - The spoofed `VaList` causes problems here. Related to: #44930 r? @ghost [RFC 2137]: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md
2019-02-27Rename variadic to c_variadicDan Robertson-29/+29
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-27Add c_variadic language feature itemDan Robertson-0/+12
2019-02-27Support defining C compatible variadic functionsDan Robertson-50/+66
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-27Rollup merge of #58761 - Mark-Simulacrum:add-feature-gate-unwind, r=CentrilMazdak Farrokhzad-2/+2
Add tracking issue for the unwind attribute cc https://github.com/rust-lang/rust/issues/58760
2019-02-27Rollup merge of #58748 - hellow554:scoped_tls, r=estebankMazdak Farrokhzad-1/+1
update scoped_tls to 1.0 scoped_tls has been updated to version 1.0 This PR will hopefully merge flawlessly :) This fixes, among others, https://github.com/alexcrichton/scoped-tls/issues/9 Note, that the nightly feature has been removed in https://github.com/alexcrichton/scoped-tls/commit/64bd7b84a1765fb72a32caed3c17c970bdc6ad57
2019-02-27Rollup merge of #58678 - doctorn:refuse-async-fn-2015-edition, r=varkorMazdak Farrokhzad-22/+46
Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves #58652 and also resolves #53714. r? @varkor
2019-02-27Rollup merge of #58630 - nnethercote:fix-fold_clobber, r=petrochenkovMazdak Farrokhzad-2/+10
Make `visit_clobber` panic-safe. Local measurements indicate the performance effect is negligible. r? @petrochenkov
2019-02-27Rollup merge of #58075 - asettouf:master, r=varkorMazdak Farrokhzad-6/+12
Fix for issue #58050 Hi, a quick PR to mention in the compiler error message that `?` is a macro operator, as according to issue #58050 It passed `python x.py test src/tools/tidy` locally, as well as the recommendation to run `/x.py test src/test/ui --stage 1 --bless`. Let me know if anything else is needed.
2019-02-27Mention `unwind(aborts)` in diagnostics for `#[unwind]`Vadim Petrochenkov-32/+18
Simplify input validation for `#[unwind]`, add tests
2019-02-26Add tracking issue for the unwind attribute.Mark Rousskov-2/+2
2019-02-26Changing error message to reflect changes with the 2018 editionAdonis-6/+12
Signed-off-by: Adonis <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr Co-Authored-By: asettouf <adonis.settouf@gmail.com> Update src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr Co-Authored-By: asettouf <adonis.settouf@gmail.com> Stabilize split_ascii_whitespace Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750 fix stabilization order of uniform_paths. hir: add HirId to main Hir nodes Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs` Fixes https://github.com/fortanix/rust-sgx/issues/88 Update src/libsyntax/ext/tt/quoted.rs Co-Authored-By: asettouf <adonis.settouf@gmail.com> Revert "Merge remote-tracking branch 'upstream/master'" This reverts commit 751f05bd155e2c55d4177fe8211df634faf3a644, reversing changes made to 545a3e62b0cb473108869a61b271bc589afb49da.
2019-02-26update scoped_tls to 1.0Marcel Hellwig-1/+1
2019-02-26Make `visit_clobber` panic-safe.Nicholas Nethercote-2/+10
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-11/+7
2019-02-25Restrict value in key-value attributes to literalsVadim Petrochenkov-5/+15
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-22/+46
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
2019-02-24Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichtonbors-0/+8
Implement unstable ffi_return_twice attribute This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633) r? @eddyb
2019-02-24Rollup merge of #57364 - hdhoang:33418_negative_bounds, r=estebankMazdak Farrokhzad-21/+59
Improve parsing diagnostic for negative supertrait bounds closes #33418 r? @estebank
2019-02-23Correct error messagegnzlbg-1/+1
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+8
2019-02-23Rollup merge of #58654 - estebank:underflow, r=nikomatsakisMazdak Farrokhzad-4/+8
Do not underflow after resetting unmatched braces count Fix #58638. r? @oli-obk
2019-02-23Rollup merge of #58526 - pmccarter:master, r=estebankMazdak Farrokhzad-9/+44
Special suggestion for illegal unicode curly quote pairs Fixes #58436 Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark. The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
2019-02-23Rollup merge of #58476 - nnethercote:rm-LazyTokenStream, r=petrochenkovMazdak Farrokhzad-215/+156
Remove `LazyTokenStream`. `LazyTokenStream` was added in #40939. Perhaps it was an effective optimization then, but no longer. This PR removes it, making the code both simpler and faster. r? @alexcrichton
2019-02-23Improve parsing diagnostic for negative supertrait boundsHoàng Đức Hiếu-21/+59
2019-02-22Do not underflow after resetting unmatched braces countEsteban Küber-4/+8
Fix #58638.