Skip to content

Commit 014d738

Browse files
committed
---
yaml --- r: 33423 b: refs/heads/snap-stage3 c: 8378757 h: refs/heads/master i: 33421: 5f887c9 33419: a0b6008 33415: 8546dd0 33407: e26dfff v: v3
1 parent e347d31 commit 014d738

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8a8fbe3dce7120e476edfa7ca4c0a40671b61cb6
4+
refs/heads/snap-stage3: 837875711a8724784e401ee5ef2fecad006a0ca6
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/test/compile-fail/estr-subtyping.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
fn wants_box(x: @str) { }
22
fn wants_uniq(x: ~str) { }
3-
fn wants_three(x: str/3) { }
3+
fn wants_slice(x: &str) { }
44

55
fn has_box(x: @str) {
66
wants_box(x);
77
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found @
8-
wants_three(x); //~ ERROR str storage differs: expected 3 but found @
8+
wants_slice(x);
99
}
1010

1111
fn has_uniq(x: ~str) {
1212
wants_box(x); //~ ERROR str storage differs: expected @ but found ~
1313
wants_uniq(x);
14-
wants_three(x); //~ ERROR str storage differs: expected 3 but found ~
14+
wants_slice(x);
1515
}
1616

17-
fn has_three(x: str/3) {
18-
wants_box(x); //~ ERROR str storage differs: expected @ but found 3
19-
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 3
20-
wants_three(x);
21-
}
22-
23-
fn has_four(x: str/4) {
24-
wants_box(x); //~ ERROR str storage differs: expected @ but found 4
25-
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 4
26-
wants_three(x); //~ ERROR str storage differs: expected 3 but found 4
17+
fn has_slice(x: &str) {
18+
wants_box(x); //~ ERROR str storage differs: expected @ but found &
19+
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found &
20+
wants_slice(x);
2721
}
2822

2923
fn main() {

0 commit comments

Comments
 (0)