Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (28 sloc) 975 Bytes
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
//> or the MIT license
// <LICENSE-MIT or>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// force-host
#![feature(box_syntax, rustc_private)]
extern crate rustc;
extern crate rustc_plugin;
use std::any::Any;
use std::cell::RefCell;
use rustc_plugin::Registry;
struct Foo {
foo: isize
impl Drop for Foo {
fn drop(&mut self) {}
pub fn registrar(_: &mut Registry) {
thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box<Any+Send>));
Jump to Line
Something went wrong with that request. Please try again.