mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 02:23:20 +00:00
Add warning if standalone-crate
is mistyped
This commit is contained in:
parent
35f24d0d14
commit
0956f69caf
@ -1319,6 +1319,20 @@ impl LangString {
|
||||
"the code block will either not be tested if not marked as a rust \
|
||||
one or the code will be wrapped inside a main function",
|
||||
)),
|
||||
"standalone" | "standalone_crate" => {
|
||||
if let Some(extra) = extra
|
||||
&& extra.sp.at_least_rust_2024()
|
||||
{
|
||||
Some((
|
||||
"standalone-crate",
|
||||
"the code block will either not be tested if not marked as \
|
||||
a rust one or the code will be run as part of the merged \
|
||||
doctests if compatible",
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
} {
|
||||
if let Some(extra) = extra {
|
||||
|
Loading…
Reference in New Issue
Block a user