@@ -10,10 +10,10 @@ use rustc_errors::Applicability;
1010use std:: lazy:: SyncLazy ;
1111use std:: mem;
1212
13- crate const CHECK_NON_AUTOLINKS : Pass = Pass {
14- name : "check-non-autolinks " ,
15- run : check_non_autolinks ,
16- description : "detects URLs that could be linkified " ,
13+ crate const CHECK_BARE_URLS : Pass = Pass {
14+ name : "check-bare-urls " ,
15+ run : check_bare_urls ,
16+ description : "detects URLs that are not hyperlinks " ,
1717} ;
1818
1919const URL_REGEX : SyncLazy < Regex > = SyncLazy :: new ( || {
@@ -26,11 +26,11 @@ const URL_REGEX: SyncLazy<Regex> = SyncLazy::new(|| {
2626 . expect ( "failed to build regex" )
2727} ) ;
2828
29- struct NonAutolinksLinter < ' a , ' tcx > {
29+ struct BareUrlsLinter < ' a , ' tcx > {
3030 cx : & ' a mut DocContext < ' tcx > ,
3131}
3232
33- impl < ' a , ' tcx > NonAutolinksLinter < ' a , ' tcx > {
33+ impl < ' a , ' tcx > BareUrlsLinter < ' a , ' tcx > {
3434 fn find_raw_urls (
3535 & self ,
3636 text : & str ,
@@ -52,11 +52,11 @@ impl<'a, 'tcx> NonAutolinksLinter<'a, 'tcx> {
5252 }
5353}
5454
55- crate fn check_non_autolinks ( krate : Crate , cx : & mut DocContext < ' _ > ) -> Crate {
56- NonAutolinksLinter { cx } . fold_crate ( krate)
55+ crate fn check_bare_urls ( krate : Crate , cx : & mut DocContext < ' _ > ) -> Crate {
56+ BareUrlsLinter { cx } . fold_crate ( krate)
5757}
5858
59- impl < ' a , ' tcx > DocFolder for NonAutolinksLinter < ' a , ' tcx > {
59+ impl < ' a , ' tcx > DocFolder for BareUrlsLinter < ' a , ' tcx > {
6060 fn fold_item ( & mut self , item : Item ) -> Option < Item > {
6161 let hir_id = match DocContext :: as_local_hir_id ( self . cx . tcx , item. def_id ) {
6262 Some ( hir_id) => hir_id,
@@ -71,7 +71,7 @@ impl<'a, 'tcx> DocFolder for NonAutolinksLinter<'a, 'tcx> {
7171 let sp = super :: source_span_for_markdown_range ( cx. tcx , & dox, & range, & item. attrs )
7272 . or_else ( || span_of_attrs ( & item. attrs ) )
7373 . unwrap_or ( item. span . inner ( ) ) ;
74- cx. tcx . struct_span_lint_hir ( crate :: lint:: NON_AUTOLINKS , hir_id, sp, |lint| {
74+ cx. tcx . struct_span_lint_hir ( crate :: lint:: BARE_URLS , hir_id, sp, |lint| {
7575 lint. build ( msg)
7676 . span_suggestion (
7777 sp,
0 commit comments