File tree 1 file changed +7
-13
lines changed
1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
fn wants_box ( x : @str ) { }
2
2
fn wants_uniq ( x : ~str ) { }
3
- fn wants_three ( x : str / 3 ) { }
3
+ fn wants_slice ( x : & str ) { }
4
4
5
5
fn has_box ( x : @str ) {
6
6
wants_box ( x) ;
7
7
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) ;
9
9
}
10
10
11
11
fn has_uniq ( x : ~str ) {
12
12
wants_box ( x) ; //~ ERROR str storage differs: expected @ but found ~
13
13
wants_uniq ( x) ;
14
- wants_three ( x) ; //~ ERROR str storage differs: expected 3 but found ~
14
+ wants_slice ( x) ;
15
15
}
16
16
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) ;
27
21
}
28
22
29
23
fn main ( ) {
You can’t perform that action at this time.
0 commit comments