3 #![feature(plugin_registrar)]
4 #![feature(box_syntax, rustc_private)]
6 extern crate rustc_middle;
7 extern crate rustc_driver;
10 use std::cell::RefCell;
11 use rustc_driver::plugin::Registry;
22 pub fn registrar(_: &mut Registry) {
23 thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
24 FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box<Any+Send>));