Skip to content

Commit 8327bb6

Browse files
Add expect to the list of non-crate attributes for doctest generation
1 parent f333ad8 commit 8327bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/doctest/make.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ fn parse_source(source: &str, crate_name: &Option<&str>) -> Result<ParseSourceIn
395395
}
396396

397397
let mut prev_span_hi = None;
398-
let not_crate_attrs = [sym::forbid, sym::allow, sym::warn, sym::deny];
398+
let not_crate_attrs = [sym::forbid, sym::allow, sym::warn, sym::deny, sym::expect];
399399
let parsed = parser.parse_item(rustc_parse::parser::ForceCollect::No);
400400

401401
let result = match parsed {

0 commit comments

Comments
 (0)