Skip to content

Commit 12187b7

Browse files
committed
Remove unused #[allow(...)] statements from compiler/
1 parent c6e4db6 commit 12187b7

File tree

21 files changed

+2
-28
lines changed

21 files changed

+2
-28
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(new_uninit)]
1616
#![feature(maybe_uninit_slice)]
1717
#![cfg_attr(test, feature(test))]
18-
#![allow(deprecated)]
1918

2019
use rustc_data_structures::cold_path;
2120
use smallvec::SmallVec;

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
931931
unsafe { llvm::LLVMBuildSelect(self.llbuilder, cond, then_val, else_val, UNNAMED) }
932932
}
933933

934-
#[allow(dead_code)]
935934
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
936935
unsafe { llvm::LLVMBuildVAArg(self.llbuilder, list, ty, UNNAMED) }
937936
}

compiler/rustc_codegen_llvm/src/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(non_camel_case_types, non_snake_case)]
2-
31
//! Code that is useful in various codegen modules.
42
53
use crate::consts::{self, const_alloc_to_llvm};

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,6 @@ impl<'tcx> VariantInfo<'_, 'tcx> {
18451845
None
18461846
}
18471847

1848-
#[allow(dead_code)]
18491848
fn is_artificial(&self) -> bool {
18501849
match self {
18511850
VariantInfo::Generator { .. } => true,

compiler/rustc_codegen_llvm/src/va_arg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use rustc_middle::ty::layout::HasTyCtxt;
1111
use rustc_middle::ty::Ty;
1212
use rustc_target::abi::{Align, HasDataLayout, LayoutOf, Size};
1313

14-
#[allow(dead_code)]
1514
fn round_pointer_up_to_alignment(
1615
bx: &mut Builder<'a, 'll, 'tcx>,
1716
addr: &'ll Value,

compiler/rustc_codegen_ssa/src/common.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(non_camel_case_types, non_snake_case)]
1+
#![allow(non_camel_case_types)]
22

33
use rustc_errors::struct_span_err;
44
use rustc_hir as hir;
@@ -25,7 +25,6 @@ pub enum IntPredicate {
2525
IntSLE,
2626
}
2727

28-
#[allow(dead_code)]
2928
pub enum RealPredicate {
3029
RealPredicateFalse,
3130
RealOEQ,
@@ -60,7 +59,6 @@ pub enum AtomicRmwBinOp {
6059
}
6160

6261
pub enum AtomicOrdering {
63-
#[allow(dead_code)]
6462
NotAtomic,
6563
Unordered,
6664
Monotonic,

compiler/rustc_data_structures/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! This API is completely unstable and subject to change.
88
99
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
10-
#![allow(incomplete_features)]
1110
#![feature(array_windows)]
1211
#![feature(control_flow_enum)]
1312
#![feature(in_band_lifetimes)]

compiler/rustc_hir/src/intravisit.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ pub trait Visitor<'v>: Sized {
256256
/// patterns described on `itemlikevisit::ItemLikeVisitor`. The only
257257
/// reason to override this method is if you want a nested pattern
258258
/// but cannot supply a `Map`; see `nested_visit_map` for advice.
259-
#[allow(unused_variables)]
260259
fn visit_nested_item(&mut self, id: ItemId) {
261260
let opt_item = self.nested_visit_map().inter().map(|map| map.item(id.id));
262261
walk_list!(self, visit_item, opt_item);
@@ -265,7 +264,6 @@ pub trait Visitor<'v>: Sized {
265264
/// Like `visit_nested_item()`, but for trait items. See
266265
/// `visit_nested_item()` for advice on when to override this
267266
/// method.
268-
#[allow(unused_variables)]
269267
fn visit_nested_trait_item(&mut self, id: TraitItemId) {
270268
let opt_item = self.nested_visit_map().inter().map(|map| map.trait_item(id));
271269
walk_list!(self, visit_trait_item, opt_item);
@@ -274,7 +272,6 @@ pub trait Visitor<'v>: Sized {
274272
/// Like `visit_nested_item()`, but for impl items. See
275273
/// `visit_nested_item()` for advice on when to override this
276274
/// method.
277-
#[allow(unused_variables)]
278275
fn visit_nested_impl_item(&mut self, id: ImplItemId) {
279276
let opt_item = self.nested_visit_map().inter().map(|map| map.impl_item(id));
280277
walk_list!(self, visit_impl_item, opt_item);

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
12751275
}
12761276

12771277
/// Gives temporary access to the region constraint data.
1278-
#[allow(non_camel_case_types)] // bug with impl trait
12791278
pub fn with_region_constraints<R>(
12801279
&self,
12811280
op: impl FnOnce(&RegionConstraintData<'tcx>) -> R,

compiler/rustc_lint/src/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(non_snake_case)]
2-
31
use crate::{LateContext, LateLintPass, LintContext};
42
use rustc_ast as ast;
53
use rustc_attr as attr;

0 commit comments

Comments
 (0)