Skip to content

Commit 9f4a11c

Browse files
committed
librustc_plugin => 2018
1 parent b139669 commit 9f4a11c

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

src/librustc_plugin/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ authors = ["The Rust Project Developers"]
33
name = "rustc_plugin"
44
version = "0.0.0"
55
build = false
6+
edition = "2018"
67

78
[lib]
89
name = "rustc_plugin"

src/librustc_plugin/diagnostics.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#![allow(non_snake_case)]
22

3+
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
4+
35
register_long_diagnostics! {
46

57
}

src/librustc_plugin/lib.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,13 @@
5454
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
5555
html_root_url = "https://doc.rust-lang.org/nightly/")]
5656

57-
#![feature(nll)]
5857
#![feature(rustc_diagnostic_macros)]
5958

6059
#![recursion_limit="256"]
6160

62-
#[macro_use] extern crate syntax;
61+
#![deny(rust_2018_idioms)]
6362

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;
7064

7165
mod diagnostics;
7266
pub mod registry;

src/librustc_plugin/load.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
use rustc::session::Session;
44
use rustc_metadata::creader::CrateLoader;
55
use rustc_metadata::cstore::CStore;
6-
use registry::Registry;
6+
use crate::registry::Registry;
77

88
use std::borrow::ToOwned;
99
use std::env;
1010
use std::mem;
1111
use std::path::PathBuf;
1212
use syntax::ast;
13+
use syntax::span_err;
1314
use syntax_pos::{Span, DUMMY_SP};
1415

1516
/// Pointer to a registrar function.
1617
pub type PluginRegistrarFun =
17-
fn(&mut Registry);
18+
fn(&mut Registry<'_>);
1819

1920
pub struct PluginRegistrar {
2021
pub fun: PluginRegistrarFun,

0 commit comments

Comments
 (0)