Skip to content

Commit a96ba96

Browse files
committed
Auto merge of #62069 - Centril:rollup-m8n4uw7, r=Centril
Rollup of 5 pull requests Successful merges: - #62047 (Trigger `unused_attribute` lint on `#[cfg_attr($pred,)]`) - #62049 (Fix one missing `dyn`.) - #62051 (Lint empty `#[derive()]` as unused attribute.) - #62057 (Deny explicit_outlives_requirements in the compiler) - #62068 (Fix meta-variable binding errors in macros) Failed merges: r? @ghost
2 parents de02101 + 74380b3 commit a96ba96

File tree

38 files changed

+117
-91
lines changed

38 files changed

+117
-91
lines changed

src/libcore/fmt/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,19 +2070,19 @@ macro_rules! tuple {
20702070
() => ();
20712071
( $($name:ident,)+ ) => (
20722072
#[stable(feature = "rust1", since = "1.0.0")]
2073-
impl<$($name:Debug),*> Debug for ($($name,)*) where last_type!($($name,)+): ?Sized {
2073+
impl<$($name:Debug),+> Debug for ($($name,)+) where last_type!($($name,)+): ?Sized {
20742074
#[allow(non_snake_case, unused_assignments)]
20752075
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
20762076
let mut builder = f.debug_tuple("");
2077-
let ($(ref $name,)*) = *self;
2077+
let ($(ref $name,)+) = *self;
20782078
$(
20792079
builder.field(&$name);
2080-
)*
2080+
)+
20812081

20822082
builder.finish()
20832083
}
20842084
}
2085-
peel! { $($name,)* }
2085+
peel! { $($name,)+ }
20862086
)
20872087
}
20882088

src/libcore/hash/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ mod impls {
617617

618618
( $($name:ident)+) => (
619619
#[stable(feature = "rust1", since = "1.0.0")]
620-
impl<$($name: Hash),*> Hash for ($($name,)*) where last_type!($($name,)+): ?Sized {
620+
impl<$($name: Hash),+> Hash for ($($name,)+) where last_type!($($name,)+): ?Sized {
621621
#[allow(non_snake_case)]
622622
fn hash<S: Hasher>(&self, state: &mut S) {
623-
let ($(ref $name,)*) = *self;
624-
$($name.hash(state);)*
623+
let ($(ref $name,)+) = *self;
624+
$($name.hash(state);)+
625625
}
626626
}
627627
);

src/libcore/iter/traits/accum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ macro_rules! integer_sum_product {
7272
($($a:ty)*) => (
7373
integer_sum_product!(@impls 0, 1,
7474
#[stable(feature = "iter_arith_traits", since = "1.12.0")],
75-
$($a)+);
75+
$($a)*);
7676
integer_sum_product!(@impls Wrapping(0), Wrapping(1),
7777
#[stable(feature = "wrapping_iter_arith", since = "1.14.0")],
78-
$(Wrapping<$a>)+);
78+
$(Wrapping<$a>)*);
7979
);
8080
}
8181

src/libcore/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ macro_rules! panic {
1515
$crate::panic!($msg)
1616
);
1717
($fmt:expr, $($arg:tt)+) => ({
18-
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)*),
18+
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)+),
1919
&(file!(), line!(), __rust_unstable_column!()))
2020
});
2121
}
@@ -558,7 +558,7 @@ macro_rules! unreachable {
558558
#[stable(feature = "rust1", since = "1.0.0")]
559559
macro_rules! unimplemented {
560560
() => (panic!("not yet implemented"));
561-
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*)));
561+
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)+)));
562562
}
563563

564564
/// Indicates unfinished code.
@@ -617,7 +617,7 @@ macro_rules! unimplemented {
617617
#[unstable(feature = "todo_macro", issue = "59277")]
618618
macro_rules! todo {
619619
() => (panic!("not yet implemented"));
620-
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*)));
620+
($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)+)));
621621
}
622622

623623
/// Creates an array of [`MaybeUninit`].

