1
Fork 0

Fix new 'unnecessary trailing semicolon' warnings

This commit is contained in:
Aaron Hill 2020-11-25 17:00:28 -05:00
parent db0d0e8c43
commit 6f91c32da6
No known key found for this signature in database
GPG key ID: B4087E510E98B164
28 changed files with 39 additions and 39 deletions

View file

@ -451,7 +451,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
Inhabited,
ZeroValid,
UninitValid,
};
}
let panic_intrinsic = intrinsic.and_then(|i| match i {
sym::assert_inhabited => Some(AssertIntrinsic::Inhabited),
sym::assert_zero_valid => Some(AssertIntrinsic::ZeroValid),

View file

@ -2345,7 +2345,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
enum InitKind {
Zeroed,
Uninit,
};
}
/// Information about why a type cannot be initialized this way.
/// Contains an error message and optionally a span to point at.

View file

@ -1131,7 +1131,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
fn check_for_opaque_ty(&mut self, sp: Span, ty: Ty<'tcx>) -> bool {
struct ProhibitOpaqueTypes<'a, 'tcx> {
cx: &'a LateContext<'tcx>,
};
}
impl<'a, 'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueTypes<'a, 'tcx> {
type BreakTy = Ty<'tcx>;

View file

@ -254,7 +254,7 @@ macro_rules! make_mir_visitor {
macro_rules! basic_blocks {
(mut) => (body.basic_blocks_mut().iter_enumerated_mut());
() => (body.basic_blocks().iter_enumerated());
};
}
for (bb, data) in basic_blocks!($($mutability)?) {
self.visit_basic_block_data(bb, data);
}
@ -275,7 +275,7 @@ macro_rules! make_mir_visitor {
macro_rules! type_annotations {
(mut) => (body.user_type_annotations.iter_enumerated_mut());
() => (body.user_type_annotations.iter_enumerated());
};
}
for (index, annotation) in type_annotations!($($mutability)?) {
self.visit_user_type_annotation(
@ -909,7 +909,7 @@ macro_rules! make_mir_visitor {
macro_rules! basic_blocks {
(mut) => (body.basic_blocks_mut());
() => (body.basic_blocks());
};
}
let basic_block = & $($mutability)? basic_blocks!($($mutability)?)[location.block];
if basic_block.statements.len() == location.statement_index {
if let Some(ref $($mutability)? terminator) = basic_block.terminator {

View file

@ -540,7 +540,7 @@ fn polymorphize<'tcx>(
struct PolymorphizationFolder<'tcx> {
tcx: TyCtxt<'tcx>,
};
}
impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {
fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {

View file

@ -15,7 +15,7 @@ where
struct UsedParamsNeedSubstVisitor<'tcx> {
tcx: TyCtxt<'tcx>,
};
}
impl<'tcx> TypeVisitor<'tcx> for UsedParamsNeedSubstVisitor<'tcx> {
type BreakTy = ();

View file

@ -309,7 +309,7 @@ fn well_formed_types_in_env<'tcx>(
InherentImpl,
Fn,
Other,
};
}
let node_kind = match node {
Node::TraitItem(item) => match item.kind {

View file

@ -477,7 +477,7 @@ pub(super) fn check_opaque_for_inheriting_lifetimes(
struct ProhibitOpaqueVisitor<'tcx> {
opaque_identity_ty: Ty<'tcx>,
generics: &'tcx ty::Generics,
};
}
impl<'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
type BreakTy = Option<Ty<'tcx>>;