mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Refactor allow to expect (#41586)
Replace `allow` with `expect` lints for `unused`, `unsafe_code`, `dead_code`, and `non_upper_case_globals`. Testing: So far just check it compiled on `x86_64-linux` on NixOS. Need to use the module `system.fontconfig.enable = true;` I think in my NixOS config. Part of: #40383 Searching `allow\(.*\)` for `.rs` files shows the following. for (total_results:total_files) went from `707:386` to `675:368`, a reduction of `32:18`. How many files is too many files per PR? I feel like the 20-30 I have is too big. --------- Signed-off-by: Wayne Van Son <waynevanson@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
#[crown::unrooted_must_root_lint::must_root]
|
||||
struct MustBeRooted;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
trait TypeHolderTrait {
|
||||
#[crown::unrooted_must_root_lint::must_root]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
trait TypeHolderTrait {
|
||||
#[crown::unrooted_must_root_lint::must_root]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
#[crown::unrooted_must_root_lint::must_root]
|
||||
struct MustBeRooted;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
//@rustc-env:RUSTC_BOOTSTRAP=1
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
const _: () = assert!(cfg!(crown), "cfg(crown) not set!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user