Rollup merge of #58837 - Centril:librustc_interface_2018, r=petrochenkov
librustc_interface => 2018 r? @oli-obk This will likely produce an ICE for some reason... so super-WIP.
This commit is contained in:
commit
ecf63630cf
@ -2,6 +2,7 @@
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "rustc_interface"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "rustc_interface"
|
||||
@ -10,7 +11,7 @@ crate-type = ["dylib"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
rustc-rayon = "0.1.1"
|
||||
rayon = { version = "0.1.1", package = "rustc-rayon" }
|
||||
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
|
||||
scoped-tls = "1.0"
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -1,4 +1,8 @@
|
||||
use queries::Queries;
|
||||
use crate::queries::Queries;
|
||||
use crate::util;
|
||||
use crate::profile;
|
||||
pub use crate::passes::BoxedResolver;
|
||||
|
||||
use rustc::lint;
|
||||
use rustc::session::config::{self, Input};
|
||||
use rustc::session::{DiagnosticOutput, Session};
|
||||
@ -15,10 +19,6 @@ use std::result;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use syntax;
|
||||
use syntax::source_map::{FileLoader, SourceMap};
|
||||
use util;
|
||||
use profile;
|
||||
|
||||
pub use passes::BoxedResolver;
|
||||
|
||||
pub type Result<T> = result::Result<T, ErrorReported>;
|
||||
|
||||
|
@ -6,37 +6,14 @@
|
||||
#![feature(generators)]
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
|
||||
#![deny(rust_2018_idioms)]
|
||||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
||||
#[cfg(unix)]
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate rustc;
|
||||
extern crate rustc_codegen_utils;
|
||||
extern crate rustc_allocator;
|
||||
extern crate rustc_borrowck;
|
||||
extern crate rustc_incremental;
|
||||
extern crate rustc_traits;
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_errors;
|
||||
extern crate rustc_lint;
|
||||
extern crate rustc_metadata;
|
||||
extern crate rustc_mir;
|
||||
extern crate rustc_passes;
|
||||
extern crate rustc_plugin;
|
||||
extern crate rustc_privacy;
|
||||
extern crate rustc_rayon as rayon;
|
||||
extern crate rustc_resolve;
|
||||
extern crate rustc_typeck;
|
||||
extern crate smallvec;
|
||||
extern crate serialize;
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate syntax_ext;
|
||||
|
||||
pub mod interface;
|
||||
mod passes;
|
||||
|
@ -1,7 +1,8 @@
|
||||
use interface::{Compiler, Result};
|
||||
use util;
|
||||
use proc_macro_decls;
|
||||
use crate::interface::{Compiler, Result};
|
||||
use crate::util;
|
||||
use crate::proc_macro_decls;
|
||||
|
||||
use log::{debug, info, warn, log_enabled};
|
||||
use rustc::dep_graph::DepGraph;
|
||||
use rustc::hir;
|
||||
use rustc::hir::lowering::lower_crate;
|
||||
@ -20,6 +21,7 @@ use rustc::session::search_paths::PathKind;
|
||||
use rustc_allocator as allocator;
|
||||
use rustc_borrowck as borrowck;
|
||||
use rustc_codegen_utils::codegen_backend::CodegenBackend;
|
||||
use rustc_data_structures::{box_region_allow_access, declare_box_region_type, parallel};
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_data_structures::sync::{Lrc, ParallelIterator, par_iter};
|
||||
@ -758,7 +760,7 @@ pub fn prepare_outputs(
|
||||
Ok(outputs)
|
||||
}
|
||||
|
||||
pub fn default_provide(providers: &mut ty::query::Providers) {
|
||||
pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
|
||||
providers.analysis = analysis;
|
||||
proc_macro_decls::provide(providers);
|
||||
plugin::build::provide(providers);
|
||||
@ -783,7 +785,7 @@ pub fn default_provide(providers: &mut ty::query::Providers) {
|
||||
lint::provide(providers);
|
||||
}
|
||||
|
||||
pub fn default_provide_extern(providers: &mut ty::query::Providers) {
|
||||
pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) {
|
||||
cstore::provide_extern(providers);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
use log::debug;
|
||||
use rustc::dep_graph::DepNode;
|
||||
use rustc::session::Session;
|
||||
use rustc::util::common::{ProfQDumpParams, ProfileQueriesMsg, profq_msg, profq_set_chan};
|
||||
use std::sync::mpsc::{Receiver};
|
||||
use std::io::{Write};
|
||||
use rustc::dep_graph::{DepNode};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
pub mod trace;
|
||||
|
@ -1,5 +1,6 @@
|
||||
use interface::{Compiler, Result};
|
||||
use passes::{self, BoxedResolver, ExpansionResult, BoxedGlobalCtxt, PluginInfo};
|
||||
use crate::interface::{Compiler, Result};
|
||||
use crate::passes::{self, BoxedResolver, ExpansionResult, BoxedGlobalCtxt, PluginInfo};
|
||||
|
||||
use rustc_incremental::DepGraphFuture;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc::session::config::{Input, OutputFilenames, OutputType};
|
||||
|
@ -1,3 +1,4 @@
|
||||
use log::info;
|
||||
use rustc::session::config::{Input, OutputFilenames, ErrorOutputType};
|
||||
use rustc::session::{self, config, early_error, filesearch, Session, DiagnosticOutput};
|
||||
use rustc::session::CrateDisambiguator;
|
||||
|
Loading…
Reference in New Issue
Block a user