Use #![register_tool] instead of #![register_attr]

CC https://github.com/rust-lang/rust/issues/66079
This commit is contained in:
Simon Sapin 2019-11-12 22:16:08 +01:00
parent 091feba0ba
commit bea73951db
46 changed files with 129 additions and 105 deletions

View file

@ -196,7 +196,7 @@ fn create_buffer_queue(mut buffers: VecDeque<SendTendril<UTF8>>) -> BufferQueue
// |_____________| |_______________|
//
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
pub struct Tokenizer {
document: Dom<Document>,
#[ignore_malloc_size_of = "Defined in std"]

View file

@ -30,7 +30,7 @@ use servo_url::ServoUrl;
use std::io;
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
pub struct Tokenizer {
#[ignore_malloc_size_of = "Defined in html5ever"]
inner: HtmlTokenizer<TreeBuilder<Dom<Node>, Sink>>,

View file

@ -626,7 +626,7 @@ enum ParserKind {
}
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
enum Tokenizer {
Html(self::html::Tokenizer),
AsyncHtml(self::async_html::Tokenizer),
@ -945,7 +945,7 @@ fn insert(parent: &Node, reference_child: Option<&Node>, child: NodeOrText<Dom<N
}
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
pub struct Sink {
base_url: ServoUrl,
document: Dom<Document>,

View file

@ -32,7 +32,7 @@ use servo_url::ImmutableOrigin;
use servo_url::ServoUrl;
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
pub struct Tokenizer {
#[ignore_malloc_size_of = "Defined in html5ever"]
inner: HtmlTokenizer<PrefetchSink>,

View file

@ -17,7 +17,7 @@ use xml5ever::tokenizer::XmlTokenizer;
use xml5ever::tree_builder::{Tracer as XmlTracer, XmlTreeBuilder};
#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
#[unrooted_must_root_lint::must_root]
pub struct Tokenizer {
#[ignore_malloc_size_of = "Defined in xml5ever"]
inner: XmlTokenizer<XmlTreeBuilder<Dom<Node>, Sink>>,