Auto merge of #26351 - eddyb:tls-tcx, r=nikomatsakis
Pre-requisite for splitting the type context into global and local parts. The `Repr` and `UserString` traits were also replaced by `Debug` and `Display`.
This commit is contained in:
commit
e4efb47b9d
116 changed files with 3577 additions and 4529 deletions
|
|
@ -29,6 +29,6 @@ struct E<'a,'b:'a,T:'b>(&'a T, &'b T); //~ ERROR 'b
|
|||
struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); //~ ERROR 'a,'b
|
||||
|
||||
#[rustc_object_lifetime_default]
|
||||
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Ambiguous
|
||||
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Some(Ambiguous)
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
|
|
@ -221,25 +221,26 @@ fn compile_program(input: &str, sysroot: PathBuf)
|
|||
let arenas = ty::CtxtArenas::new();
|
||||
let ast_map = driver::assign_node_ids_and_map(&sess, &mut forest);
|
||||
|
||||
let analysis = driver::phase_3_run_analysis_passes(
|
||||
sess, ast_map, &arenas, id, MakeGlobMap::No);
|
||||
driver::phase_3_run_analysis_passes(
|
||||
sess, ast_map, &arenas, id, MakeGlobMap::No, |tcx, analysis| {
|
||||
|
||||
let (tcx, trans) = driver::phase_4_translate_to_llvm(analysis);
|
||||
let trans = driver::phase_4_translate_to_llvm(tcx, analysis);
|
||||
|
||||
let crates = tcx.sess.cstore.get_used_crates(RequireDynamic);
|
||||
let crates = tcx.sess.cstore.get_used_crates(RequireDynamic);
|
||||
|
||||
// Collect crates used in the session.
|
||||
// Reverse order finds dependencies first.
|
||||
let deps = crates.into_iter().rev()
|
||||
.filter_map(|(_, p)| p).collect();
|
||||
// Collect crates used in the session.
|
||||
// Reverse order finds dependencies first.
|
||||
let deps = crates.into_iter().rev()
|
||||
.filter_map(|(_, p)| p).collect();
|
||||
|
||||
assert_eq!(trans.modules.len(), 1);
|
||||
let llmod = trans.modules[0].llmod;
|
||||
assert_eq!(trans.modules.len(), 1);
|
||||
let llmod = trans.modules[0].llmod;
|
||||
|
||||
// Workaround because raw pointers do not impl Send
|
||||
let modp = llmod as usize;
|
||||
// Workaround because raw pointers do not impl Send
|
||||
let modp = llmod as usize;
|
||||
|
||||
(modp, deps)
|
||||
(modp, deps)
|
||||
}).1
|
||||
}).unwrap();
|
||||
|
||||
match handle.join() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue