File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,12 @@ pub struct MissingFields {
3939
4040impl Diagnostic for MissingFields {
4141 fn message ( & self ) -> String {
42- "fill structure fields" . to_string ( )
42+ use std:: fmt:: Write ;
43+ let mut message = String :: from ( "Missing structure fields:\n " ) ;
44+ for field in & self . missed_fields {
45+ write ! ( message, "- {}\n " , field) . unwrap ( ) ;
46+ }
47+ message
4348 }
4449 fn source ( & self ) -> Source < SyntaxNodePtr > {
4550 Source { file_id : self . file , value : self . field_list . into ( ) }
Original file line number Diff line number Diff line change @@ -4832,7 +4832,8 @@ fn no_such_field_diagnostics() {
48324832
48334833 assert_snapshot ! ( diagnostics, @r###"
48344834 "baz: 62": no such field
4835- "{\n foo: 92,\n baz: 62,\n }": fill structure fields
4835+ "{\n foo: 92,\n baz: 62,\n }": Missing structure fields:
4836+ - bar
48364837 "###
48374838 ) ;
48384839}
You can’t perform that action at this time.
0 commit comments