diff options
Diffstat (limited to 'src/librustc/util/common.rs')
| -rw-r--r-- | src/librustc/util/common.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index ea252d9fd20..30318cc129c 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -25,6 +25,8 @@ use syntax::visit::Visitor; #[deriving(Clone,Show)] pub struct ErrorReported; +impl Copy for ErrorReported {} + pub fn time<T, U>(do_it: bool, what: &str, u: U, f: |U| -> T) -> T { thread_local!(static DEPTH: Cell<uint> = Cell::new(0)); if !do_it { return f(u); } |
