rust/config_proc_macro/src
Yacin Tmimi a21f1b6c2a Conditionally compile tests based on CFG_RELEASE_CHANNEL env var
Adds the ``nightly_only_test`` and ``stable_only_test`` attribute macros
that prevent or allow certain tests to compile on nightly and stable
respectively. This is achieved through conditionally outputting the
tests TokenStream.

If CFG_RELEASE_CHANNEL is not set, it's assumed that we're running in a
nightly environment.

To mark a test as nightly only:

    #[nightly_only_test]
    #[test]
    fn only_run_on_nightly() {
        ...
    }

To mark a test a stable only:

    #[stable_only_test]
    #[test]
    fn only_run_on_stable() {
        ...
    }
2021-11-27 17:36:18 -06:00
..
attrs.rs Update deps (#3788) 2019-09-08 23:33:21 +09:00
config_type.rs Add doc comment 2019-04-27 18:56:04 +09:00
item_enum.rs Add --config command line option (#3767) 2019-09-05 11:15:19 +09:00
item_struct.rs
lib.rs Conditionally compile tests based on CFG_RELEASE_CHANNEL env var 2021-11-27 17:36:18 -06:00
utils.rs refactor: move env/osstr imports to avoid warnings 2020-10-04 16:58:34 -05:00