@@ -245,7 +245,7 @@ fn get_bas_dec(
245245 } ,
246246 mlb_hir:: BasDec :: Path ( path, kind) => match kind {
247247 mlb_hir:: PathKind :: Source ( file_kind) => {
248- let contents = cx. source_file_contents . get ( path) . expect ( "no source file" ) ;
248+ let contents = cx. source_file_contents . get ( path) . expect ( "should have source file for path " ) ;
249249 let mut fix_env = scope. fix_env . clone ( ) ;
250250 let syntax = SourceFileSyntax :: new ( & mut fix_env, cx. lang , * file_kind, contents) ;
251251 get_source_file ( st, cx. lang , * path, scope, ac, fix_env, syntax) ;
@@ -259,7 +259,8 @@ fn get_bas_dec(
259259 let mut syntaxes: paths:: PathMap < _ > = paths
260260 . iter ( )
261261 . map ( |& ( path, kind) | {
262- let contents = cx. source_file_contents . get ( & path) . expect ( "no source file" ) ;
262+ let contents =
263+ cx. source_file_contents . get ( & path) . expect ( "should have source file for path" ) ;
263264 let mut fix_env = scope. fix_env . clone ( ) ;
264265 let syntax = SourceFileSyntax :: new ( & mut fix_env, cx. lang , kind, contents) ;
265266 ( path, ( fix_env, syntax) )
@@ -278,7 +279,8 @@ fn get_bas_dec(
278279 let mut scope = scope. clone ( ) ;
279280 for path in order {
280281 let mut one_m_basis = MBasis :: default ( ) ;
281- let ( fix_env, syntax) = syntaxes. remove ( & path) . expect ( "path from order is in syntaxes" ) ;
282+ let ( fix_env, syntax) =
283+ syntaxes. remove ( & path) . expect ( "should have path from order be present" ) ;
282284 get_source_file ( st, cx. lang , path, & scope, & mut one_m_basis, fix_env, syntax) ;
283285 scope. append ( one_m_basis. clone ( ) ) ;
284286 ac. append ( one_m_basis) ;
@@ -371,7 +373,7 @@ pub fn add_all_doc_comments(
371373 . chain ( low. arenas . str_dec . iter ( ) . map ( |( x, _) | sml_hir:: Idx :: StrDec ( x) ) )
372374 . chain ( low. arenas . spec . iter ( ) . map ( |( x, _) | sml_hir:: Idx :: Spec ( x) ) ) ;
373375 for idx in indices {
374- let ptr = low. ptrs . hir_to_ast ( idx) . expect ( "no syntax ptr" ) ;
376+ let ptr = low. ptrs . hir_to_ast ( idx) . expect ( "should have syntax ptr" ) ;
375377 let node = ptr. to_node ( root) ;
376378 if let Some ( doc) = sml_comment:: doc_comment_above ( & node) {
377379 info. add_doc ( idx, doc) ;
0 commit comments