File tree 4 files changed +8
-10
lines changed
4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ authors = ["The Rust Project Developers"]
3
3
name = " rustc_plugin"
4
4
version = " 0.0.0"
5
5
build = false
6
+ edition = " 2018"
6
7
7
8
[lib ]
8
9
name = " rustc_plugin"
Original file line number Diff line number Diff line change 1
1
#![ allow( non_snake_case) ]
2
2
3
+ use syntax:: { register_diagnostic, register_diagnostics, register_long_diagnostics} ;
4
+
3
5
register_long_diagnostics ! {
4
6
5
7
}
Original file line number Diff line number Diff line change 54
54
html_favicon_url = "https://doc.rust-lang.org/favicon.ico" ,
55
55
html_root_url = "https://doc.rust-lang.org/nightly/" ) ]
56
56
57
- #![ feature( nll) ]
58
57
#![ feature( rustc_diagnostic_macros) ]
59
58
60
59
#![ recursion_limit="256" ]
61
60
62
- #[ macro_use ] extern crate syntax ;
61
+ #! [ deny ( rust_2018_idioms ) ]
63
62
64
- extern crate rustc;
65
- extern crate rustc_metadata;
66
- extern crate syntax_pos;
67
- extern crate rustc_errors as errors;
68
-
69
- pub use self :: registry:: Registry ;
63
+ pub use registry:: Registry ;
70
64
71
65
mod diagnostics;
72
66
pub mod registry;
Original file line number Diff line number Diff line change 3
3
use rustc:: session:: Session ;
4
4
use rustc_metadata:: creader:: CrateLoader ;
5
5
use rustc_metadata:: cstore:: CStore ;
6
- use registry:: Registry ;
6
+ use crate :: registry:: Registry ;
7
7
8
8
use std:: borrow:: ToOwned ;
9
9
use std:: env;
10
10
use std:: mem;
11
11
use std:: path:: PathBuf ;
12
12
use syntax:: ast;
13
+ use syntax:: span_err;
13
14
use syntax_pos:: { Span , DUMMY_SP } ;
14
15
15
16
/// Pointer to a registrar function.
16
17
pub type PluginRegistrarFun =
17
- fn ( & mut Registry ) ;
18
+ fn ( & mut Registry < ' _ > ) ;
18
19
19
20
pub struct PluginRegistrar {
20
21
pub fun : PluginRegistrarFun ,
You can’t perform that action at this time.
0 commit comments