summary refs log tree commit diff
path: root/src/test/ui/proc-macro
AgeCommit message (Collapse)AuthorLines
2020-05-31Add a test for `$:ident` in proc macro inputVadim Petrochenkov-0/+94
2020-05-31test-macros: Avoid always producing errors in `#[derive(Print)]`Vadim Petrochenkov-33/+5
2020-05-29Revert "Add test for macro_rules! invoking a proc-macro with capture groups"Aaron Hill-30/+0
This reverts commit 30c00fd26a24f349df64a7c0f5c3490e9f624322.
2020-05-24Collect tokens for `ast::Expr`Aaron Hill-0/+30
2020-05-22Add test for macro_rules! invoking a proc-macro with capture groupsAaron Hill-0/+30
2020-05-20Fix testsAaron Hill-1/+1
2020-05-19Use a fixed-point iteration when breaking tokensAaron Hill-18/+37
Some tokens need to be broken in a loop until we reach 'unbreakable' tokens.
2020-05-19Break tokens before checking if they are 'probably equal'Aaron Hill-0/+18
Fixes #68489 When checking two `TokenStreams` to see if they are 'probably equal', we ignore the `IsJoint` information associated with each `TokenTree`. However, the `IsJoint` information determines whether adjacent tokens will be 'glued' (if possible) when construction the `TokenStream` - e.g. `[Gt Gt]` can be 'glued' to `BinOp(Shr)`. Since we are ignoring the `IsJoint` information, 'glued' and 'unglued' tokens are equivalent for determining if two `TokenStreams` are 'probably equal'. Therefore, we need to 'unglue' all tokens in the stream to avoid false negatives (which cause us to throw out the cached tokens, losing span information).
2020-05-19Auto merge of #68717 - petrochenkov:stabexpat, r=varkorbors-154/+66
Stabilize fn-like proc macros in expression, pattern and statement positions I.e. all the positions in which stable `macro_rules` macros are supported. Depends on https://github.com/rust-lang/rust/pull/68716 ("Stabilize `Span::mixed_site`"). cc https://github.com/rust-lang/rust/issues/54727 cc https://github.com/rust-lang/rust/issues/54727#issuecomment-580647446 Stabilization report: https://github.com/rust-lang/rust/pull/68717#issuecomment-623197503.
2020-05-15Add test of proc_macro::TokenStream's DebugDavid Tolnay-0/+221
2020-05-07reword "possible candidate" import suggestionAndy Russell-7/+7
2020-05-05Ignore SGX on a few ui testsMohsen Zohrevandi-0/+1
2020-05-03Stabilize fn-like proc macros in expression, pattern and statement positionsVadim Petrochenkov-154/+66
2020-04-28Rollup merge of #71340 - Valloric:more-check-pass, r=nikomatsakisDylan DPC-1/+1
Moving more build-pass tests to check-pass One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277 --- <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/71340) <!-- Reviewable:end -->
2020-04-26Stabilize `Span::mixed_site`Vadim Petrochenkov-1/+0
2020-04-25Add a test for `Span::resolved_at` and `Span::located_at`Vadim Petrochenkov-0/+65
2020-04-23Moving more build-pass tests to check-passVal Markovic-1/+1
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-21proc_macro::is_available()David Tolnay-0/+31
2020-04-11rustc: Add a warning count upon completionRoccoDev-2/+6
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-43/+35
2020-03-24resolve: Remove `rustc_attrs` as a standalone feature gateVadim Petrochenkov-3/+74
Now it only gates specific built-in attributes
2020-03-24expand: address review commentsMazdak Farrokhzad-13/+14
2020-03-24defatalize ProcMacroDerive::expandMazdak Farrokhzad-13/+36
Also remove ExtCtxt::struct_span_fatal.
2020-03-24defatalize BangProcMacro::expandMazdak Farrokhzad-6/+25
2020-03-23Rollup merge of #70300 - aleksator:66636_reword_unused_variable_warning, ↵Mazdak Farrokhzad-1/+1
r=Dylan-DPC Reword unused variable warning Fixes #66636
2020-03-23Rollup merge of #70233 - petrochenkov:superproc, r=ecstatic-morseMazdak Farrokhzad-0/+39
resolve: Do not resolve visibilities on proc macro definitions twice Fixes https://github.com/rust-lang/rust/issues/68921
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-3/+3
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-23Reword unused variable warningAlex Tokarev-1/+1
2020-03-23resolve: Do not resolve visibilities on proc macro definitions twiceVadim Petrochenkov-0/+39
2020-03-23Rollup merge of #70227 - LeSeulArtichaut:typo-def, r=CentrilMazdak Farrokhzad-12/+8
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-22Add span label to primary error spanEsteban Küber-2/+2
2020-03-22proc_macro_harness: Use item header spans for errorsVadim Petrochenkov-26/+12
2020-03-21Add a test for out-of-line module passed through a proc macroVadim Petrochenkov-0/+13
2020-03-21Bless testsLeSeulArtichaut-12/+8
2020-03-18Rollup merge of #70075 - GuillaumeGomez:fix-repr-display, r=petrochenkovMazdak Farrokhzad-11/+11
Fix repr pretty display Fixes #70027. r? @varkor
2020-03-17Update pretty testsGuillaume Gomez-11/+11
2020-03-17Auto merge of #69519 - 12101111:remove-proc-macro-check, r=nagisabors-0/+16
Don't use static crt by default when build proc-macro Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically. For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320 I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues. Fix https://github.com/rust-lang/cargo/issues/7563
2020-03-17Ignore wasm3212101111-0/+1
2020-03-11fix expand-to-unstable testRalf Jung-1/+1
2020-03-10span-api-tests: leave FIXMEMazdak Farrokhzad-0/+2
2020-03-10--bless some testsMazdak Farrokhzad-135/+36
2020-03-10adjust span-api-tests.rsMazdak Farrokhzad-2/+2
2020-03-09run crt-static test on all target12101111-1/+0
2020-03-08override flags from compiletest12101111-1/+2
2020-03-03Remove trailing whitespace.12101111-1/+1
2020-03-03Only run this test on musl12101111-2/+2
2020-03-03Don't use static crt by default when build proc-macro.12101111-0/+15
2020-03-01Make `rustc_attrs` tracking issue NoneYuki Okushi-1/+0
2020-02-24syntax: Remove `Nt(Impl,Trait,Foreign)Item`Vadim Petrochenkov-0/+14