diff options
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 \ |
