⬆️ rustc
This commit is contained in:
@@ -310,28 +310,30 @@ mod tests {
|
||||
fn test_unresolved_module_diagnostic() {
|
||||
let (analysis, file_id) = single_file("mod foo;");
|
||||
let diagnostics = analysis.diagnostics(file_id).unwrap();
|
||||
assert_debug_snapshot_matches!(diagnostics, @r####"[
|
||||
Diagnostic {
|
||||
message: "unresolved module",
|
||||
range: [0; 8),
|
||||
fix: Some(
|
||||
SourceChange {
|
||||
label: "create module",
|
||||
source_file_edits: [],
|
||||
file_system_edits: [
|
||||
CreateFile {
|
||||
source_root: SourceRootId(
|
||||
0
|
||||
),
|
||||
path: "foo.rs"
|
||||
}
|
||||
],
|
||||
cursor_position: None
|
||||
}
|
||||
),
|
||||
severity: Error
|
||||
}
|
||||
]"####);
|
||||
assert_debug_snapshot_matches!(diagnostics, @r###"
|
||||
⋮[
|
||||
⋮ Diagnostic {
|
||||
⋮ message: "unresolved module",
|
||||
⋮ range: [0; 8),
|
||||
⋮ fix: Some(
|
||||
⋮ SourceChange {
|
||||
⋮ label: "create module",
|
||||
⋮ source_file_edits: [],
|
||||
⋮ file_system_edits: [
|
||||
⋮ CreateFile {
|
||||
⋮ source_root: SourceRootId(
|
||||
⋮ 0,
|
||||
⋮ ),
|
||||
⋮ path: "foo.rs",
|
||||
⋮ },
|
||||
⋮ ],
|
||||
⋮ cursor_position: None,
|
||||
⋮ },
|
||||
⋮ ),
|
||||
⋮ severity: Error,
|
||||
⋮ },
|
||||
⋮]
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user