diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-06-15 20:26:59 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-06-16 12:47:36 -0400 |
| commit | eb48c296817be7529a1757ac8d4798112717eaa9 (patch) | |
| tree | d90d4c97be651ac615f86c6ff74b682218ee1e1c /src/libsyntax/diagnostic.rs | |
| parent | 682bb4144ca3fddffee8ed2927e7552049fcf25c (diff) | |
| download | rust-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.rs | 2 |
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()) } } |
