diff --git a/crates/mdbook-core/src/config.rs b/crates/mdbook-core/src/config.rs index 32e2e9dcf9..81c6dc5269 100644 --- a/crates/mdbook-core/src/config.rs +++ b/crates/mdbook-core/src/config.rs @@ -1093,6 +1093,19 @@ mod tests { Config::from_str(src).unwrap(); } + #[test] + #[should_panic( + expected = "unknown variant `1999`, expected one of `2024`, `2021`, `2018`, `2015`\n" + )] + fn invalid_rust_edition_expected() { + let src = r#" + [rust] + edition = "1999" + "#; + + Config::from_str(src).unwrap(); + } + #[test] fn print_config() { let src = r#"