Skip to content

Commit 7cb6b7b

Browse files
committed
add test case for issue rust-lang#42008
1 parent 1c5e9c6 commit 7cb6b7b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//! Proc macro crate
2+
3+
// no-prefer-dynamic
4+
5+
#![deny(missing_docs)]
6+
#![crate_type = "proc-macro"]
7+
8+
extern crate proc_macro;
9+
10+
use proc_macro::TokenStream;
11+
12+
/// foo is documented
13+
#[proc_macro]
14+
pub fn foo(input: TokenStream) -> TokenStream {
15+
input
16+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// aux-build:issue-42008.rs
2+
3+
#![feature(proc_macro_non_items)]
4+
5+
#[macro_use]
6+
extern crate issue_42008;
7+
8+
fn main() {
9+
let _ = foo!("");
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error: missing documentation for a module
2+
|
3+
note: lint level defined here
4+
--> $DIR/auxiliary/issue-42008.rs:4:9
5+
|
6+
LL | #![deny(missing_docs)]
7+
| ^^^^^^^^^^^^
8+
9+
error: missing documentation for a function
10+
11+
error: aborting due to 2 previous errors
12+

0 commit comments

Comments
 (0)