Skip to content

Commit 0904d1d

Browse files
committed
rustdoc: warn for notrust tags
1 parent ef4982f commit 0904d1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustdoc/html/markdown.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,11 @@ impl LangString {
403403
"should_fail" => { data.should_fail = true; seen_rust_tags = true; },
404404
"no_run" => { data.no_run = true; seen_rust_tags = true; },
405405
"ignore" => { data.ignore = true; seen_rust_tags = true; },
406-
"notrust" => { data.notrust = true; seen_rust_tags = true; },
406+
"notrust" => {
407+
data.notrust = true; seen_rust_tags = true;
408+
warn!("Use of the `notrust` code tag is discouraged. \
409+
Tag the code with its language instead or use `plain`.");
410+
},
407411
"rust" => { data.notrust = false; seen_rust_tags = true; },
408412
"test_harness" => { data.test_harness = true; seen_rust_tags = true; }
409413
_ => { seen_other_tags = true }

0 commit comments

Comments
 (0)