about summary refs log tree commit diff
path: root/src/libsyntax/diagnostic.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-06-15 20:26:59 -0400
committerNiko Matsakis <niko@alum.mit.edu>2013-06-16 12:47:36 -0400
commiteb48c296817be7529a1757ac8d4798112717eaa9 (patch)
treed90d4c97be651ac615f86c6ff74b682218ee1e1c /src/libsyntax/diagnostic.rs
parent682bb4144ca3fddffee8ed2927e7552049fcf25c (diff)
downloadrust-eb48c296817be7529a1757ac8d4798112717eaa9.tar.gz
rust-eb48c296817be7529a1757ac8d4798112717eaa9.zip
Add copies to type params with Copy bound
Diffstat (limited to 'src/libsyntax/diagnostic.rs')
-rw-r--r--src/libsyntax/diagnostic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs
index 1704b4ef6c5..e67ca5260b8 100644
--- a/src/libsyntax/diagnostic.rs
+++ b/src/libsyntax/diagnostic.rs
@@ -318,7 +318,7 @@ pub fn expect<T:Copy>(diag: @span_handler,
                        opt: Option<T>,
                        msg: &fn() -> ~str) -> T {
     match opt {
-       Some(ref t) => (*t),
+       Some(ref t) => copy *t,
        None => diag.handler().bug(msg())
     }
 }