Skip to content

Commit 1f75189

Browse files
committed
add a few more impls and things
1 parent c89f2e0 commit 1f75189

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

libstd.chalk

+22-2
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,38 @@
55
// ?- load libstd.chalk
66
// ?- Vec<Box<i32>>: Clone
77

8+
trait AsRef<T> { }
89
trait Clone { }
910
trait Copy where Self: Clone { }
11+
trait Sized { }
1012

1113
struct i32 { }
1214
impl Copy for i32 { }
1315
impl Clone for i32 { }
16+
impl Sized for i32 { }
17+
18+
struct u32 { }
19+
impl Copy for u32 { }
20+
impl Clone for u32 { }
21+
impl Sized for u32 { }
1422

1523
struct Rc<T> { }
1624
impl<T> Clone for Rc<T> { }
25+
impl<T> Sized for Rc<T> { }
1726

1827
struct Box<T> { }
28+
impl<T> AsRef<T> for Box<T> where T: Sized { }
1929
impl<T> Clone for Box<T> where T: Clone { }
30+
impl<T> Sized for Box<T> { }
31+
32+
// Meant to be [T]
33+
struct Slice<T> where T: Sized { }
34+
impl<T> Sized for Slice<T> { }
35+
impl<T> AsRef<Slice<T>> for Slice<T> where T: Sized { }
36+
37+
struct Vec<T> where T: Sized { }
38+
impl<T> AsRef<Slice<T>> for Vec<T> where T: Sized { }
39+
impl<T> AsRef<Vec<T>> for Vec<T> where T: Sized { }
40+
impl<T> Clone for Vec<T> where T: Clone, T: Sized { }
41+
impl<T> Sized for Vec<T> where T: Sized { }
2042

21-
struct Vec<T> { }
22-
impl<T> Clone for Vec<T> where T: Clone { }

0 commit comments

Comments
 (0)