mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
Document #![register_tool]
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ compile-flags: -Z crate-attr=feature(register_tool) -Z crate-attr=register_tool(foo)
|
||||
|
||||
#[allow(foo::bar)]
|
||||
fn main() {}
|
||||
@@ -0,0 +1,7 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(register_tool)]
|
||||
#![register_tool(foo, bar, baz)]
|
||||
|
||||
#[allow(foo::a, bar::b, baz::c)]
|
||||
fn main() {}
|
||||
@@ -0,0 +1,4 @@
|
||||
#![feature(register_tool)]
|
||||
#![register_tool(foo::bar)] //~ ERROR only accepts identifiers
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,8 @@
|
||||
error: `register_tool` only accepts identifiers
|
||||
--> $DIR/nested-disallowed.rs:2:18
|
||||
|
|
||||
LL | #![register_tool(foo::bar)]
|
||||
| ^^^^^^^^ not an identifier
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
Reference in New Issue
Block a user