about summary refs log tree commit diff
path: root/tests/ui/proc-macro
AgeCommit message (Collapse)AuthorLines
2023-06-10Auto merge of #112452 - MU001999:fix/issue-112439, r=petrochenkovbors-4/+8
Make "consider importing" consistent for macros Fixes #112439
2023-06-10Make "consider importing" consistent for macrosMu001999-4/+8
2023-06-05Don't mention already set fieldsMichael Goulet-1/+1
2023-04-24Rollup merge of #110255 - clubby789:proc-macro-test-help, r=jackh726Matthias Krüger-0/+26
Suggest using integration tests for test crate using own proc-macro cc #110247
2023-04-17Suggest using integration tests for proc-macrosclubby789-0/+26
2023-04-15Add some reasons why tests are ignored.Eric Huss-6/+6
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-4/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-4/+8
2023-04-12Rollup merge of #110153 - DaniPopes:compiler-typos, r=NilstriebMatthias Krüger-4/+4
Fix typos in compiler I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory. Refs #110150
2023-04-10Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwcobors-0/+16
Add suggestion to remove `derive()` if invoked macro is non-derive Adds to the existing `expected derive macro, found {}` error message: ``` help: remove the surrounding "derive()": --> $DIR/macro-path-prelude-fail-4.rs:1:3 | LL | #[derive(inline)] | ^^^^^^^ ^ ``` This suggestion will either fix the issue, in the case that the macro was valid, or provide a better error message if not Not ready for merge yet, as the highlighted span is only valid for trivial formatting. Is there a nice way to get the parent span of the macro path within `smart_resolve_macro_path`? Closes #109589
2023-04-10Fix typos in compilerDaniPopes-4/+4
2023-04-07Rewrite added diagnostics as translatableTom Martin-4/+4
Start messages with lowercase
2023-04-03remove invalid ignore-prettyPietro Albini-1/+0
2023-04-01BlessTom Martin-8/+12
2023-03-30Update non-derive macro error message to match suggestionTom Martin-12/+12
It's now split between two errors, one to remove the invalid derive macro and one suggesting adding a new non-derive macro
2023-03-26Add suggestion to remove derive() if invoked macro is non-deriveTom Martin-0/+12
2023-03-14Tighter spansMichael Goulet-18/+18
2023-03-14Simplify proc macro signature validity checkMichael Goulet-133/+125
2023-02-01Add proc-macro boilerplate to crt-static testJoseph Ryan-0/+3
2023-01-30Modify primary span label for E0308Esteban Küber-3/+3
The previous output was unintuitive to users.
2023-01-26Rollup merge of #106407 - mejrs:attr_check, r=compiler-errorsMatthias Krüger-16/+329
Improve proc macro attribute diagnostics Closes https://github.com/rust-lang/rust/issues/102923
2023-01-22Auto merge of #107133 - pnkfelix:revert-pr-84022-for-issue-106337, ↵bors-36/+100
r=Mark-Simulacrum Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error" This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36 aka PR #84022 I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-21Auto merge of #105924 - TimNN:ui-remap, r=Mark-Simulacrumbors-37/+36
Remap paths in UI tests by default If you think this needs further discussions / something RFC-like, please let me know the best forum for that. This PR runs UI tests with a remapped "src base" directory by default. Why? Because some UI tests currently depend on the length of the absolute path to the `src/test/ui` directory. Remapping makes the tests independent of the absolute path. The path to the source file (which is absolute on CI) is part of the type name of closures. `rustc` diagnostic output depends on the length of type names (long type names are truncated). So a long absolute path leads to long closure type names, which leads to truncation and changed diagnostics. (I initially tried just disabling type name truncation, but that made some error messages stupid long (thousands of characters, IIRC)). Additional changes: * All boolean `compiletest` directives now support explicit `no-` versions to disable them. * Adapt existing tests when necessary: * Disable remapping for individual tests that fail with it enabled (when there's no obvious alternative fix). * For tests that already check something remapping related switch to the new option unless we gain something significant by keeping the manual remap. Passed Windows CI in https://github.com/rust-lang/rust/actions/runs/3933100590
2023-01-20Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error"Felix S. Klock II-36/+100
This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36. I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-19Fix proc macro testsmejrs-19/+33
2023-01-17note -> helpMichael Goulet-12/+12
2023-01-16ui tests: Remap test base directory by default.Tim Neumann-37/+36
2023-01-14Rollup merge of #106816 - TimNN:rental-remap, r=oli-objYuki Okushi-0/+229
Update `rental` hack to work with remapped paths. This PR simply switches to an already-existing helper instead of hard-coding a specific enum variant. The new revision of the test fails without the other changes in this PR. Context: I'm exploring running UI tests with remapped paths by default in #105924 and the rental test was one of the ones that failed. This may also be useful in the context of https://github.com/rust-lang/rfcs/pull/3127 ("New rustc and Cargo options to allow path sanitisation by default").
2023-01-13Update `rental` hack to work with remapped paths.Tim Neumann-0/+229
2023-01-13Warn when using panic-strategy abort for proc-macro cratesLukas Wirth-0/+8
2023-01-12Address feedbackmejrs-3/+27
2023-01-12Improve proc macro attribute diagnosticsmejrs-16/+291
2023-01-11Note predicate span on ImplDerivedObligationMichael Goulet-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+18972