Skip to content

Commit

Permalink
typo and std supertraits
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnossiom committed Sep 20, 2024
1 parent f6c52f8 commit 46df559
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
20 changes: 13 additions & 7 deletions test_crates/trait_added_supertrait/new/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
}
20 changes: 13 additions & 7 deletions test_crates/trait_added_supertrait/old/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 2 additions & 2 deletions test_outputs/trait_added_supertrait.output.ron
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand Down

0 comments on commit 46df559

Please sign in to comment.