summary refs log tree commit diff
path: root/src/test/ui/macros
AgeCommit message (Collapse)AuthorLines
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+9
2020-04-04macro_rules: `NtLifetime` cannot start with an identifierVadim Petrochenkov-0/+13
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-16/+3
2020-03-27Rollup merge of #70434 - Centril:fix-34421, r=estebankMazdak Farrokhzad-0/+55
suggest `;` on expr `mac!()` which is good as stmt `mac!()` Fixes https://github.com/rust-lang/rust/issues/34421 by implementing @jseyfried's suggestion in https://github.com/rust-lang/rust/issues/34421#issuecomment-301578683. r? @petrochenkov
2020-03-27suggest semi on expr mac!() good as stmt mac!().Mazdak Farrokhzad-0/+55
2020-03-26Update tests to use llvm_asm!Amanieu d'Antras-8/+8
2020-03-24fix rebase fallout due to #69497.Mazdak Farrokhzad-10/+25
2020-03-24defatalize `compile_declarative_macro`Mazdak Farrokhzad-0/+22
2020-03-24mbe::transcribe: defatalize errors.Mazdak Farrokhzad-4/+33
2020-03-24generic_extension: defatalize Error caseMazdak Farrokhzad-5/+22
2020-03-24nix panictry! in ParserAnyMacro::makeMazdak Farrokhzad-1/+27
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-1/+1
Increase verbosity when suggesting subtle code changes Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion. Fix #69243.
2020-03-23Rollup merge of #70227 - LeSeulArtichaut:typo-def, r=CentrilMazdak Farrokhzad-6/+4
Only display definition when suggesting a typo Closes #70206 r? @Centril
2020-03-22Normalize wording of privacy access labelsEsteban Küber-1/+1
2020-03-21Bless testsLeSeulArtichaut-6/+4
2020-03-21Rollup merge of #69497 - Zoxc:ast-fragment-error, r=petrochenkovDylan DPC-2/+13
Don't unwind when hitting the macro expansion recursion limit This removes one use of `FatalError.raise()`. r? @petrochenkov
2020-03-20expand_include: set `.directory` to dir of included file.Mazdak Farrokhzad-0/+13
2020-03-19Update testJohn Kåre Alsaker-2/+13
2020-03-17Update pretty testsGuillaume Gomez-1/+1
2020-03-13Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrumbors-18/+17
Optimize catch_unwind to match C++ try/catch This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown. https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great. This PR, on the other hand, generates the following assembly: ```asm # -Cpanic=unwind: push rbx mov ebx,0x2a call QWORD PTR [rip+0x1c53c] # <happy> mov eax,ebx pop rbx ret mov rdi,rax call QWORD PTR [rip+0x1c537] # cleanup function call call QWORD PTR [rip+0x1c539] # <unfortunate> mov ebx,0xd mov eax,ebx pop rbx ret # -Cpanic=abort: push rax call QWORD PTR [rip+0x20a1] # <happy> mov eax,0x2a pop rcx ret ``` Fixes #64224, and resolves #64222.
2020-03-13Add test for issue-58490Yuki Okushi-0/+40
2020-03-10macros/unknown-builtin: use hack for musl problemsMazdak Farrokhzad-1/+6
2020-03-10--bless some testsMazdak Farrokhzad-3/+7
2020-03-06Turn trailing tokens in `assert!()` into hard errorsLeSeulArtichaut-13/+7
2020-03-05Remove eh_unwind_resume lang itemAmanieu d'Antras-18/+17
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