Skip to content

Commit 744167d

Browse files
committed
commit causing ICE when running simple_impl test
The test is broken, the code tries to access a trait thats not available. To replicate the ICE run cargo test simple_impl cargo version: cargo 1.64.0-nightly (4fd148c47 2022-08-03)
1 parent feaca30 commit 744167d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub use dbstruct_derive::*;
55

66
mod stores;
77
pub mod traits;
8+
// pub use traits::DataStore;
89
pub mod wrappers;
910

1011
#[derive(Debug, thiserror::Error)]

tests/simple_impl.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pub struct Test<DS: dbstruct::DataStore + std::clone::Clone> {
2+
ds: DS,
3+
}
4+
5+
impl<DS> Test<DS>
6+
where
7+
DS: dbstruct::DataStore + std::clone::Clone,
8+
{
9+
pub fn new(ds: DS) -> Result<Self, dbstruct::Error<DS::Error>> {
10+
Ok(Self {
11+
ds,
12+
ds: std::sync::Arc::new(std::sync::atomic::AtomicUsize::new(0)),
13+
})
14+
}
15+
fn the_field(&self) -> dbstruct::wrappers::DefaultTrait<u8, DS> {
16+
dbstruct::wrappers::DefaultTrait::new(self.ds.clone(), 0u8)
17+
}
18+
}
19+
20+
fn main() {}

0 commit comments

Comments
 (0)