mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Use #![register_tool]
instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
This commit is contained in:
parent
091feba0ba
commit
bea73951db
46 changed files with 129 additions and 105 deletions
|
@ -6,11 +6,12 @@
|
|||
pub mod unrooted_must_root {
|
||||
/**
|
||||
```
|
||||
#![feature(plugin)]
|
||||
#![feature(plugin, register_tool)]
|
||||
#![plugin(script_plugins)]
|
||||
#![register_tool(unrooted_must_root_lint)]
|
||||
|
||||
#[must_root] struct Foo(i32);
|
||||
#[must_root] struct Bar(Foo);
|
||||
#[unrooted_must_root_lint::must_root] struct Foo(i32);
|
||||
#[unrooted_must_root_lint::must_root] struct Bar(Foo);
|
||||
|
||||
fn foo1(_: &Foo) {}
|
||||
fn foo2(_: &()) -> &Foo { unimplemented!() }
|
||||
|
@ -22,10 +23,11 @@ pub mod unrooted_must_root {
|
|||
|
||||
/**
|
||||
```compile_fail
|
||||
#![feature(plugin)]
|
||||
#![feature(plugin, register_tool)]
|
||||
#![plugin(script_plugins)]
|
||||
#![register_tool(unrooted_must_root_lint)]
|
||||
|
||||
#[must_root] struct Foo(i32);
|
||||
#[unrooted_must_root_lint::must_root] struct Foo(i32);
|
||||
struct Bar(Foo);
|
||||
|
||||
fn main() {}
|
||||
|
@ -35,10 +37,11 @@ pub mod unrooted_must_root {
|
|||
|
||||
/**
|
||||
```compile_fail
|
||||
#![feature(plugin)]
|
||||
#![feature(plugin, register_tool)]
|
||||
#![plugin(script_plugins)]
|
||||
#![register_tool(unrooted_must_root_lint)]
|
||||
|
||||
#[must_root] struct Foo(i32);
|
||||
#[unrooted_must_root_lint::must_root] struct Foo(i32);
|
||||
|
||||
fn foo1(_: Foo) {}
|
||||
|
||||
|
@ -49,10 +52,11 @@ pub mod unrooted_must_root {
|
|||
|
||||
/**
|
||||
```compile_fail
|
||||
#![feature(plugin)]
|
||||
#![feature(plugin, register_tool)]
|
||||
#![plugin(script_plugins)]
|
||||
#![register_tool(unrooted_must_root_lint)]
|
||||
|
||||
#[must_root] struct Foo(i32);
|
||||
#[unrooted_must_root_lint::must_root] struct Foo(i32);
|
||||
|
||||
fn foo2() -> Foo { unimplemented!() }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue