diff options
| author | bors <bors@rust-lang.org> | 2023-05-22 06:38:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-22 06:38:20 +0000 |
| commit | 2d66e5a729d85490dc3c342e4c23c22786e324ee (patch) | |
| tree | fc6969d2ca6dad2d686090f1a07f589e4a879d12 | |
| parent | 7ca94f241f11b0045ae405bed05a100c07b6f45b (diff) | |
| parent | e2362d7e1afecaf9f7485072a0fc543b8ab46afa (diff) | |
| download | rust-2d66e5a729d85490dc3c342e4c23c22786e324ee.tar.gz rust-2d66e5a729d85490dc3c342e4c23c22786e324ee.zip | |
Auto merge of #111835 - matthiaskrgr:rollup-qd4b2vu, r=matthiaskrgr
Rollup of 2 pull requests Successful merges: - #111810 (Don't use inner macro in `marker_impls`) - #111826 (Render test messages from bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
| -rw-r--r-- | library/core/src/marker.rs | 26 | ||||
| -rw-r--r-- | src/bootstrap/render_tests.rs | 9 |
2 files changed, 15 insertions, 20 deletions
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 2bb688b921c..8dab8d1a692 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -43,27 +43,17 @@ use crate::hash::Hasher; /// ``` #[unstable(feature = "internal_impls_macro", issue = "none")] macro marker_impls { - ( $(#[$($meta:tt)*])* $Trait:ident for $( $({$($bounds:tt)*})? $T:ty ),+ $(,)?) => { - // This inner macro is needed because... idk macros are weird. - // It allows repeating `meta` on all impls. - #[unstable(feature = "internal_impls_macro", issue = "none")] - macro _impl { - ( $$({$$($$bounds_:tt)*})? $$T_:ty ) => { - $(#[$($meta)*])* impl<$$($$($$bounds_)*)?> $Trait for $$T_ {} - } - } - $( _impl! { $({$($bounds)*})? $T } )+ + ( $(#[$($meta:tt)*])* $Trait:ident for $({$($bounds:tt)*})? $T:ty $(, $($rest:tt)*)? ) => { + $(#[$($meta)*])* impl< $($($bounds)*)? > $Trait for $T {} + marker_impls! { $(#[$($meta)*])* $Trait for $($($rest)*)? } }, - ( $(#[$($meta:tt)*])* unsafe $Trait:ident for $( $({$($bounds:tt)*})? $T:ty ),+ $(,)?) => { - #[unstable(feature = "internal_impls_macro", issue = "none")] - macro _impl { - ( $$({$$($$bounds_:tt)*})? $$T_:ty ) => { - $(#[$($meta)*])* unsafe impl<$$($$($$bounds_)*)?> $Trait for $$T_ {} - } - } + ( $(#[$($meta:tt)*])* $Trait:ident for ) => {}, - $( _impl! { $({$($bounds)*})? $T } )+ + ( $(#[$($meta:tt)*])* unsafe $Trait:ident for $({$($bounds:tt)*})? $T:ty $(, $($rest:tt)*)? ) => { + $(#[$($meta)*])* unsafe impl< $($($bounds)*)? > $Trait for $T {} + marker_impls! { $(#[$($meta)*])* unsafe $Trait for $($($rest)*)? } }, + ( $(#[$($meta:tt)*])* unsafe $Trait:ident for ) => {}, } /// Types that can be transferred across thread boundaries. diff --git a/src/bootstrap/render_tests.rs b/src/bootstrap/render_tests.rs index bedf34d89e8..fa0a4806618 100644 --- a/src/bootstrap/render_tests.rs +++ b/src/bootstrap/render_tests.rs @@ -168,9 +168,14 @@ impl<'a> Renderer<'a> { if !self.failures.is_empty() { println!("\nfailures:\n"); for failure in &self.failures { - if let Some(stdout) = &failure.stdout { + if failure.stdout.is_some() || failure.message.is_some() { println!("---- {} stdout ----", failure.name); - println!("{stdout}"); + if let Some(stdout) = &failure.stdout { + println!("{stdout}"); + } + if let Some(message) = &failure.message { + println!("note: {message}"); + } } } |
