Skip to content

Commit 7d444f7

Browse files
committed
fix internal lint fallout
1 parent b3d744c commit 7d444f7

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/libcore/array/iter.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ where
3939
alive: Range<usize>,
4040
}
4141

42-
impl<T, const N: usize> IntoIter<T, { N }>
42+
impl<T, const N: usize> IntoIter<T, N>
4343
where
4444
[T; N]: LengthAtMost32,
4545
{
@@ -99,7 +99,7 @@ where
9999
}
100100

101101
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
102-
impl<T, const N: usize> Iterator for IntoIter<T, { N }>
102+
impl<T, const N: usize> Iterator for IntoIter<T, N>
103103
where
104104
[T; N]: LengthAtMost32,
105105
{
@@ -146,7 +146,7 @@ where
146146
}
147147

148148
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
149-
impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, { N }>
149+
impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, N>
150150
where
151151
[T; N]: LengthAtMost32,
152152
{
@@ -182,7 +182,7 @@ where
182182
}
183183

184184
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
185-
impl<T, const N: usize> Drop for IntoIter<T, { N }>
185+
impl<T, const N: usize> Drop for IntoIter<T, N>
186186
where
187187
[T; N]: LengthAtMost32,
188188
{
@@ -195,7 +195,7 @@ where
195195
}
196196

197197
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
198-
impl<T, const N: usize> ExactSizeIterator for IntoIter<T, { N }>
198+
impl<T, const N: usize> ExactSizeIterator for IntoIter<T, N>
199199
where
200200
[T; N]: LengthAtMost32,
201201
{
@@ -210,17 +210,17 @@ where
210210
}
211211

212212
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
213-
impl<T, const N: usize> FusedIterator for IntoIter<T, { N }> where [T; N]: LengthAtMost32 {}
213+
impl<T, const N: usize> FusedIterator for IntoIter<T, N> where [T; N]: LengthAtMost32 {}
214214

215215
// The iterator indeed reports the correct length. The number of "alive"
216216
// elements (that will still be yielded) is the length of the range `alive`.
217217
// This range is decremented in length in either `next` or `next_back`. It is
218218
// always decremented by 1 in those methods, but only if `Some(_)` is returned.
219219
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
220-
unsafe impl<T, const N: usize> TrustedLen for IntoIter<T, { N }> where [T; N]: LengthAtMost32 {}
220+
unsafe impl<T, const N: usize> TrustedLen for IntoIter<T, N> where [T; N]: LengthAtMost32 {}
221221

222222
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
223-
impl<T: Clone, const N: usize> Clone for IntoIter<T, { N }>
223+
impl<T: Clone, const N: usize> Clone for IntoIter<T, N>
224224
where
225225
[T; N]: LengthAtMost32,
226226
{
@@ -249,7 +249,7 @@ where
249249
}
250250

251251
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
252-
impl<T: fmt::Debug, const N: usize> fmt::Debug for IntoIter<T, { N }>
252+
impl<T: fmt::Debug, const N: usize> fmt::Debug for IntoIter<T, N>
253253
where
254254
[T; N]: LengthAtMost32,
255255
{

src/librustc_macros/src/query.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,11 @@ fn add_query_description_impl(
356356
quote! { #t }
357357
})
358358
.unwrap_or(quote! { _ });
359+
// expr is a `Block`, meaning that `{ #expr }` gets expanded
360+
// to `{ { stmts... } }`, which triggers the `unused_braces` lint.
359361
quote! {
360362
#[inline]
361-
#[allow(unused_variables)]
363+
#[allow(unused_variables, unused_braces)]
362364
fn cache_on_disk(
363365
#tcx: TyCtxt<'tcx>,
364366
#key: Self::Key,

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2807,7 +2807,7 @@ impl<'a> Resolver<'a> {
28072807
ast::Path {
28082808
span,
28092809
segments: iter::once(Ident::with_dummy_span(kw::PathRoot))
2810-
.chain({ path_str.split("::").skip(1).map(Ident::from_str) })
2810+
.chain(path_str.split("::").skip(1).map(Ident::from_str))
28112811
.map(|i| self.new_ast_path_segment(i))
28122812
.collect(),
28132813
}

0 commit comments

Comments
 (0)