Skip to content

Commit 6f91c32

Browse files
committed
Fix new 'unnecessary trailing semicolon' warnings
1 parent db0d0e8 commit 6f91c32

File tree

28 files changed

+39
-39
lines changed

28 files changed

+39
-39
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
451451
Inhabited,
452452
ZeroValid,
453453
UninitValid,
454-
};
454+
}
455455
let panic_intrinsic = intrinsic.and_then(|i| match i {
456456
sym::assert_inhabited => Some(AssertIntrinsic::Inhabited),
457457
sym::assert_zero_valid => Some(AssertIntrinsic::ZeroValid),

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
23452345
enum InitKind {
23462346
Zeroed,
23472347
Uninit,
2348-
};
2348+
}
23492349

23502350
/// Information about why a type cannot be initialized this way.
23512351
/// Contains an error message and optionally a span to point at.

compiler/rustc_lint/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
11311131
fn check_for_opaque_ty(&mut self, sp: Span, ty: Ty<'tcx>) -> bool {
11321132
struct ProhibitOpaqueTypes<'a, 'tcx> {
11331133
cx: &'a LateContext<'tcx>,
1134-
};
1134+
}
11351135

11361136
impl<'a, 'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueTypes<'a, 'tcx> {
11371137
type BreakTy = Ty<'tcx>;

compiler/rustc_middle/src/mir/visit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ macro_rules! make_mir_visitor {
254254
macro_rules! basic_blocks {
255255
(mut) => (body.basic_blocks_mut().iter_enumerated_mut());
256256
() => (body.basic_blocks().iter_enumerated());
257-
};
257+
}
258258
for (bb, data) in basic_blocks!($($mutability)?) {
259259
self.visit_basic_block_data(bb, data);
260260
}
@@ -275,7 +275,7 @@ macro_rules! make_mir_visitor {
275275
macro_rules! type_annotations {
276276
(mut) => (body.user_type_annotations.iter_enumerated_mut());
277277
() => (body.user_type_annotations.iter_enumerated());
278-
};
278+
}
279279

280280
for (index, annotation) in type_annotations!($($mutability)?) {
281281
self.visit_user_type_annotation(
@@ -909,7 +909,7 @@ macro_rules! make_mir_visitor {
909909
macro_rules! basic_blocks {
910910
(mut) => (body.basic_blocks_mut());
911911
() => (body.basic_blocks());
912-
};
912+
}
913913
let basic_block = & $($mutability)? basic_blocks!($($mutability)?)[location.block];
914914
if basic_block.statements.len() == location.statement_index {
915915
if let Some(ref $($mutability)? terminator) = basic_block.terminator {

compiler/rustc_middle/src/ty/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ fn polymorphize<'tcx>(
540540

541541
struct PolymorphizationFolder<'tcx> {
542542
tcx: TyCtxt<'tcx>,
543-
};
543+
}
544544

545545
impl ty::TypeFolder<'tcx> for PolymorphizationFolder<'tcx> {
546546
fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {

compiler/rustc_mir/src/interpret/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ where
1515

1616
struct UsedParamsNeedSubstVisitor<'tcx> {
1717
tcx: TyCtxt<'tcx>,
18-
};
18+
}
1919

2020
impl<'tcx> TypeVisitor<'tcx> for UsedParamsNeedSubstVisitor<'tcx> {
2121
type BreakTy = ();

compiler/rustc_ty_utils/src/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ fn well_formed_types_in_env<'tcx>(
309309
InherentImpl,
310310
Fn,
311311
Other,
312-
};
312+
}
313313

314314
let node_kind = match node {
315315
Node::TraitItem(item) => match item.kind {

compiler/rustc_typeck/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ pub(super) fn check_opaque_for_inheriting_lifetimes(
477477
struct ProhibitOpaqueVisitor<'tcx> {
478478
opaque_identity_ty: Ty<'tcx>,
479479
generics: &'tcx ty::Generics,
480-
};
480+
}
481481

482482
impl<'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
483483
type BreakTy = Option<Ty<'tcx>>;

library/alloc/tests/vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ fn test_from_iter_partially_drained_in_place_specialization() {
919919

920920
#[test]
921921
fn test_from_iter_specialization_with_iterator_adapters() {
922-
fn assert_in_place_trait<T: InPlaceIterable>(_: &T) {};
922+
fn assert_in_place_trait<T: InPlaceIterable>(_: &T) {}
923923
let src: Vec<usize> = vec![0usize; 256];
924924
let srcptr = src.as_ptr();
925925
let iter = src
@@ -1198,7 +1198,7 @@ fn drain_filter_consumed_panic() {
11981198
struct Check {
11991199
index: usize,
12001200
drop_counts: Rc<Mutex<Vec<usize>>>,
1201-
};
1201+
}
12021202

12031203
impl Drop for Check {
12041204
fn drop(&mut self) {
@@ -1250,7 +1250,7 @@ fn drain_filter_unconsumed_panic() {
12501250
struct Check {
12511251
index: usize,
12521252
drop_counts: Rc<Mutex<Vec<usize>>>,
1253-
};
1253+
}
12541254

12551255
impl Drop for Check {
12561256
fn drop(&mut self) {

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ impl<'a> Formatter<'a> {
11821182
/// ```
11831183
/// use std::fmt;
11841184
///
1185-
/// struct Foo { nb: i32 };
1185+
/// struct Foo { nb: i32 }
11861186
///
11871187
/// impl Foo {
11881188
/// fn new(nb: i32) -> Foo {

0 commit comments

Comments
 (0)