@@ -212,7 +212,7 @@ impl_lint_pass!(DocMarkdown =>
212212) ;
213213
214214impl < ' tcx > LateLintPass < ' tcx > for DocMarkdown {
215- fn check_crate ( & mut self , cx : & LateContext < ' tcx > , _ : & ' tcx hir :: Crate < ' _ > ) {
215+ fn check_crate ( & mut self , cx : & LateContext < ' tcx > ) {
216216 let attrs = cx. tcx . hir ( ) . attrs ( hir:: CRATE_HIR_ID ) ;
217217 check_attrs ( cx, & self . valid_idents , attrs) ;
218218 }
@@ -317,7 +317,7 @@ fn lint_for_missing_headers<'tcx>(
317317 }
318318 if !headers. errors {
319319 let hir_id = cx. tcx . hir ( ) . local_def_id_to_hir_id ( def_id) ;
320- if is_type_diagnostic_item ( cx, return_ty ( cx, hir_id) , sym:: result_type ) {
320+ if is_type_diagnostic_item ( cx, return_ty ( cx, hir_id) , sym:: Result ) {
321321 span_lint (
322322 cx,
323323 MISSING_ERRORS_DOC ,
@@ -335,7 +335,7 @@ fn lint_for_missing_headers<'tcx>(
335335 if let ty:: Opaque ( _, subs) = ret_ty. kind( ) ;
336336 if let Some ( gen ) = subs. types( ) . next( ) ;
337337 if let ty:: Generator ( _, subs, _) = gen . kind( ) ;
338- if is_type_diagnostic_item( cx, subs. as_generator( ) . return_ty( ) , sym:: result_type ) ;
338+ if is_type_diagnostic_item( cx, subs. as_generator( ) . return_ty( ) , sym:: Result ) ;
339339 then {
340340 span_lint(
341341 cx,
@@ -782,8 +782,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindPanicUnwrap<'a, 'tcx> {
782782 // check for `unwrap`
783783 if let Some ( arglists) = method_chain_args ( expr, & [ "unwrap" ] ) {
784784 let reciever_ty = self . typeck_results . expr_ty ( & arglists[ 0 ] [ 0 ] ) . peel_refs ( ) ;
785- if is_type_diagnostic_item ( self . cx , reciever_ty, sym:: option_type )
786- || is_type_diagnostic_item ( self . cx , reciever_ty, sym:: result_type )
785+ if is_type_diagnostic_item ( self . cx , reciever_ty, sym:: Option )
786+ || is_type_diagnostic_item ( self . cx , reciever_ty, sym:: Result )
787787 {
788788 self . panic_span = Some ( expr. span ) ;
789789 }
0 commit comments