Skip to content

Commit

Permalink
Rollup merge of rust-lang#58228 - taiki-e:librustc_plugin-2018, r=Cen…
Browse files Browse the repository at this point in the history
…tril

librustc_plugin => 2018

Transitions `librustc_plugin` to Rust 2018; cc rust-lang#58099

r? @Centril
  • Loading branch information
kennytm authored Feb 7, 2019
2 parents c0a135f + 9f4a11c commit 73458cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/librustc_plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ authors = ["The Rust Project Developers"]
name = "rustc_plugin"
version = "0.0.0"
build = false
edition = "2018"

[lib]
name = "rustc_plugin"
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_plugin/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![allow(non_snake_case)]

use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};

register_long_diagnostics! {

}
Expand Down
10 changes: 2 additions & 8 deletions src/librustc_plugin/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,13 @@
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]

#![feature(nll)]
#![feature(rustc_diagnostic_macros)]

#![recursion_limit="256"]

#[macro_use] extern crate syntax;
#![deny(rust_2018_idioms)]

extern crate rustc;
extern crate rustc_metadata;
extern crate syntax_pos;
extern crate rustc_errors as errors;

pub use self::registry::Registry;
pub use registry::Registry;

mod diagnostics;
pub mod registry;
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_plugin/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
use rustc::session::Session;
use rustc_metadata::creader::CrateLoader;
use rustc_metadata::cstore::CStore;
use registry::Registry;
use crate::registry::Registry;

use std::borrow::ToOwned;
use std::env;
use std::mem;
use std::path::PathBuf;
use syntax::ast;
use syntax::span_err;
use syntax_pos::{Span, DUMMY_SP};

/// Pointer to a registrar function.
pub type PluginRegistrarFun =
fn(&mut Registry);
fn(&mut Registry<'_>);

pub struct PluginRegistrar {
pub fun: PluginRegistrarFun,
Expand Down

0 comments on commit 73458cd

Please sign in to comment.