Fix comment formatting wrongly assuming false invariant.

This commit is contained in:
KtorZ
2023-03-16 23:33:02 +01:00
committed by Lucas
parent 57e217e81c
commit 660ca3fada
4 changed files with 43 additions and 48 deletions

View File

@@ -322,25 +322,6 @@ fn utf8_hex_literal_warning() {
))
}
#[test]
fn weird_comments() {
let source_code = r#"
// A
/// B
// C
fn foo () {
todo
}
"#;
assert!(matches!(
check(parse(source_code)),
Err((_, Error::UnexpectedDocComment { .. }))
))
}
#[test]
fn discarded_let_bindings() {
let source_code = r#"