tests: use force-host
and no-prefer-dynamic
in all proc_macro tests.
This commit is contained in:
parent
fcca22cb40
commit
3369929ddb
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,8 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// no-prefer-dynamic
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,8 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// no-prefer-dynamic
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
// error-pattern: cannot export macro_rules! macros from a `proc-macro` crate
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
#[macro_export]
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![allow(warnings)]
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -10,5 +10,8 @@
|
||||
|
||||
// error-pattern: cannot mix `proc-macro` crate type with others
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -10,3 +10,4 @@
|
||||
|
||||
// error-pattern: cannot mix `proc-macro` crate type with others
|
||||
// compile-flags: --crate-type rlib --crate-type proc-macro
|
||||
// force-host
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type="proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
// check that having extern "C" functions in a proc macro doesn't crash.
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro_hygiene, proc_macro_quote)]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,8 +8,10 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
// compile-flags:--crate-type proc-macro
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro_quote, proc_macro_hygiene)]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type="proc-macro"]
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type="proc-macro"]
|
||||
#![crate_name="some_macros"]
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,8 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// no-prefer-dynamic
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span)]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,35 +1,35 @@
|
||||
error: `#[proc_macro]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:19:1
|
||||
--> $DIR/invalid-attributes.rs:20:1
|
||||
|
|
||||
LL | #[proc_macro = "test"] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[proc_macro]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:22:1
|
||||
--> $DIR/invalid-attributes.rs:23:1
|
||||
|
|
||||
LL | #[proc_macro()] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[proc_macro]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:25:1
|
||||
--> $DIR/invalid-attributes.rs:26:1
|
||||
|
|
||||
LL | #[proc_macro(x)] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[proc_macro_attribute]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:28:1
|
||||
--> $DIR/invalid-attributes.rs:29:1
|
||||
|
|
||||
LL | #[proc_macro_attribute = "test"] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[proc_macro_attribute]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:31:1
|
||||
--> $DIR/invalid-attributes.rs:32:1
|
||||
|
|
||||
LL | #[proc_macro_attribute()] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[proc_macro_attribute]` attribute does not take any arguments
|
||||
--> $DIR/invalid-attributes.rs:34:1
|
||||
--> $DIR/invalid-attributes.rs:35:1
|
||||
|
|
||||
LL | #[proc_macro_attribute(x)] //~ ERROR: does not take any arguments
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,53 +1,53 @@
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:34:5
|
||||
--> $DIR/macro-namespace-reserved-2.rs:35:5
|
||||
|
|
||||
LL | my_macro!(); //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:37:5
|
||||
--> $DIR/macro-namespace-reserved-2.rs:38:5
|
||||
|
|
||||
LL | my_macro_attr!(); //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:40:5
|
||||
--> $DIR/macro-namespace-reserved-2.rs:41:5
|
||||
|
|
||||
LL | MyTrait!(); //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:43:3
|
||||
--> $DIR/macro-namespace-reserved-2.rs:44:3
|
||||
|
|
||||
LL | #[my_macro] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:45:3
|
||||
--> $DIR/macro-namespace-reserved-2.rs:46:3
|
||||
|
|
||||
LL | #[my_macro_attr] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:47:3
|
||||
--> $DIR/macro-namespace-reserved-2.rs:48:3
|
||||
|
|
||||
LL | #[MyTrait] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:50:10
|
||||
--> $DIR/macro-namespace-reserved-2.rs:51:10
|
||||
|
|
||||
LL | #[derive(my_macro)] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:52:10
|
||||
--> $DIR/macro-namespace-reserved-2.rs:53:10
|
||||
|
|
||||
LL | #[derive(my_macro_attr)] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: can't use a procedural macro from the same crate that defines it
|
||||
--> $DIR/macro-namespace-reserved-2.rs:54:10
|
||||
--> $DIR/macro-namespace-reserved-2.rs:55:10
|
||||
|
|
||||
LL | #[derive(MyTrait)] //~ ERROR can't use a procedural macro from the same crate that defines it
|
||||
| ^^^^^^^
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(decl_macro)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0428]: the name `my_macro` is defined multiple times
|
||||
--> $DIR/macro-namespace-reserved.rs:34:1
|
||||
--> $DIR/macro-namespace-reserved.rs:35:1
|
||||
|
|
||||
LL | pub fn my_macro(input: TokenStream) -> TokenStream {
|
||||
| -------------------------------------------------- previous definition of the macro `my_macro` here
|
||||
@ -10,7 +10,7 @@ LL | macro my_macro() {} //~ ERROR the name `my_macro` is defined multiple times
|
||||
= note: `my_macro` must be defined only once in the macro namespace of this module
|
||||
|
||||
error[E0428]: the name `my_macro_attr` is defined multiple times
|
||||
--> $DIR/macro-namespace-reserved.rs:35:1
|
||||
--> $DIR/macro-namespace-reserved.rs:36:1
|
||||
|
|
||||
LL | pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream {
|
||||
| ----------------------------------------------------------------------- previous definition of the macro `my_macro_attr` here
|
||||
@ -21,7 +21,7 @@ LL | macro my_macro_attr() {} //~ ERROR the name `my_macro_attr` is defined mult
|
||||
= note: `my_macro_attr` must be defined only once in the macro namespace of this module
|
||||
|
||||
error[E0428]: the name `MyTrait` is defined multiple times
|
||||
--> $DIR/macro-namespace-reserved.rs:36:1
|
||||
--> $DIR/macro-namespace-reserved.rs:37:1
|
||||
|
|
||||
LL | #[proc_macro_derive(MyTrait)]
|
||||
| ------- previous definition of the macro `MyTrait` here
|
||||
@ -32,7 +32,7 @@ LL | macro MyTrait() {} //~ ERROR the name `MyTrait` is defined multiple times
|
||||
= note: `MyTrait` must be defined only once in the macro namespace of this module
|
||||
|
||||
error[E0428]: the name `SameName` is defined multiple times
|
||||
--> $DIR/macro-namespace-reserved.rs:44:1
|
||||
--> $DIR/macro-namespace-reserved.rs:45:1
|
||||
|
|
||||
LL | #[proc_macro_derive(SameName)]
|
||||
| -------- previous definition of the macro `SameName` here
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: functions tagged with `#[proc_macro]` must currently reside in the root of the crate
|
||||
--> $DIR/non-root.rs:20:5
|
||||
--> $DIR/non-root.rs:21:5
|
||||
|
|
||||
LL | pub fn foo(arg: TokenStream) -> TokenStream { arg }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,3 +1,6 @@
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,17 +1,17 @@
|
||||
error: name `cfg` is reserved in macro namespace
|
||||
--> $DIR/reserved-macro-names.rs:7:8
|
||||
--> $DIR/reserved-macro-names.rs:10:8
|
||||
|
|
||||
LL | pub fn cfg(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
| ^^^
|
||||
|
||||
error: name `cfg_attr` is reserved in macro namespace
|
||||
--> $DIR/reserved-macro-names.rs:13:8
|
||||
--> $DIR/reserved-macro-names.rs:16:8
|
||||
|
|
||||
LL | pub fn cfg_attr(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
| ^^^^^^^^
|
||||
|
||||
error: name `derive` is reserved in macro namespace
|
||||
--> $DIR/reserved-macro-names.rs:19:8
|
||||
--> $DIR/reserved-macro-names.rs:22:8
|
||||
|
|
||||
LL | pub fn derive(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
| ^^^^^^
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![allow(warnings)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/signature.rs:17:1
|
||||
--> $DIR/signature.rs:20:1
|
||||
|
|
||||
LL | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 {
|
||||
LL | | //~^ ERROR: mismatched types
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
// compile-pass
|
||||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![deny(rust_2018_compatibility)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user