Skip to content

Commit 8c000a6

Browse files
committed
Add missing extern crate rustc_driver
1 parent 7837058 commit 8c000a6

15 files changed

+72
-0
lines changed

src/test/run-make-fulldeps/save-analysis/foo.rs

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
extern crate rustc_graphviz;
66
// A simple rust project
77

8+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
9+
// files.
10+
#[allow(unused_extern_crates)]
11+
extern crate rustc_driver;
12+
813
extern crate krate2;
914
extern crate krate2 as krate3;
1015

src/test/ui-fulldeps/deriving-encodable-decodable-box.rs

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
extern crate rustc_macros;
77
extern crate rustc_serialize;
88

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

src/test/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
extern crate rustc_macros;
99
extern crate rustc_serialize;
1010

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

src/test/ui-fulldeps/deriving-global.rs

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
extern crate rustc_macros;
66
extern crate rustc_serialize;
77

8+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
9+
// files.
10+
#[allow(unused_extern_crates)]
11+
extern crate rustc_driver;
12+
813
mod submod {
914
use rustc_macros::{Decodable, Encodable};
1015

src/test/ui-fulldeps/deriving-hygiene.rs

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ extern crate rustc_serialize;
77

88
use rustc_macros::{Decodable, Encodable};
99

10+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
11+
// files.
12+
#[allow(unused_extern_crates)]
13+
extern crate rustc_driver;
14+
1015
pub const other: u8 = 1;
1116
pub const f: u8 = 1;
1217
pub const d: u8 = 1;

src/test/ui-fulldeps/dropck_tarena_sound_drop.rs

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
extern crate rustc_arena;
1616

17+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
18+
// files.
19+
#[allow(unused_extern_crates)]
20+
extern crate rustc_driver;
21+
1722
use rustc_arena::TypedArena;
1823

1924
trait HasId { fn count(&self) -> usize; }

src/test/ui-fulldeps/empty-struct-braces-derive.rs

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
extern crate rustc_macros;
77
extern crate rustc_serialize;
88

9+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
10+
// files.
11+
#[allow(unused_extern_crates)]
12+
extern crate rustc_driver;
13+
914
use rustc_macros::{Decodable, Encodable};
1015

1116
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]

src/test/ui-fulldeps/issue-14021.rs

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
extern crate rustc_macros;
88
extern crate rustc_serialize;
99

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

src/test/ui-fulldeps/missing-rustc-driver-error.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
22
// error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
33
// compile-flags: --emit link
4+
// The exactly list of required crates depends on the target. as such only test Unix targets.
5+
// only-unix
46

57
#![feature(rustc_private)]
68

src/test/ui-fulldeps/mod_dir_path_canonicalized.rs

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ extern crate rustc_parse;
1010
extern crate rustc_session;
1111
extern crate rustc_span;
1212

13+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
14+
// files.
15+
#[allow(unused_extern_crates)]
16+
extern crate rustc_driver;
17+
1318
use rustc_parse::new_parser_from_file;
1419
use rustc_session::parse::ParseSess;
1520
use rustc_span::source_map::FilePathMapping;

src/test/ui-fulldeps/pprust-expr-roundtrip.rs

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ extern crate rustc_session;
2727
extern crate rustc_span;
2828
extern crate thin_vec;
2929

30+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
31+
// files.
32+
#[allow(unused_extern_crates)]
33+
extern crate rustc_driver;
34+
3035
use rustc_ast::mut_visit::{self, visit_clobber, MutVisitor};
3136
use rustc_ast::ptr::P;
3237
use rustc_ast::*;

src/test/ui-fulldeps/regions-mock-tcx.rs

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
extern crate rustc_arena;
1515
extern crate libc;
1616

17+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
18+
// files.
19+
#[allow(unused_extern_crates)]
20+
extern crate rustc_driver;
21+
1722
use TypeStructure::{TypeInt, TypeFunction};
1823
use AstKind::{ExprInt, ExprVar, ExprLambda};
1924
use rustc_arena::TypedArena;

src/test/ui-fulldeps/rustc_encodable_hygiene.rs

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ extern crate rustc_macros;
66
#[allow(dead_code)]
77
extern crate rustc_serialize;
88

9+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
10+
// files.
11+
#[allow(unused_extern_crates)]
12+
extern crate rustc_driver;
13+
914
use rustc_macros::{Decodable, Encodable};
1015

1116
#[derive(Decodable, Encodable, Debug)]

src/tools/miri/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ extern crate rustc_session;
5454
extern crate rustc_span;
5555
extern crate rustc_target;
5656

57+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
58+
// files.
59+
#[allow(unused_extern_crates)]
60+
extern crate rustc_driver;
61+
5762
mod borrow_tracker;
5863
mod clock;
5964
mod concurrency;

src/tools/rustfmt/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ extern crate rustc_parse;
2424
extern crate rustc_session;
2525
extern crate rustc_span;
2626

27+
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
28+
// files.
29+
#[allow(unused_extern_crates)]
30+
extern crate rustc_driver;
31+
2732
use std::cell::RefCell;
2833
use std::collections::HashMap;
2934
use std::fmt;

0 commit comments

Comments
 (0)