Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
Remove unused #[allow(...)] statements from compiler/
This commit is contained in:
commit
9e02642fb3
@ -15,7 +15,6 @@
|
||||
#![feature(new_uninit)]
|
||||
#![feature(maybe_uninit_slice)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
#![allow(deprecated)]
|
||||
|
||||
use rustc_data_structures::cold_path;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -930,7 +930,6 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
unsafe { llvm::LLVMBuildSelect(self.llbuilder, cond, then_val, else_val, UNNAMED) }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
|
||||
unsafe { llvm::LLVMBuildVAArg(self.llbuilder, list, ty, UNNAMED) }
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![allow(non_camel_case_types, non_snake_case)]
|
||||
|
||||
//! Code that is useful in various codegen modules.
|
||||
|
||||
use crate::consts::{self, const_alloc_to_llvm};
|
||||
|
@ -1845,7 +1845,6 @@ impl<'tcx> VariantInfo<'_, 'tcx> {
|
||||
None
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn is_artificial(&self) -> bool {
|
||||
match self {
|
||||
VariantInfo::Generator { .. } => true,
|
||||
|
@ -11,7 +11,6 @@ use rustc_middle::ty::layout::HasTyCtxt;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_target::abi::{Align, HasDataLayout, LayoutOf, Size};
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn round_pointer_up_to_alignment(
|
||||
bx: &mut Builder<'a, 'll, 'tcx>,
|
||||
addr: &'ll Value,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(non_camel_case_types, non_snake_case)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
@ -25,7 +25,6 @@ pub enum IntPredicate {
|
||||
IntSLE,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub enum RealPredicate {
|
||||
RealPredicateFalse,
|
||||
RealOEQ,
|
||||
@ -60,7 +59,6 @@ pub enum AtomicRmwBinOp {
|
||||
}
|
||||
|
||||
pub enum AtomicOrdering {
|
||||
#[allow(dead_code)]
|
||||
NotAtomic,
|
||||
Unordered,
|
||||
Monotonic,
|
||||
|
@ -7,7 +7,6 @@
|
||||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(array_windows)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
|
@ -256,7 +256,6 @@ pub trait Visitor<'v>: Sized {
|
||||
/// patterns described on `itemlikevisit::ItemLikeVisitor`. The only
|
||||
/// reason to override this method is if you want a nested pattern
|
||||
/// but cannot supply a `Map`; see `nested_visit_map` for advice.
|
||||
#[allow(unused_variables)]
|
||||
fn visit_nested_item(&mut self, id: ItemId) {
|
||||
let opt_item = self.nested_visit_map().inter().map(|map| map.item(id.id));
|
||||
walk_list!(self, visit_item, opt_item);
|
||||
@ -265,7 +264,6 @@ pub trait Visitor<'v>: Sized {
|
||||
/// Like `visit_nested_item()`, but for trait items. See
|
||||
/// `visit_nested_item()` for advice on when to override this
|
||||
/// method.
|
||||
#[allow(unused_variables)]
|
||||
fn visit_nested_trait_item(&mut self, id: TraitItemId) {
|
||||
let opt_item = self.nested_visit_map().inter().map(|map| map.trait_item(id));
|
||||
walk_list!(self, visit_trait_item, opt_item);
|
||||
@ -274,7 +272,6 @@ pub trait Visitor<'v>: Sized {
|
||||
/// Like `visit_nested_item()`, but for impl items. See
|
||||
/// `visit_nested_item()` for advice on when to override this
|
||||
/// method.
|
||||
#[allow(unused_variables)]
|
||||
fn visit_nested_impl_item(&mut self, id: ImplItemId) {
|
||||
let opt_item = self.nested_visit_map().inter().map(|map| map.impl_item(id));
|
||||
walk_list!(self, visit_impl_item, opt_item);
|
||||
|
@ -1278,7 +1278,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
}
|
||||
|
||||
/// Gives temporary access to the region constraint data.
|
||||
#[allow(non_camel_case_types)] // bug with impl trait
|
||||
pub fn with_region_constraints<R>(
|
||||
&self,
|
||||
op: impl FnOnce(&RegionConstraintData<'tcx>) -> R,
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use crate::{LateContext, LateLintPass, LintContext};
|
||||
use rustc_ast as ast;
|
||||
use rustc_attr as attr;
|
||||
|
@ -21,7 +21,6 @@ impl RustString {
|
||||
|
||||
/// Appending to a Rust string -- used by RawRustStringOstream.
|
||||
#[no_mangle]
|
||||
#[allow(improper_ctypes_definitions)]
|
||||
pub unsafe extern "C" fn LLVMRustStringWriteImpl(
|
||||
sr: &RustString,
|
||||
ptr: *const c_char,
|
||||
|
@ -9,7 +9,6 @@ use syn::{
|
||||
ReturnType, Token, Type,
|
||||
};
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
mod kw {
|
||||
syn::custom_keyword!(query);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ use std::collections::HashSet;
|
||||
use syn::parse::{Parse, ParseStream, Result};
|
||||
use syn::{braced, parse_macro_input, Ident, LitStr, Token};
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
mod kw {
|
||||
syn::custom_keyword!(Keywords);
|
||||
syn::custom_keyword!(Symbols);
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use rustc_data_structures::sync::Lock;
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
@ -33,7 +33,6 @@ pub(super) struct Prefixes<'cx, 'tcx> {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub(super) enum PrefixSet {
|
||||
/// Doesn't stop until it returns the base case (a Local or
|
||||
/// Static prefix).
|
||||
|
@ -144,7 +144,6 @@ impl<'tcx> fmt::Display for MovePath<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
struct MovePathLinearIter<'a, 'tcx, F> {
|
||||
next: Option<(MovePathIndex, &'a MovePath<'tcx>)>,
|
||||
fetch_next: F,
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
pub use self::FileMatch::*;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
@ -32,6 +32,7 @@ pub enum AutoTraitResult<A> {
|
||||
NegativeImpl,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl<A> AutoTraitResult<A> {
|
||||
fn is_auto(&self) -> bool {
|
||||
match *self {
|
||||
|
@ -2,7 +2,6 @@
|
||||
//!
|
||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub mod auto_trait;
|
||||
mod chalk_fulfill;
|
||||
pub mod codegen;
|
||||
|
@ -2148,7 +2148,6 @@ trait TraitObligationExt<'tcx> {
|
||||
}
|
||||
|
||||
impl<'tcx> TraitObligationExt<'tcx> for TraitObligation<'tcx> {
|
||||
#[allow(unused_comparisons)]
|
||||
fn derived_cause(
|
||||
&self,
|
||||
variant: fn(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
|
||||
|
@ -56,7 +56,6 @@ This API is completely unstable and subject to change.
|
||||
*/
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
|
Loading…
Reference in New Issue
Block a user