librustc_plugin => 2018

This commit is contained in:
Taiki Endo 2019-02-06 23:56:39 +09:00
parent b139669f37
commit 9f4a11c637
4 changed files with 8 additions and 10 deletions

View File

@ -3,6 +3,7 @@ authors = ["The Rust Project Developers"]
name = "rustc_plugin"
version = "0.0.0"
build = false
edition = "2018"
[lib]
name = "rustc_plugin"

View File

@ -1,5 +1,7 @@
#![allow(non_snake_case)]
use syntax::{register_diagnostic, register_diagnostics, register_long_diagnostics};
register_long_diagnostics! {
}

View File

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

View File

@ -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,