Add missing extern crate rustc_driver

This commit is contained in:
bjorn3 2022-12-12 19:37:28 +00:00
parent 7837058073
commit 8c000a68c5
15 changed files with 72 additions and 0 deletions

View File

@ -5,6 +5,11 @@
extern crate rustc_graphviz;
// A simple rust project
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
extern crate krate2;
extern crate krate2 as krate3;

View File

@ -6,6 +6,11 @@
extern crate rustc_macros;
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_macros::{Decodable, Encodable};
use rustc_serialize::opaque::{MemDecoder, MemEncoder};
use rustc_serialize::{Decodable, Encodable, Encoder};

View File

@ -8,6 +8,11 @@
extern crate rustc_macros;
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_macros::{Decodable, Encodable};
use rustc_serialize::opaque::{MemDecoder, MemEncoder};
use rustc_serialize::{Decodable, Encodable, Encoder};

View File

@ -5,6 +5,11 @@
extern crate rustc_macros;
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
mod submod {
use rustc_macros::{Decodable, Encodable};

View File

@ -7,6 +7,11 @@ extern crate rustc_serialize;
use rustc_macros::{Decodable, Encodable};
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
pub const other: u8 = 1;
pub const f: u8 = 1;
pub const d: u8 = 1;

View File

@ -14,6 +14,11 @@
extern crate rustc_arena;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_arena::TypedArena;
trait HasId { fn count(&self) -> usize; }

View File

@ -6,6 +6,11 @@
extern crate rustc_macros;
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_macros::{Decodable, Encodable};
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]

View File

@ -7,6 +7,11 @@
extern crate rustc_macros;
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_macros::{Decodable, Encodable};
use rustc_serialize::opaque::{MemDecoder, MemEncoder};
use rustc_serialize::{Decodable, Encodable, Encoder};

View File

@ -1,6 +1,8 @@
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
// error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
// compile-flags: --emit link
// The exactly list of required crates depends on the target. as such only test Unix targets.
// only-unix
#![feature(rustc_private)]

View File

@ -10,6 +10,11 @@ extern crate rustc_parse;
extern crate rustc_session;
extern crate rustc_span;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_parse::new_parser_from_file;
use rustc_session::parse::ParseSess;
use rustc_span::source_map::FilePathMapping;

View File

@ -27,6 +27,11 @@ extern crate rustc_session;
extern crate rustc_span;
extern crate thin_vec;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_ast::mut_visit::{self, visit_clobber, MutVisitor};
use rustc_ast::ptr::P;
use rustc_ast::*;

View File

@ -14,6 +14,11 @@
extern crate rustc_arena;
extern crate libc;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use TypeStructure::{TypeInt, TypeFunction};
use AstKind::{ExprInt, ExprVar, ExprLambda};
use rustc_arena::TypedArena;

View File

@ -6,6 +6,11 @@ extern crate rustc_macros;
#[allow(dead_code)]
extern crate rustc_serialize;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use rustc_macros::{Decodable, Encodable};
#[derive(Decodable, Encodable, Debug)]

View File

@ -54,6 +54,11 @@ extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
mod borrow_tracker;
mod clock;
mod concurrency;

View File

@ -24,6 +24,11 @@ extern crate rustc_parse;
extern crate rustc_session;
extern crate rustc_span;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.
#[allow(unused_extern_crates)]
extern crate rustc_driver;
use std::cell::RefCell;
use std::collections::HashMap;
use std::fmt;