mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Auto merge of #15649 - zimio:issue-15591-rewrite-ban-type-lint, r=Wafflespeanut
Rewrite the ban-type lint in Python <!-- Please describe your changes on the following line: --> Rewrite the ban-type lint in Python. Question: Should the old ban-type lint written in rust be deleted? --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x ] `./mach build -d` does not report any errors - [x ] `./mach test-tidy` does not report any errors - [x ] These changes fix #15591 <!-- Either: --> - [ x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15649) <!-- Reviewable:end -->
This commit is contained in:
commit
261df34ced
6 changed files with 18 additions and 56 deletions
|
@ -1,19 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(script_plugins)]
|
||||
|
||||
extern crate script;
|
||||
|
||||
use script::test::DOMRefCell;
|
||||
use script::test::JS;
|
||||
use script::test::Node;
|
||||
|
||||
struct Foo {
|
||||
bar: DOMRefCell<JS<Node>>
|
||||
//~^ ERROR Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -1,18 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(script_plugins)]
|
||||
|
||||
extern crate js;
|
||||
|
||||
use js::jsval::JSVal;
|
||||
use std::cell::Cell;
|
||||
|
||||
struct Foo {
|
||||
bar: Cell<JSVal>
|
||||
//~^ ERROR Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue