2012-07-14 00:57:48 -05:00
|
|
|
fn wants_box(x: @str) { }
|
|
|
|
fn wants_uniq(x: ~str) { }
|
2012-10-20 19:40:21 -05:00
|
|
|
fn wants_slice(x: &str) { }
|
2012-04-14 20:45:03 -05:00
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn has_box(x: @str) {
|
2012-04-14 20:45:03 -05:00
|
|
|
wants_box(x);
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found @
|
2012-10-20 19:40:21 -05:00
|
|
|
wants_slice(x);
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn has_uniq(x: ~str) {
|
2012-06-30 06:23:59 -05:00
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found ~
|
2012-04-14 20:45:03 -05:00
|
|
|
wants_uniq(x);
|
2012-10-20 19:40:21 -05:00
|
|
|
wants_slice(x);
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
2012-10-20 19:40:21 -05:00
|
|
|
fn has_slice(x: &str) {
|
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found &
|
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found &
|
|
|
|
wants_slice(x);
|
2012-04-14 20:45:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|