From 46df55909e065435caaa6932a688eacc06bdbfbe Mon Sep 17 00:00:00 2001 From: Milo Moisson Date: Wed, 28 Aug 2024 23:15:01 +0200 Subject: [PATCH] typo and std supertraits --- .../trait_added_supertrait/new/src/lib.rs | 20 ++++++++++++------- .../trait_added_supertrait/old/src/lib.rs | 20 ++++++++++++------- .../trait_added_supertrait.output.ron | 4 ++-- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/test_crates/trait_added_supertrait/new/src/lib.rs b/test_crates/trait_added_supertrait/new/src/lib.rs index 6cb3454d..22b067b2 100644 --- a/test_crates/trait_added_supertrait/new/src/lib.rs +++ b/test_crates/trait_added_supertrait/new/src/lib.rs @@ -1,15 +1,21 @@ +pub trait TraitOne {} +pub trait TraitTwo {} + mod sealed { pub trait Sealed {} } -pub trait TraitOne {} -pub trait TraitTwo {} - pub trait Unchanged {} pub trait UnchangedSealed: sealed::Sealed {} -pub trait WillGailOne: TraitOne {} -pub trait WillGailOneSealed: TraitOne + sealed::Sealed {} +pub trait WillGainOne: TraitOne {} +pub trait WillGainOneSealed: TraitOne + sealed::Sealed {} -pub trait WillGailAnotherOne: TraitOne + TraitTwo {} -pub trait WillGailAnotherOneSealed: TraitOne + TraitTwo + sealed::Sealed {} +pub trait WillGainAnotherOne: TraitOne + TraitTwo {} +pub trait WillGainAnotherOneSealed: TraitOne + TraitTwo + sealed::Sealed {} + +pub trait WillGainStdOne: Sync {} +pub trait WillGainStdTwo: core::fmt::Debug {} +pub trait WillGainStdThree: PartialEq { + fn make_me_non_object_safe() -> Self; +} diff --git a/test_crates/trait_added_supertrait/old/src/lib.rs b/test_crates/trait_added_supertrait/old/src/lib.rs index e82ccf6f..8c10d0e2 100644 --- a/test_crates/trait_added_supertrait/old/src/lib.rs +++ b/test_crates/trait_added_supertrait/old/src/lib.rs @@ -1,15 +1,21 @@ +pub trait TraitOne {} +pub trait TraitTwo {} + mod sealed { pub trait Sealed {} } -pub trait TraitOne {} -pub trait TraitTwo {} - pub trait Unchanged {} pub trait UnchangedSealed: sealed::Sealed {} -pub trait WillGailOne {} -pub trait WillGailOneSealed: sealed::Sealed {} +pub trait WillGainOne {} +pub trait WillGainOneSealed: sealed::Sealed {} -pub trait WillGailAnotherOne: TraitOne {} -pub trait WillGailAnotherOneSealed: TraitOne + sealed::Sealed {} +pub trait WillGainAnotherOne: TraitOne {} +pub trait WillGainAnotherOneSealed: TraitOne + sealed::Sealed {} + +pub trait WillGainStdOne {} +pub trait WillGainStdTwo {} +pub trait WillGainStdThree { + fn make_me_non_object_safe() -> Self; +} diff --git a/test_outputs/trait_added_supertrait.output.ron b/test_outputs/trait_added_supertrait.output.ron index f96b67a0..b6d3011d 100644 --- a/test_outputs/trait_added_supertrait.output.ron +++ b/test_outputs/trait_added_supertrait.output.ron @@ -3,7 +3,7 @@ { "path": List([ String("trait_added_supertrait"), - String("WillGailOne"), + String("WillGainOne"), ]), "span_begin_line": Uint64(11), "span_filename": String("src/lib.rs"), @@ -13,7 +13,7 @@ { "path": List([ String("trait_added_supertrait"), - String("WillGailAnotherOne"), + String("WillGainAnotherOne"), ]), "span_begin_line": Uint64(14), "span_filename": String("src/lib.rs"),