Skip to content

Commit 7e2c7e4

Browse files
committed
Allow currently unused tuple struct fields
1 parent 16087ee commit 7e2c7e4

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct Upvar<'tcx> {
110110
}
111111

112112
/// Associate some local constants with the `'tcx` lifetime
113-
struct TyCtxtConsts<'tcx>(TyCtxt<'tcx>);
113+
struct TyCtxtConsts<'tcx>(#[allow(unused_tuple_struct_fields)] TyCtxt<'tcx>);
114114
impl<'tcx> TyCtxtConsts<'tcx> {
115115
const DEREF_PROJECTION: &'tcx [PlaceElem<'tcx>; 1] = &[ProjectionElem::Deref];
116116
}

compiler/rustc_infer/src/infer/nll_relate/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub trait TypeRelatingDelegate<'tcx> {
114114
}
115115

116116
#[derive(Copy, Clone)]
117-
struct UniversallyQuantified(bool);
117+
struct UniversallyQuantified(#[allow(unused_tuple_struct_fields)] bool);
118118

119119
impl<'me, 'tcx, D> TypeRelating<'me, 'tcx, D>
120120
where

compiler/rustc_mir_transform/src/check_unsafety.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ pub(crate) fn provide(providers: &mut Providers) {
385385
enum Context {
386386
Safe,
387387
/// in an `unsafe fn`
388-
UnsafeFn(HirId),
388+
UnsafeFn(#[allow(unused_tuple_struct_fields)] HirId),
389389
/// in a *used* `unsafe` block
390390
/// (i.e. a block without unused-unsafe warning)
391391
UnsafeBlock(HirId),

compiler/rustc_resolve/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl<'a> ParentScope<'a> {
175175
#[derive(Copy, Debug, Clone)]
176176
enum ImplTraitContext {
177177
Existential,
178-
Universal(LocalDefId),
178+
Universal(#[allow(unused_tuple_struct_fields)] LocalDefId),
179179
}
180180

181181
#[derive(Debug)]

library/alloc/src/boxed/thin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ struct WithHeader<H>(NonNull<u8>, PhantomData<H>);
171171
/// An opaque representation of `WithHeader<H>` to avoid the
172172
/// projection invariance of `<T as Pointee>::Metadata`.
173173
#[repr(transparent)]
174-
struct WithOpaqueHeader(NonNull<u8>);
174+
struct WithOpaqueHeader(#[allow(unused_tuple_struct_fields)] NonNull<u8>);
175175

176176
impl WithOpaqueHeader {
177177
#[cfg(not(no_global_oom_handling))]

src/librustdoc/clean/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ pub(crate) enum TypeBindingKind {
25462546
pub(crate) enum SubstParam {
25472547
Type(Type),
25482548
Lifetime(Lifetime),
2549-
Constant(Constant),
2549+
Constant(#[allow(unused_tuple_struct_fields)] Constant),
25502550
}
25512551

25522552
impl SubstParam {

0 commit comments

Comments
 (0)