]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail-fulldeps/gated-quote.rs
Rollup merge of #45171 - rust-lang:petrochenkov-patch-2, r=steveklabnik
[rust.git] / src / test / compile-fail-fulldeps / gated-quote.rs
index 3480bd895bf1cabb56602da59851abc89de9fd03..63e1c6f16b3e6be4b8ac4727833ef6f6cf182d9c 100644 (file)
 
 use syntax::ast;
 use syntax::parse;
-use syntax_pos::Span;
 
 struct ParseSess;
 
 impl ParseSess {
     fn cfg(&self) -> ast::CrateConfig { loop { } }
     fn parse_sess<'a>(&'a self) -> &'a parse::ParseSess { loop { } }
-    fn call_site(&self) -> Span { loop { } }
+    fn call_site(&self) -> () { loop { } }
     fn ident_of(&self, st: &str) -> ast::Ident { loop { } }
     fn name_of(&self, st: &str) -> ast::Name { loop { } }
 }
 
 pub fn main() {
     let ecx = &ParseSess;
-    let x = quote_tokens!(ecx, 3);    //~ ERROR macro undefined: `quote_tokens`
-    let x = quote_expr!(ecx, 3);      //~ ERROR macro undefined: `quote_expr`
-    let x = quote_ty!(ecx, 3);        //~ ERROR macro undefined: `quote_ty`
-    let x = quote_method!(ecx, 3);    //~ ERROR macro undefined: `quote_method`
-    let x = quote_item!(ecx, 3);      //~ ERROR macro undefined: `quote_item`
-    let x = quote_pat!(ecx, 3);       //~ ERROR macro undefined: `quote_pat`
-    let x = quote_arm!(ecx, 3);       //~ ERROR macro undefined: `quote_arm`
-    let x = quote_stmt!(ecx, 3);      //~ ERROR macro undefined: `quote_stmt`
-    let x = quote_matcher!(ecx, 3);   //~ ERROR macro undefined: `quote_matcher`
-    let x = quote_attr!(ecx, 3);      //~ ERROR macro undefined: `quote_attr`
-    let x = quote_arg!(ecx, 3);       //~ ERROR macro undefined: `quote_arg`
-    let x = quote_block!(ecx, 3);     //~ ERROR macro undefined: `quote_block`
-    let x = quote_meta_item!(ecx, 3); //~ ERROR macro undefined: `quote_meta_item`
-    let x = quote_path!(ecx, 3);      //~ ERROR macro undefined: `quote_path`
+    let x = quote_tokens!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_tokens!` in this scope
+    let x = quote_expr!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_expr!` in this scope
+    let x = quote_ty!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_ty!` in this scope
+    let x = quote_method!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_method!` in this scope
+    let x = quote_item!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_item!` in this scope
+    let x = quote_pat!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_pat!` in this scope
+    let x = quote_arm!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_arm!` in this scope
+    let x = quote_stmt!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_stmt!` in this scope
+    let x = quote_attr!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_attr!` in this scope
+    let x = quote_arg!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_arg!` in this scope
+    let x = quote_block!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_block!` in this scope
+    let x = quote_meta_item!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_meta_item!` in this scope
+    let x = quote_path!(ecx, 3);
+    //~^ ERROR cannot find macro `quote_path!` in this scope
 }