Skip to content

Commit

Permalink
Remove remaining tests for hygiene-encoded identifiers.
Browse files Browse the repository at this point in the history
Such things no longer exist.
  • Loading branch information
goffrie committed Mar 10, 2015
1 parent f2e5836 commit 5663836
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 126 deletions.
26 changes: 0 additions & 26 deletions src/test/auxiliary/macro_crate_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ macro_rules! unexported_macro { () => (3) }
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_macro("make_a_1", expand_make_a_1);
reg.register_macro("forged_ident", expand_forged_ident);
reg.register_macro("identity", expand_identity);
reg.register_syntax_extension(
token::intern("into_foo"),
Expand Down Expand Up @@ -94,29 +93,4 @@ fn expand_into_foo_multi(cx: &mut ExtCtxt,
}
}

fn expand_forged_ident(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree]) -> Box<MacResult+'static> {
use syntax::ext::quote::rt::*;

if !tts.is_empty() {
cx.span_fatal(sp, "forged_ident takes no arguments");
}

// Most of this is modelled after the expansion of the `quote_expr!`
// macro ...
let parse_sess = cx.parse_sess();
let cfg = cx.cfg();

// ... except this is where we inject a forged identifier,
// and deliberately do not call `cx.parse_tts_with_hygiene`
// (because we are testing that this will be *rejected*
// by the default parser).

let expr = {
let tt = cx.parse_tts("\x00name_2,ctxt_0\x00".to_string());
let mut parser = new_parser_from_tts(parse_sess, cfg, tt);
parser.parse_expr()
};
MacEager::expr(expr)
}

pub fn foo() {}

This file was deleted.

28 changes: 0 additions & 28 deletions src/test/run-make/cannot-read-embedded-idents/Makefile

This file was deleted.

This file was deleted.

0 comments on commit 5663836

Please sign in to comment.