]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused #[allow(...)] statements from compiler/
authorest31 <MTest31@outlook.com>
Fri, 25 Sep 2020 23:17:54 +0000 (01:17 +0200)
committerest31 <MTest31@outlook.com>
Fri, 25 Sep 2020 23:25:55 +0000 (01:25 +0200)
21 files changed:
compiler/rustc_arena/src/lib.rs
compiler/rustc_codegen_llvm/src/builder.rs
compiler/rustc_codegen_llvm/src/common.rs
compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
compiler/rustc_codegen_llvm/src/va_arg.rs
compiler/rustc_codegen_ssa/src/common.rs
compiler/rustc_data_structures/src/lib.rs
compiler/rustc_hir/src/intravisit.rs
compiler/rustc_infer/src/infer/mod.rs
compiler/rustc_lint/src/types.rs
compiler/rustc_llvm/src/lib.rs
compiler/rustc_macros/src/query.rs
compiler/rustc_macros/src/symbols.rs
compiler/rustc_middle/src/util/common.rs
compiler/rustc_mir/src/borrow_check/prefixes.rs
compiler/rustc_mir/src/dataflow/move_paths/mod.rs
compiler/rustc_session/src/filesearch.rs
compiler/rustc_trait_selection/src/traits/auto_trait.rs
compiler/rustc_trait_selection/src/traits/mod.rs
compiler/rustc_trait_selection/src/traits/select/mod.rs
compiler/rustc_typeck/src/lib.rs

index b4bf31b1abae58231596ec8bf091faad1cc70310..166f7f53c41ac103c7226a4f65c21e3bc361be5b 100644 (file)
@@ -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;
index 23a3be1a2f2e8dca354620c2fe419d6c890e27ad..67191ac0e4640c39efdd885efeab2723968be073 100644 (file)
@@ -931,7 +931,6 @@ fn select(
         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) }
     }
index 0b1cf03fa7e42742bbf59caeed84d6b80c1f1733..0992410a728bdac420428421d783add0e2bc3e91 100644 (file)
@@ -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};
index 868eb74cf09cd010ebf40f70ecec1460685e4331..987149cb4c25c53ac587ea1c6d97fcbf920522bc 100644 (file)
@@ -1845,7 +1845,6 @@ fn source_info(&self, cx: &CodegenCx<'ll, 'tcx>) -> Option<SourceInfo<'ll>> {
         None
     }
 
-    #[allow(dead_code)]
     fn is_artificial(&self) -> bool {
         match self {
             VariantInfo::Generator { .. } => true,
index 54efa05aee81e315ea619eebb3b2bc827603f15d..22ed4dd7576b594374e427c5fa0a51a5062eb840 100644 (file)
@@ -11,7 +11,6 @@
 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,
index e04ed531bbff282912f14f7ad59116103d77be4c..780b1d2cd9433cc698a4d85061084bf888fe238b 100644 (file)
@@ -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,
index 9ded10e9c26ac9ef02200645db7b12b75cf315ec..90b0f25475181ecf5888e48632f6a948e4db649e 100644 (file)
@@ -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)]
index 76cf6bd47769fc0fac36386c2ff7d4a6b04c3b65..820d664c07d924eda931c4a8f0859a6b621162a4 100644 (file)
@@ -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 @@ fn visit_nested_item(&mut self, id: ItemId) {
     /// 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 @@ fn visit_nested_trait_item(&mut self, id: TraitItemId) {
     /// 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);
index 2cbdc954e2007cc7c6ea28e5621efa83e60ff210..95137410c6245a03f9518930a2d4dc28b7ea2018 100644 (file)
@@ -1275,7 +1275,6 @@ pub fn take_and_reset_region_constraints(&self) -> RegionConstraintData<'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,
index 6aa28d04ae197ff5ca3a1a7ed2a9c3816e719865..9925444b869f95a8730a6c455c7db51a49ddfd50 100644 (file)
@@ -1,5 +1,3 @@
-#![allow(non_snake_case)]
-
 use crate::{LateContext, LateLintPass, LintContext};
 use rustc_ast as ast;
 use rustc_attr as attr;
index a7a10b91b4eca1b77b7d173026cadcdb7cf382af..a381290d46f97362974270c4409b8685f60715e2 100644 (file)
@@ -21,7 +21,6 @@ pub fn len(&self) -> usize {
 
 /// 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,
index 204e8e800cd48299a8dc9b975bafbdfe95fee740..e7c054653accbd81de47e37af896a3cb0d71cd8d 100644 (file)
@@ -9,7 +9,6 @@
     ReturnType, Token, Type,
 };
 
-#[allow(non_camel_case_types)]
 mod kw {
     syn::custom_keyword!(query);
 }
index 352665f0ab199e2d216e31f2b4e0b9d129e340d2..94d4ad78e8d90373d748e8adaa1476e1002f1453 100644 (file)
@@ -4,7 +4,6 @@
 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);
index 1e09702bf27caec7923dddba60f53ed0194be406..da857b0a403b4f909e8d0d9a332a7c5714577516 100644 (file)
@@ -1,5 +1,3 @@
-#![allow(non_camel_case_types)]
-
 use rustc_data_structures::sync::Lock;
 
 use std::fmt::Debug;
index 5bfe02ff3b04e6807a43ed013070fad713b2fae1..6c5d42296f72bdb7dcf6b00170fd14bab0f99b5e 100644 (file)
@@ -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).
index d66d2625d78eaafcbb0ed747af3dc71ee7e5e5c6..7c630259186032e245999763c8184d41b68214ce 100644 (file)
@@ -144,7 +144,6 @@ fn fmt(&self, w: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-#[allow(unused)]
 struct MovePathLinearIter<'a, 'tcx, F> {
     next: Option<(MovePathIndex, &'a MovePath<'tcx>)>,
     fetch_next: F,
index 284fca652ece73b2b075d089cf76d924099f8150..12a268d5b1dda15a1204bbd88afb89c6b90aedd3 100644 (file)
@@ -1,5 +1,3 @@
-#![allow(non_camel_case_types)]
-
 pub use self::FileMatch::*;
 
 use std::borrow::Cow;
index 35bfeff10b4aa7e7451cd89380c0fe34cb035358..e40067202e112c40c5aed680bc8fe9874799d273 100644 (file)
@@ -32,6 +32,7 @@ pub enum AutoTraitResult<A> {
     NegativeImpl,
 }
 
+#[allow(dead_code)]
 impl<A> AutoTraitResult<A> {
     fn is_auto(&self) -> bool {
         match *self {
index 79495ba7f9b30b662ebe2593747f63a1363a7681..c93087a18cf04575340da0d5a5b7b4727da5e012 100644 (file)
@@ -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;
index 5e2f7d81d000a871ccb9c55fb6f7d7fdcb337014..57f1fedacbe5a38d6fc12633990c28f46e405414 100644 (file)
@@ -2148,7 +2148,6 @@ fn derived_cause(
 }
 
 impl<'tcx> TraitObligationExt<'tcx> for TraitObligation<'tcx> {
-    #[allow(unused_comparisons)]
     fn derived_cause(
         &self,
         variant: fn(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx>,
index 84efb92582ed2ae521011de7e0af7f4bb28f26af..e8fa2b13a9f24fe3e84e4722431daa6de0ba72db 100644 (file)
@@ -56,7 +56,6 @@
 */
 
 #![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)]