syntax: Conditionally deriving(Hash) with Writers

If #[feature(default_type_parameters)] is enabled for a crate, then
deriving(Hash) will expand with Hash<W: Writer> instead of Hash<SipState> so
more hash algorithms can be used.
This commit is contained in:
Alex Crichton
2014-02-28 23:17:38 -08:00
parent bec7b766fb
commit 0a84132928
9 changed files with 128 additions and 97 deletions

View File

@@ -283,7 +283,7 @@ pub struct ExtCtxt<'a> {
parse_sess: @parse::ParseSess,
cfg: ast::CrateConfig,
backtrace: Option<@ExpnInfo>,
loader: &'a mut CrateLoader,
ecfg: expand::ExpansionConfig<'a>,
mod_path: Vec<ast::Ident> ,
trace_mac: bool
@@ -291,13 +291,13 @@ pub struct ExtCtxt<'a> {
impl<'a> ExtCtxt<'a> {
pub fn new<'a>(parse_sess: @parse::ParseSess, cfg: ast::CrateConfig,
loader: &'a mut CrateLoader) -> ExtCtxt<'a> {
ecfg: expand::ExpansionConfig<'a>) -> ExtCtxt<'a> {
ExtCtxt {
parse_sess: parse_sess,
cfg: cfg,
backtrace: None,
loader: loader,
mod_path: Vec::new(),
ecfg: ecfg,
trace_mac: false
}
}