@@ -18,7 +18,6 @@ use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
18
18
19
19
use log:: { debug, trace} ;
20
20
use std:: mem;
21
- use std:: path:: PathBuf ;
22
21
23
22
const TURBOFISH : & str = "use `::<...>` instead of `<...>` to specify type arguments" ;
24
23
@@ -41,42 +40,12 @@ pub(super) fn dummy_arg(ident: Ident) -> Param {
41
40
}
42
41
43
42
pub enum Error {
44
- FileNotFoundForModule { mod_name : String , default_path : PathBuf } ,
45
- DuplicatePaths { mod_name : String , default_path : String , secondary_path : String } ,
46
43
UselessDocComment ,
47
44
}
48
45
49
46
impl Error {
50
47
fn span_err ( self , sp : impl Into < MultiSpan > , handler : & Handler ) -> DiagnosticBuilder < ' _ > {
51
48
match self {
52
- Error :: FileNotFoundForModule { ref mod_name, ref default_path } => {
53
- let mut err = struct_span_err ! (
54
- handler,
55
- sp,
56
- E0583 ,
57
- "file not found for module `{}`" ,
58
- mod_name,
59
- ) ;
60
- err. help ( & format ! (
61
- "to create the module `{}`, create file \" {}\" " ,
62
- mod_name,
63
- default_path. display( ) ,
64
- ) ) ;
65
- err
66
- }
67
- Error :: DuplicatePaths { ref mod_name, ref default_path, ref secondary_path } => {
68
- let mut err = struct_span_err ! (
69
- handler,
70
- sp,
71
- E0584 ,
72
- "file for module `{}` found at both {} and {}" ,
73
- mod_name,
74
- default_path,
75
- secondary_path,
76
- ) ;
77
- err. help ( "delete or rename one of them to remove the ambiguity" ) ;
78
- err
79
- }
80
49
Error :: UselessDocComment => {
81
50
let mut err = struct_span_err ! (
82
51
handler,
0 commit comments