| 1 | Description: Disable doctest examples and trybuild tests needing actix-rt/trybuild |
| 2 | Author: Simon Quigley <[email protected]> |
| 3 | Forwarded: not-needed |
| 4 | --- a/src/lib.rs |
| 5 | +++ b/src/lib.rs |
| 6 | @@ -20,14 +20,6 @@ use syn::parse::Parser as _; |
| 7 | type AttributeArgs = syn::punctuated::Punctuated<syn::Meta, syn::Token![,]>; |
| 8 | |
| 9 | /// Marks async entry-point function to be executed by Actix system. |
| 10 | -/// |
| 11 | -/// # Examples |
| 12 | -/// ``` |
| 13 | -/// #[actix_rt::main] |
| 14 | -/// async fn main() { |
| 15 | -/// println!("Hello world"); |
| 16 | -/// } |
| 17 | -/// ``` |
| 18 | // #[allow(clippy::needless_doctest_main)] |
| 19 | // #[cfg(not(test))] // Work around for rust-lang/rust#62127 |
| 20 | #[proc_macro_attribute] |
| 21 | @@ -110,14 +102,6 @@ pub fn main(args: TokenStream, item: Tok |
| 22 | } |
| 23 | |
| 24 | /// Marks async test function to be executed in an Actix system. |
| 25 | -/// |
| 26 | -/// # Examples |
| 27 | -/// ``` |
| 28 | -/// #[actix_rt::test] |
| 29 | -/// async fn my_test() { |
| 30 | -/// assert!(true); |
| 31 | -/// } |
| 32 | -/// ``` |
| 33 | #[proc_macro_attribute] |
| 34 | pub fn test(args: TokenStream, item: TokenStream) -> TokenStream { |
| 35 | let mut input = match syn::parse::<syn::ItemFn>(item.clone()) { |
| 36 | --- a/tests/trybuild.rs |
| 37 | +++ /dev/null |
| 38 | @@ -1,19 +0,0 @@ |
| 39 | -#[rustversion::stable(1.65)] // MSRV |
| 40 | -#[test] |
| 41 | -fn compile_macros() { |
| 42 | - let t = trybuild::TestCases::new(); |
| 43 | - |
| 44 | - t.pass("tests/trybuild/main-01-basic.rs"); |
| 45 | - t.compile_fail("tests/trybuild/main-02-only-async.rs"); |
| 46 | - t.pass("tests/trybuild/main-03-fn-params.rs"); |
| 47 | - t.pass("tests/trybuild/main-04-system-path.rs"); |
| 48 | - t.compile_fail("tests/trybuild/main-05-system-expect-path.rs"); |
| 49 | - t.compile_fail("tests/trybuild/main-06-unknown-attr.rs"); |
| 50 | - |
| 51 | - t.pass("tests/trybuild/test-01-basic.rs"); |
| 52 | - t.pass("tests/trybuild/test-02-keep-attrs.rs"); |
| 53 | - t.compile_fail("tests/trybuild/test-03-only-async.rs"); |
| 54 | - t.pass("tests/trybuild/test-04-system-path.rs"); |
| 55 | - t.compile_fail("tests/trybuild/test-05-system-expect-path.rs"); |
| 56 | - t.compile_fail("tests/trybuild/test-06-unknown-attr.rs"); |
| 57 | -} |