@@ -6,7 +6,7 @@ use std::rc::Rc;
6
6
use std:: sync:: mpsc:: { channel, Receiver } ;
7
7
8
8
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
9
- use rustc_hir:: HirId ;
9
+ // use rustc_hir::HirId;
10
10
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
11
11
use rustc_middle:: ty:: TyCtxt ;
12
12
use rustc_session:: Session ;
@@ -34,7 +34,7 @@ use crate::html::format::{join_with_double_colon, Buffer};
34
34
use crate :: html:: markdown:: { self , plain_text_summary, ErrorCodes , IdMap } ;
35
35
use crate :: html:: url_parts_builder:: UrlPartsBuilder ;
36
36
use crate :: html:: { layout, sources, static_files} ;
37
- use crate :: lint:: BROKEN_HTML_LINKS ;
37
+ // use crate::lint::BROKEN_HTML_LINKS;
38
38
use crate :: scrape_examples:: AllCallLocations ;
39
39
use crate :: try_err;
40
40
@@ -176,14 +176,14 @@ impl<'tcx> Context<'tcx> {
176
176
177
177
let path = self . dst . canonicalize ( ) . unwrap ( ) ;
178
178
let errors: Vec < _ > = unavailable_urls ( & path, & CheckContext :: default ( ) ) . collect ( ) ;
179
- let tcx = self . tcx ( ) ;
179
+ // let tcx = self.tcx();
180
180
for err in errors {
181
- // self.sess().struct_warn (&err.to_string().replace('\t', " ")).emit();
182
- let msg = err. to_string ( ) . replace ( '\t' , " " ) ;
183
- // TODO: map files back to items
184
- let hir_id: HirId = todo ! ( ) ;
185
- let span = tcx. def_span ( tcx. hir ( ) . local_def_id ( hir_id) ) ;
186
- self . tcx ( ) . struct_span_lint_hir ( BROKEN_HTML_LINKS , hir_id, span, msg, |err| err) ;
181
+ self . sess ( ) . struct_err ( & err. to_string ( ) . replace ( '\t' , " " ) ) . emit ( ) ;
182
+ // let msg = err.to_string().replace('\t', " ");
183
+ // // TODO: map files back to items
184
+ // let hir_id: HirId = todo!();
185
+ // let span = tcx.def_span(tcx.hir().local_def_id(hir_id));
186
+ // self.tcx().struct_span_lint_hir(BROKEN_HTML_LINKS, hir_id, span, msg, |err| err);
187
187
}
188
188
}
189
189
0 commit comments