@@ -307,7 +307,7 @@ fn lint_for_missing_headers<'tcx>(
307307 }
308308 if !headers. errors {
309309 let hir_id = cx. tcx . hir ( ) . local_def_id_to_hir_id ( def_id) ;
310- if is_type_diagnostic_item ( cx, return_ty ( cx, hir_id) , sym:: result_type ) {
310+ if is_type_diagnostic_item ( cx, return_ty ( cx, hir_id) , sym:: Result ) {
311311 span_lint (
312312 cx,
313313 MISSING_ERRORS_DOC ,
@@ -325,7 +325,7 @@ fn lint_for_missing_headers<'tcx>(
325325 if let ty:: Opaque ( _, subs) = ret_ty. kind( ) ;
326326 if let Some ( gen ) = subs. types( ) . next( ) ;
327327 if let ty:: Generator ( _, subs, _) = gen . kind( ) ;
328- if is_type_diagnostic_item( cx, subs. as_generator( ) . return_ty( ) , sym:: result_type ) ;
328+ if is_type_diagnostic_item( cx, subs. as_generator( ) . return_ty( ) , sym:: Result ) ;
329329 then {
330330 span_lint(
331331 cx,
@@ -760,8 +760,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindPanicUnwrap<'a, 'tcx> {
760760 // check for `unwrap`
761761 if let Some ( arglists) = method_chain_args ( expr, & [ "unwrap" ] ) {
762762 let reciever_ty = self . typeck_results . expr_ty ( & arglists[ 0 ] [ 0 ] ) . peel_refs ( ) ;
763- if is_type_diagnostic_item ( self . cx , reciever_ty, sym:: option_type )
764- || is_type_diagnostic_item ( self . cx , reciever_ty, sym:: result_type )
763+ if is_type_diagnostic_item ( self . cx , reciever_ty, sym:: Option )
764+ || is_type_diagnostic_item ( self . cx , reciever_ty, sym:: Result )
765765 {
766766 self . panic_span = Some ( expr. span ) ;
767767 }
0 commit comments