commit
7012c42c41
@ -148,15 +148,6 @@ pub fn syntax_expander_table() -> SyntaxEnv {
|
|||||||
syntax_expanders.insert(@~"deriving",
|
syntax_expanders.insert(@~"deriving",
|
||||||
@SE(ItemDecorator(
|
@SE(ItemDecorator(
|
||||||
ext::deriving::expand_meta_deriving)));
|
ext::deriving::expand_meta_deriving)));
|
||||||
syntax_expanders.insert(@~"deriving_eq",
|
|
||||||
@SE(ItemDecorator(
|
|
||||||
ext::deriving::eq::expand_deriving_obsolete)));
|
|
||||||
syntax_expanders.insert(@~"deriving_iter_bytes",
|
|
||||||
@SE(ItemDecorator(
|
|
||||||
ext::deriving::iter_bytes::expand_deriving_obsolete)));
|
|
||||||
syntax_expanders.insert(@~"deriving_clone",
|
|
||||||
@SE(ItemDecorator(
|
|
||||||
ext::deriving::clone::expand_deriving_obsolete)));
|
|
||||||
|
|
||||||
// Quasi-quoting expanders
|
// Quasi-quoting expanders
|
||||||
syntax_expanders.insert(@~"quote_tokens",
|
syntax_expanders.insert(@~"quote_tokens",
|
||||||
|
@ -42,15 +42,6 @@ pub fn expand_deriving_clone(cx: @ext_ctxt,
|
|||||||
&trait_def)
|
&trait_def)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn expand_deriving_obsolete(cx: @ext_ctxt,
|
|
||||||
span: span,
|
|
||||||
_mitem: @meta_item,
|
|
||||||
in_items: ~[@item])
|
|
||||||
-> ~[@item] {
|
|
||||||
cx.span_err(span, ~"`#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead");
|
|
||||||
in_items
|
|
||||||
}
|
|
||||||
|
|
||||||
fn cs_clone(cx: @ext_ctxt, span: span,
|
fn cs_clone(cx: @ext_ctxt, span: span,
|
||||||
substr: &Substructure) -> @expr {
|
substr: &Substructure) -> @expr {
|
||||||
let clone_ident = substr.method_ident;
|
let clone_ident = substr.method_ident;
|
||||||
|
@ -56,11 +56,3 @@ pub fn expand_deriving_eq(cx: @ext_ctxt,
|
|||||||
expand_deriving_generic(cx, span, mitem, in_items,
|
expand_deriving_generic(cx, span, mitem, in_items,
|
||||||
&trait_def)
|
&trait_def)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn expand_deriving_obsolete(cx: @ext_ctxt,
|
|
||||||
span: span,
|
|
||||||
_mitem: @meta_item,
|
|
||||||
in_items: ~[@item]) -> ~[@item] {
|
|
||||||
cx.span_err(span, ~"`#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead");
|
|
||||||
in_items
|
|
||||||
}
|
|
||||||
|
@ -41,16 +41,6 @@ pub fn expand_deriving_iter_bytes(cx: @ext_ctxt,
|
|||||||
expand_deriving_generic(cx, span, mitem, in_items, &trait_def)
|
expand_deriving_generic(cx, span, mitem, in_items, &trait_def)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn expand_deriving_obsolete(cx: @ext_ctxt,
|
|
||||||
span: span,
|
|
||||||
_mitem: @meta_item,
|
|
||||||
in_items: ~[@item])
|
|
||||||
-> ~[@item] {
|
|
||||||
cx.span_err(span, ~"`#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` \
|
|
||||||
instead");
|
|
||||||
in_items
|
|
||||||
}
|
|
||||||
|
|
||||||
fn iter_bytes_substructure(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr {
|
fn iter_bytes_substructure(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr {
|
||||||
let lsb0_f = match substr.nonself_args {
|
let lsb0_f = match substr.nonself_args {
|
||||||
[l, f] => ~[l, f],
|
[l, f] => ~[l, f],
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
// file at the top-level directory of this distribution and at
|
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
// option. This file may not be copied, modified, or distributed
|
|
||||||
// except according to those terms.
|
|
||||||
|
|
||||||
#[deriving_clone] //~ ERROR `#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead
|
|
||||||
#[deriving_eq] //~ ERROR `#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead
|
|
||||||
#[deriving_iter_bytes]
|
|
||||||
//~^ ERROR `#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` instead
|
|
||||||
struct Foo;
|
|
||||||
|
|
||||||
pub fn main() { }
|
|
Loading…
Reference in New Issue
Block a user