summary refs log tree commit diff
path: root/src/test/ui/macros
AgeCommit message (Collapse)AuthorLines
2020-04-17macro_rules: `NtLifetime` cannot start with an identifierVadim Petrochenkov-0/+13
2020-03-06Turn trailing tokens in `assert!()` into hard errorsLeSeulArtichaut-13/+7
2020-02-24parse: use `parse_item_common` in `parse_foreign_item`.Mazdak Farrokhzad-9/+10
2020-02-15fuse extern & associated item parsing up to defaultnessMazdak Farrokhzad-3/+3
2020-02-15Avoid calling `fn_sig` on closuresYuki Okushi-0/+40
2020-02-13parser: misc small item related improvements & cleanups.Mazdak Farrokhzad-10/+9
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-4/+64
2020-02-06rustc_errors: hide "in this macro invocation" when redundant, more explicitly.Eduard-Mihai Burtescu-4/+1
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-4/+4
2020-02-06Rollup merge of #68788 - Centril:unified-fn-bodies, r=petrochenkovDylan DPC-2/+2
Towards unified `fn` grammar Part of https://github.com/rust-lang/rust/pull/68728. - Syntactically, `fn` items in `extern { ... }` blocks can now have bodies (`fn foo() { ... }` as opposed to `fn foo();`). As above, we use semantic restrictions instead. - Syntactically, `fn` items in free contexts (directly in a file or a module) can now be without bodies (`fn foo();` as opposed to `fn foo() { ... }`. As above, we use semantic restrictions instead, including for non-ident parameter patterns. - We move towards unifying the `fn` front matter; this is fully realized in https://github.com/rust-lang/rust/pull/68728. r? @petrochenkov
2020-02-05`#![recursion_limit = "X"]`: note current crate name.Mazdak Farrokhzad-1/+1
2020-02-05parser: merge `fn` grammars wrt. bodies & headersMazdak Farrokhzad-2/+2
also refactor `FnKind` and `visit_assoc_item` visitors
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-5/+5
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-26rustc_span: move pretty syntax from macro_backtrace to ExpnKind::descr.Eduard-Mihai Burtescu-1/+1
2020-01-24Normalise notes with the/isvarkor-5/+5
2020-01-16resolve: Point at the private item definitions in privacy errorsVadim Petrochenkov-1/+8
2020-01-11Rollup merge of #68072 - JohnTitor:fix-macro-ice, r=petrochenkovMazdak Farrokhzad-0/+14
Fix ICE #68058 Fixes #68058 r? @petrochenkov
2020-01-11Fix test not to depend on environmentYuki Okushi-6/+5
2020-01-10Ignore platforms that can't point to stdEsteban Küber-4/+12
2020-01-10Use `def_span` to minimize definition span to first line when possibleEsteban Küber-11/+6
2020-01-10Point at the span for the definition of crate foreign ADTsEsteban Küber-2/+22
2020-01-10Fix ICE #68058Yuki Okushi-0/+15
2020-01-09Update testsVadim Petrochenkov-13/+48
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-5/+5
2019-12-08Rollup merge of #66325 - BartMassey:master, r=joshtriplettMazdak Farrokhzad-1/+1
Change unused_labels from allow to warn Fixes #66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
2019-11-26Bless ui tests for libcore reformatDavid Tolnay-2/+2
2019-11-25Tweak removed feature errorEsteban Küber-6/+2
2019-11-25Tweak duplicate matcher binding errorEsteban Küber-28/+12
2019-11-15Cleaned up unused labelsBart Massey-1/+1
Deleted unused labels from compiler and fixed or allowed unused labels in tests. This patch removes some gratuitous unused labels and turns off the warning for unused labels that are a necessary part of tests. This will permit setting the `unused_labels` lint to `warn`.
2019-11-14Fix ui tests with better error code usageGuillaume Gomez-0/+1
2019-11-10Make error and warning annotations mandatory in UI testsTomasz Miąsko-13/+3
This change makes error and warning annotations mandatory in UI tests. The only exception are tests that use error patterns to match compiler output and don't have any annotations.
2019-11-06Remove "here" from "expected one of X here"Esteban Küber-3/+3
2019-10-29Rollup merge of #65832 - tlively:emscripten-exception-handling, r=alexcrichtonTyler Mandry-1/+1
Re-enable Emscripten's exception handling support Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests. r? @alexcrichton
2019-10-28Rollup merge of #65640 - estebank:recover-missing-semi, r=CentrilMazdak Farrokhzad-2/+2
Use heuristics to recover parsing of missing `;` - Detect `,` and `:` typos where `;` was intended. - When the next token could have been the start of a new statement, detect a missing semicolon. Fix #48160, fix #44767 (after adding note about statements).
2019-10-28review commentsEsteban Küber-1/+1
2019-10-28Tweak unexpected token wordingEsteban Küber-1/+1
2019-10-27Point at local similarly named element and tweak references to variantsEsteban Küber-2/+7
Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-1/+1
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+11
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-0/+2
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-15Stabilize proc macros generating `macro_rules` itemsVadim Petrochenkov-5/+4
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-2/+0
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-0/+2
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-01Rollup merge of #63931 - petrochenkov:stabmac, r=CentrilMazdak Farrokhzad-5/+18
Stabilize macros in some more positions - Fn-like macros and attribute macros in `extern` blocks - Fn-like procedural macros in type positions - ~Attribute macros on inline modules~ (moved to https://github.com/rust-lang/rust/pull/64273) Stabilization report: https://github.com/rust-lang/rust/pull/63931#issuecomment-526362396. Closes https://github.com/rust-lang/rust/issues/49476 cc https://github.com/rust-lang/rust/issues/54727
2019-10-01Address review commentsVadim Petrochenkov-0/+11
2019-09-30syntax: Support modern attribute syntax in the `meta` matcherVadim Petrochenkov-6/+0
2019-09-30Stabilize macros in `extern` blocksVadim Petrochenkov-5/+18
Add some tests for macros in extern blocks, remove duplicate tests
2019-09-15resolve: Remove `!` from "cannot find" diagnostics for macrosVadim Petrochenkov-7/+7
2019-09-15resolve: Tweak "cannot find" wording for attributesVadim Petrochenkov-2/+2
2019-09-08Give method not found a primary span labelEsteban Küber-2/+2