File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl DiagnosticArray {
4343pub unsafe extern "C" fn rdx_graph_diagnostics ( pointer : GraphPointer ) -> * mut DiagnosticArray {
4444 with_graph ( pointer, |graph| {
4545 let entries = graph
46- . diagnostics ( )
46+ . all_diagnostics ( )
4747 . iter ( )
4848 . map ( |diagnostic| {
4949 let document = graph. documents ( ) . get ( diagnostic. uri_id ( ) ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ impl Graph {
170170 }
171171
172172 #[ must_use]
173- pub fn diagnostics ( & self ) -> Vec < & Diagnostic > {
173+ pub fn all_diagnostics ( & self ) -> Vec < & Diagnostic > {
174174 let document_diagnostics = self . documents . values ( ) . flat_map ( Document :: diagnostics) ;
175175 let declaration_diagnostics = self . declarations . values ( ) . flat_map ( Declaration :: diagnostics) ;
176176 let definition_diagnostics = self . definitions . values ( ) . flat_map ( Definition :: diagnostics) ;
@@ -1035,10 +1035,10 @@ mod tests {
10351035
10361036 // TODO: Add resolution error to test diagnostics attached to declarations
10371037 context. index_uri ( "file:///foo.rb" , "class Foo" ) ;
1038- assert ! ( !context. graph( ) . diagnostics ( ) . is_empty( ) ) ;
1038+ assert ! ( !context. graph( ) . all_diagnostics ( ) . is_empty( ) ) ;
10391039
10401040 context. index_uri ( "file:///foo.rb" , "class Foo; end" ) ;
1041- assert ! ( context. graph( ) . diagnostics ( ) . is_empty( ) ) ;
1041+ assert ! ( context. graph( ) . all_diagnostics ( ) . is_empty( ) ) ;
10421042 }
10431043
10441044 #[ test]
@@ -1059,7 +1059,7 @@ mod tests {
10591059
10601060 let mut diagnostics: Vec < String > = context
10611061 . graph ( )
1062- . diagnostics ( )
1062+ . all_diagnostics ( )
10631063 . iter ( )
10641064 . map ( |d| {
10651065 format ! (
Original file line number Diff line number Diff line change @@ -1757,7 +1757,7 @@ mod tests {
17571757 fn format_diagnostics ( context : & GraphTest , ignore_rules : & [ Rule ] ) -> Vec < String > {
17581758 let mut diagnostics: Vec < _ > = context
17591759 . graph ( )
1760- . diagnostics ( )
1760+ . all_diagnostics ( )
17611761 . into_iter ( )
17621762 . filter ( |d| !ignore_rules. contains ( d. rule ( ) ) )
17631763 . collect ( ) ;
You can’t perform that action at this time.
0 commit comments