fix: add generated doctest

This commit is contained in:
Ryan Mehri 2023-08-19 17:41:44 -06:00
parent d7a8e800c9
commit 59738d5fd5

View File

@ -280,6 +280,34 @@ fn some_function(x: i32) {
)
}
#[test]
fn doctest_bool_to_enum() {
check_doc_test(
"bool_to_enum",
r#####"
fn main() {
let $0bool = true;
if bool {
println!("foo");
}
}
"#####,
r#####"
fn main() {
#[derive(PartialEq, Eq)]
enum Bool { True, False }
let bool = Bool::True;
if bool == Bool::True {
println!("foo");
}
}
"#####,
)
}
#[test]
fn doctest_change_visibility() {
check_doc_test(