mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
internal: test diagnostic severeties and presense of fixes
This commit is contained in:
parent
58712088ac
commit
4cfc767d7f
16 changed files with 155 additions and 140 deletions
|
@ -19,7 +19,7 @@ use crate::{fix, Diagnostic, DiagnosticsContext};
|
|||
// let a = A { a: 10 };
|
||||
// ```
|
||||
pub(crate) fn missing_fields(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Diagnostic {
|
||||
let mut message = String::from("Missing structure fields:\n");
|
||||
let mut message = String::from("missing structure fields:\n");
|
||||
for field in &d.missed_fields {
|
||||
format_to!(message, "- {}\n", field);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ mod tests {
|
|||
struct S { foo: i32, bar: () }
|
||||
fn baz(s: S) {
|
||||
let S { foo: _ } = s;
|
||||
//^ Missing structure fields:
|
||||
//^ error: missing structure fields:
|
||||
//| - bar
|
||||
}
|
||||
"#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue