@@ -212,7 +212,7 @@ impl_lint_pass!(DocMarkdown =>
212
212
) ;
213
213
214
214
impl < ' 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 > ) {
216
216
let attrs = cx. tcx . hir ( ) . attrs ( hir:: CRATE_HIR_ID ) ;
217
217
check_attrs ( cx, & self . valid_idents , attrs) ;
218
218
}
@@ -317,7 +317,7 @@ fn lint_for_missing_headers<'tcx>(
317
317
}
318
318
if !headers. errors {
319
319
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 ) {
321
321
span_lint (
322
322
cx,
323
323
MISSING_ERRORS_DOC ,
@@ -335,7 +335,7 @@ fn lint_for_missing_headers<'tcx>(
335
335
if let ty:: Opaque ( _, subs) = ret_ty. kind( ) ;
336
336
if let Some ( gen ) = subs. types( ) . next( ) ;
337
337
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 ) ;
339
339
then {
340
340
span_lint(
341
341
cx,
@@ -782,8 +782,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindPanicUnwrap<'a, 'tcx> {
782
782
// check for `unwrap`
783
783
if let Some ( arglists) = method_chain_args ( expr, & [ "unwrap" ] ) {
784
784
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 )
787
787
{
788
788
self . panic_span = Some ( expr. span ) ;
789
789
}
0 commit comments