diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs
index fbbee2e625a..dd1f9c3404f 100644
--- a/src/test/auxiliary/macro_crate_test.rs
+++ b/src/test/auxiliary/macro_crate_test.rs
@@ -20,10 +20,9 @@ use syntax::codemap::Span;
 use syntax::ext::base::*;
 use syntax::parse::token;
 use syntax::parse;
+use syntax::ptr::P;
 use rustc::plugin::Registry;
 
-use std::gc::{Gc, GC};
-
 #[macro_export]
 macro_rules! exported_macro (() => (2i))
 
@@ -57,12 +56,12 @@ fn expand_identity(cx: &mut ExtCtxt, _span: Span, tts: &[TokenTree])
     MacExpr::new(quote_expr!(&mut *cx, $expr))
 }
 
-fn expand_into_foo(cx: &mut ExtCtxt, sp: Span, attr: Gc<MetaItem>, it: Gc<Item>)
-                   -> Gc<Item> {
-    box(GC) Item {
+fn expand_into_foo(cx: &mut ExtCtxt, sp: Span, attr: &MetaItem, it: P<Item>)
+                   -> P<Item> {
+    P(Item {
         attrs: it.attrs.clone(),
         ..(*quote_item!(cx, enum Foo { Bar, Baz }).unwrap()).clone()
-    }
+    })
 }
 
 fn expand_forged_ident(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree]) -> Box<MacResult+'static> {
diff --git a/src/test/run-pass-fulldeps/quote-tokens.rs b/src/test/run-pass-fulldeps/quote-tokens.rs
index 60b8f09bb3d..b7c4c146382 100644
--- a/src/test/run-pass-fulldeps/quote-tokens.rs
+++ b/src/test/run-pass-fulldeps/quote-tokens.rs
@@ -16,24 +16,24 @@
 extern crate syntax;
 
 use syntax::ext::base::ExtCtxt;
-use std::gc::Gc;
+use syntax::ptr::P;
 
 fn syntax_extension(cx: &ExtCtxt) {
     let e_toks : Vec<syntax::ast::TokenTree> = quote_tokens!(cx, 1 + 2);
     let p_toks : Vec<syntax::ast::TokenTree> = quote_tokens!(cx, (x, 1 .. 4, *));
 
-    let a: Gc<syntax::ast::Expr> = quote_expr!(cx, 1 + 2);
-    let _b: Option<Gc<syntax::ast::Item>> = quote_item!(cx, static foo : int = $e_toks; );
-    let _c: Gc<syntax::ast::Pat> = quote_pat!(cx, (x, 1 .. 4, *) );
-    let _d: Gc<syntax::ast::Stmt> = quote_stmt!(cx, let x = $a; );
+    let a: P<syntax::ast::Expr> = quote_expr!(cx, 1 + 2);
+    let _b: Option<P<syntax::ast::Item>> = quote_item!(cx, static foo : int = $e_toks; );
+    let _c: P<syntax::ast::Pat> = quote_pat!(cx, (x, 1 .. 4, *) );
+    let _d: P<syntax::ast::Stmt> = quote_stmt!(cx, let x = $a; );
     let _d: syntax::ast::Arm = quote_arm!(cx, (ref x, ref y) = (x, y) );
-    let _e: Gc<syntax::ast::Expr> = quote_expr!(cx, match foo { $p_toks => 10 } );
+    let _e: P<syntax::ast::Expr> = quote_expr!(cx, match foo { $p_toks => 10 } );
 
-    let _f: Gc<syntax::ast::Expr> = quote_expr!(cx, ());
-    let _g: Gc<syntax::ast::Expr> = quote_expr!(cx, true);
-    let _h: Gc<syntax::ast::Expr> = quote_expr!(cx, 'a');
+    let _f: P<syntax::ast::Expr> = quote_expr!(cx, ());
+    let _g: P<syntax::ast::Expr> = quote_expr!(cx, true);
+    let _h: P<syntax::ast::Expr> = quote_expr!(cx, 'a');
 
-    let i: Option<Gc<syntax::ast::Item>> = quote_item!(cx, #[deriving(Eq)] struct Foo; );
+    let i: Option<P<syntax::ast::Item>> = quote_item!(cx, #[deriving(Eq)] struct Foo; );
     assert!(i.is_some());
 }