1 // edition:2018 2 // aux-build:extern_macros.rs 3 // compile-flags:--test --test-args=--test-threads=1 4 // normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" 5 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" 6 // check-pass 7 8 //! ``` 9 //! assert_eq!(1 + 1, 2); 10 //! ``` 11 12 extern crate extern_macros as macros; 13 14 use macros::attrs_on_struct; 15 16 pub mod foo { 17 18 /// ``` 19 /// assert_eq!(1 + 1, 2); 20 /// ``` bar()21 pub fn bar() {} 22 } 23 24 attrs_on_struct! { 25 /// ``` 26 /// assert!(true); 27 /// ``` 28 } 29