diff --git a/CMakeLists.txt b/CMakeLists.txt index f75d8762..f3c7c5a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,13 @@ add_custom_target("check-libcc2rs" USES_TERMINAL ) +add_custom_target("check-libcc2rs-macros" + COMMAND cargo +${RUST_STABLE_VERSION} test + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/libcc2rs-macros" + DEPENDS "${RUST_STAMP_FILE}" + USES_TERMINAL + ) + add_custom_target("check-unit" COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" @@ -148,7 +155,7 @@ add_custom_target("check-benchmarks" ) add_custom_target("check" - DEPENDS check-libcc2rs check-unit + DEPENDS check-libcc2rs check-libcc2rs-macros check-unit ) add_custom_target("check-all" diff --git a/libcc2rs-macros/tests/ui/forbidden.stderr b/libcc2rs-macros/tests/ui/forbidden.stderr index e7e084a8..73f25c75 100644 --- a/libcc2rs-macros/tests/ui/forbidden.stderr +++ b/libcc2rs-macros/tests/ui/forbidden.stderr @@ -1,18 +1,18 @@ error: goto!() can only be used inside goto_block! - --> tests/ui/forbidden.rs:22:5 + --> tests/ui/forbidden.rs:18:5 | -22 | goto!('nowhere); +18 | goto!('nowhere); | ^^^^^^^^^^^^^^^ | = note: this error originates in the macro `goto` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0268]: `continue` outside of a loop - --> tests/ui/forbidden.rs:13:5 + --> tests/ui/forbidden.rs:9:5 | -13 | / switch!(match 0 { -14 | | 0 => { v = 1; continue; } -15 | | _ => { v = 2; } -16 | | }); + 9 | / switch!(match 0 { +10 | | 0 => { v = 1; continue; } +11 | | _ => { v = 2; } +12 | | }); | |______^ cannot `continue` outside of a loop | = note: this error originates in the macro `switch` (in Nightly builds, run with -Z macro-backtrace for more info)