mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Add the rust-tenacious move-protection lint, use it for Root<T>
(fixes #5724)
This commit is contained in:
parent
8ecb9d681c
commit
63714ebc5f
5 changed files with 23 additions and 0 deletions
|
@ -7,3 +7,6 @@ authors = ["The Servo Project Developers"]
|
||||||
name = "plugins"
|
name = "plugins"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
plugin = true
|
plugin = true
|
||||||
|
|
||||||
|
[dependencies.tenacious]
|
||||||
|
git = "https://github.com/Manishearth/rust-tenacious.git"
|
|
@ -19,6 +19,8 @@ extern crate syntax;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
|
|
||||||
|
extern crate tenacious;
|
||||||
|
|
||||||
use rustc::lint::LintPassObject;
|
use rustc::lint::LintPassObject;
|
||||||
use rustc::plugin::Registry;
|
use rustc::plugin::Registry;
|
||||||
use syntax::ext::base::{Decorator, Modifier};
|
use syntax::ext::base::{Decorator, Modifier};
|
||||||
|
@ -48,4 +50,5 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
reg.register_lint_pass(box lints::inheritance_integrity::InheritancePass as LintPassObject);
|
reg.register_lint_pass(box lints::inheritance_integrity::InheritancePass as LintPassObject);
|
||||||
reg.register_lint_pass(box lints::str_to_string::StrToStringPass as LintPassObject);
|
reg.register_lint_pass(box lints::str_to_string::StrToStringPass as LintPassObject);
|
||||||
reg.register_lint_pass(box lints::ban::BanPass as LintPassObject);
|
reg.register_lint_pass(box lints::ban::BanPass as LintPassObject);
|
||||||
|
reg.register_lint_pass(box tenacious::TenaciousPass as LintPassObject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -626,6 +626,7 @@ impl RootCollection {
|
||||||
/// for the same JS value. `Root`s cannot outlive the associated
|
/// for the same JS value. `Root`s cannot outlive the associated
|
||||||
/// `RootCollection` object. Attempts to transfer ownership of a `Root` via
|
/// `RootCollection` object. Attempts to transfer ownership of a `Root` via
|
||||||
/// moving will trigger dynamic unrooting failures due to incorrect ordering.
|
/// moving will trigger dynamic unrooting failures due to incorrect ordering.
|
||||||
|
#[no_move]
|
||||||
pub struct Root<T> {
|
pub struct Root<T> {
|
||||||
/// List that ensures correct dynamic root ordering
|
/// List that ensures correct dynamic root ordering
|
||||||
root_list: &'static RootCollection,
|
root_list: &'static RootCollection,
|
||||||
|
|
8
ports/cef/Cargo.lock
generated
8
ports/cef/Cargo.lock
generated
|
@ -759,6 +759,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plugins"
|
name = "plugins"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
dependencies = [
|
||||||
|
"tenacious 0.0.1 (git+https://github.com/Manishearth/rust-tenacious.git)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pnacl-build-helper"
|
name = "pnacl-build-helper"
|
||||||
|
@ -960,6 +963,11 @@ dependencies = [
|
||||||
name = "task_info"
|
name = "task_info"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tenacious"
|
||||||
|
version = "0.0.1"
|
||||||
|
source = "git+https://github.com/Manishearth/rust-tenacious.git#f47093c600b8cc1b29f89759eea6c18920584f71"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "text_writer"
|
name = "text_writer"
|
||||||
version = "0.1.9"
|
version = "0.1.9"
|
||||||
|
|
8
ports/gonk/Cargo.lock
generated
8
ports/gonk/Cargo.lock
generated
|
@ -751,6 +751,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plugins"
|
name = "plugins"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
dependencies = [
|
||||||
|
"tenacious 0.0.1 (git+https://github.com/Manishearth/rust-tenacious.git)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pnacl-build-helper"
|
name = "pnacl-build-helper"
|
||||||
|
@ -951,6 +954,11 @@ dependencies = [
|
||||||
name = "task_info"
|
name = "task_info"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tenacious"
|
||||||
|
version = "0.0.1"
|
||||||
|
source = "git+https://github.com/Manishearth/rust-tenacious.git#f47093c600b8cc1b29f89759eea6c18920584f71"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "text_writer"
|
name = "text_writer"
|
||||||
version = "0.1.9"
|
version = "0.1.9"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue