diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-12-23 10:57:44 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-12-26 17:26:33 +0100 |
| commit | 607f60712c7c9d3b96a162d2605a89ff2554fc7e (patch) | |
| tree | 36b9a252c1815eccdc4f9057b0e93a2eb561b392 /src/libsyntax/ext | |
| parent | 88186934960dae4f616df815eb25205c2713f503 (diff) | |
| download | rust-607f60712c7c9d3b96a162d2605a89ff2554fc7e.tar.gz rust-607f60712c7c9d3b96a162d2605a89ff2554fc7e.zip | |
Keep track of the whole error chain
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/bounds.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/ext/deriving/bounds.rs b/src/libsyntax/ext/deriving/bounds.rs index c27a27fce6a..cf29bb048d6 100644 --- a/src/libsyntax/ext/deriving/bounds.rs +++ b/src/libsyntax/ext/deriving/bounds.rs @@ -26,8 +26,11 @@ pub fn expand_deriving_bound<F>(cx: &mut ExtCtxt, MetaWord(ref tname) => { match tname.get() { "Copy" => "Copy", - "Send" => "Send", - "Sync" => "Sync", + "Send" | "Sync" => { + return cx.span_err(span, + format!("{} is an unsafe trait and it \ + should be implemented explicitly", *tname)[]) + } ref tname => { cx.span_bug(span, format!("expected built-in trait name but \ |