src/libcore/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub trait Sized {
103103
/// `Unsize` is implemented for:
104104
///
105105
/// - `[T; N]` is `Unsize<[T]>`
106-
/// - `T` is `Unsize<Trait>` when `T: Trait`
106+
/// - `T` is `Unsize<dyn Trait>` when `T: Trait`
107107
/// - `Foo<..., T, ...>` is `Unsize<Foo<..., U, ...>>` if:
108108
/// - `T: Unsize<U>`
109109
/// - Foo is a struct

src/libcore/ptr/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,12 +2725,12 @@ macro_rules! fnptr_impls_safety_abi {
27252725

27262726
macro_rules! fnptr_impls_args {
27272727
($($Arg: ident),+) => {
2728-
fnptr_impls_safety_abi! { extern "Rust" fn($($Arg),*) -> Ret, $($Arg),* }
2729-
fnptr_impls_safety_abi! { extern "C" fn($($Arg),*) -> Ret, $($Arg),* }
2730-
fnptr_impls_safety_abi! { extern "C" fn($($Arg),* , ...) -> Ret, $($Arg),* }
2731-
fnptr_impls_safety_abi! { unsafe extern "Rust" fn($($Arg),*) -> Ret, $($Arg),* }
2732-
fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),*) -> Ret, $($Arg),* }
2733-
fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),* , ...) -> Ret, $($Arg),* }
2728+
fnptr_impls_safety_abi! { extern "Rust" fn($($Arg),+) -> Ret, $($Arg),+ }
2729+
fnptr_impls_safety_abi! { extern "C" fn($($Arg),+) -> Ret, $($Arg),+ }
2730+
fnptr_impls_safety_abi! { extern "C" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
2731+
fnptr_impls_safety_abi! { unsafe extern "Rust" fn($($Arg),+) -> Ret, $($Arg),+ }
2732+
fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),+) -> Ret, $($Arg),+ }
2733+
fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
27342734
};
27352735
() => {
27362736
// No variadic functions with 0 parameters

src/libproc_macro/bridge/rpc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ macro_rules! rpc_encode_decode {
5959
}
6060
};
6161
(enum $name:ident $(<$($T:ident),+>)? { $($variant:ident $(($field:ident))*),* $(,)? }) => {
62-
impl<S, $($($T: Encode<S>),+)?> Encode<S> for $name $(<$($T),+>)* {
62+
impl<S, $($($T: Encode<S>),+)?> Encode<S> for $name $(<$($T),+>)? {
6363
fn encode(self, w: &mut Writer, s: &mut S) {
6464
// HACK(eddyb): `Tag` enum duplicated between the
6565
// two impls as there's no other place to stash it.
@@ -79,8 +79,8 @@ macro_rules! rpc_encode_decode {
7979
}
8080
}
8181

82-
impl<S, $($($T: for<'s> DecodeMut<'a, 's, S>),+)*> DecodeMut<'a, '_, S>
83-
for $name $(<$($T),+>)*
82+
impl<S, $($($T: for<'s> DecodeMut<'a, 's, S>),+)?> DecodeMut<'a, '_, S>
83+
for $name $(<$($T),+>)?
8484
{
8585
fn decode(r: &mut Reader<'a>, s: &mut S) -> Self {
8686
// HACK(eddyb): `Tag` enum duplicated between the

src/librustc/hir/itemlikevisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub trait ItemLikeVisitor<'hir> {
5151
fn visit_impl_item(&mut self, impl_item: &'hir ImplItem);
5252
}
5353

54-
pub struct DeepVisitor<'v, V: 'v> {
54+
pub struct DeepVisitor<'v, V> {
5555
visitor: &'v mut V,
5656
}
5757

src/librustc/infer/nll_relate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
800800
/// [blog post]: https://is.gd/0hKvIr
801801
struct TypeGeneralizer<'me, 'tcx, D>
802802
where
803-
D: TypeRelatingDelegate<'tcx> + 'me,
803+
D: TypeRelatingDelegate<'tcx>,
804804
{
805805
infcx: &'me InferCtxt<'me, 'tcx>,
806806

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#![deny(rust_2018_idioms)]
3232
#![deny(internal)]
3333
#![deny(unused_lifetimes)]
34-
#![allow(explicit_outlives_requirements)]
3534

3635
#![feature(arbitrary_self_types)]
3736
#![feature(box_patterns)]

0 commit comments

Comments
 (0)