Skip to content

Commit 289ae08

Browse files
committed
---
yaml --- r: 31426 b: refs/heads/dist-snap c: 10d8a68 h: refs/heads/master v: v3
1 parent f6e5ec4 commit 289ae08

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: da80bd17c30db599de43355f07783ee0bf846162
10+
refs/heads/dist-snap: 10d8a68791ff2103a84c02783db4e3fd28f2cd87
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/ops.rs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Core operators and kinds.
2+
3+
#[lang="const"]
4+
trait const {
5+
// Empty.
6+
}
7+
8+
#[lang="copy"]
9+
trait copy {
10+
// Empty.
11+
}
12+
13+
#[lang="send"]
14+
trait send {
15+
// Empty.
16+
}
17+
18+
#[lang="owned"]
19+
trait owned {
20+
// Empty.
21+
}
22+
23+
#[lang="add"]
24+
trait add<RHS,Result> {
25+
pure fn add(rhs: RHS) -> Result;
26+
}
27+
28+
#[lang="sub"]
29+
trait sub<RHS,Result> {
30+
pure fn sub(rhs: RHS) -> Result;
31+
}
32+
33+
#[lang="mul"]
34+
trait mul<RHS,Result> {
35+
pure fn mul(rhs: RHS) -> Result;
36+
}
37+
38+
#[lang="div"]
39+
trait div<RHS,Result> {
40+
pure fn div(rhs: RHS) -> Result;
41+
}
42+
43+
#[lang="modulo"]
44+
trait modulo<RHS,Result> {
45+
pure fn modulo(rhs: RHS) -> Result;
46+
}
47+
48+
#[lang="neg"]
49+
trait neg<RHS,Result> {
50+
pure fn neg(rhs: RHS) -> Result;
51+
}
52+
53+
#[lang="bitops"]
54+
trait bitops<RHS,BitCount,Result> {
55+
pure fn and(rhs: RHS) -> Result;
56+
pure fn or(rhs: RHS) -> Result;
57+
pure fn xor(rhs: RHS) -> Result;
58+
pure fn shl(n: BitCount) -> Result;
59+
pure fn shr(n: BitCount) -> Result;
60+
}
61+
62+
#[lang="index"]
63+
trait index<Index,Result> {
64+
pure fn index(index: Index) -> Result;
65+
}
66+

0 commit comments

Comments
 (0)