@@ -103,35 +103,35 @@ pub fn generate_asts(
103103 . packages
104104 . get ( & module. package_name )
105105 . expect ( "Package not found" ) ;
106- match ( ast_path, module. source_type . to_owned ( ) ) {
107- // supress warnings in non-pinned deps
108- ( Ok ( ( _path, Some ( err) ) ) , SourceType :: SourceFile ( ref mut source_file) )
109- if package. is_pinned_dep =>
110- {
111- source_file. implementation . parse_state = ParseState :: Warning ;
112- source_file. implementation . parse_dirty = true ;
113- if let Some ( interface) = source_file. interface . as_mut ( ) {
114- interface. parse_dirty = false ;
106+ if let SourceType :: SourceFile ( ref mut source_file) = module. source_type {
107+ match ast_path {
108+ // supress warnings in non-pinned deps
109+ Ok ( ( _path, Some ( err) ) ) if package. is_pinned_dep => {
110+ source_file. implementation . parse_state = ParseState :: Warning ;
111+ source_file. implementation . parse_dirty = true ;
112+ if let Some ( interface) = source_file. interface . as_mut ( ) {
113+ interface. parse_dirty = false ;
114+ }
115+ logs:: append ( package, & err) ;
116+ stderr. push_str ( & err) ;
115117 }
116- logs:: append ( package, & err) ;
117- stderr. push_str ( & err) ;
118- }
119- ( Ok ( ( _path, None ) ) , SourceType :: SourceFile ( ref mut source_file) ) => {
120- source_file. implementation . parse_state = ParseState :: Success ;
121- source_file. implementation . parse_dirty = false ;
122- if let Some ( interface) = source_file. interface . as_mut ( ) {
123- interface. parse_dirty = false ;
118+ Ok ( ( _path, None ) ) => {
119+ source_file. implementation . parse_state = ParseState :: Success ;
120+ source_file. implementation . parse_dirty = false ;
121+ if let Some ( interface) = source_file. interface . as_mut ( ) {
122+ interface. parse_dirty = false ;
123+ }
124124 }
125- }
126- ( Err ( err ) , SourceType :: SourceFile ( ref mut source_file) ) => {
127- source_file. implementation . parse_state = ParseState :: ParseError ;
128- source_file . implementation . parse_dirty = true ;
129- logs :: append ( package , & err ) ;
130- has_failure = true ;
131- stderr . push_str ( & err ) ;
132- }
133- _ => ( ) ,
134- } ;
125+ Err ( err ) => {
126+ source_file. implementation . parse_state = ParseState :: ParseError ;
127+ source_file. implementation . parse_dirty = true ;
128+ logs :: append ( package , & err ) ;
129+ has_failure = true ;
130+ stderr . push_str ( & err ) ;
131+ }
132+ _ => ( ) ,
133+ } ;
134+ }
135135
136136 match ( iast_path, module. source_type . to_owned ( ) ) {
137137 ( Ok ( Some ( ( _path, Some ( err) ) ) ) , SourceType :: SourceFile ( ref mut source_file) )
0 commit comments