2012-07-13 22:57:48 -07:00
|
|
|
fn wants_box(x: @str) { }
|
|
|
|
fn wants_uniq(x: ~str) { }
|
2012-10-20 17:40:21 -07:00
|
|
|
fn wants_slice(x: &str) { }
|
2012-04-14 18:45:03 -07:00
|
|
|
|
2012-07-13 22:57:48 -07:00
|
|
|
fn has_box(x: @str) {
|
2012-04-14 18:45:03 -07:00
|
|
|
wants_box(x);
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_uniq(x); //~ ERROR str storage differs: expected ~ but found @
|
2012-10-20 17:40:21 -07:00
|
|
|
wants_slice(x);
|
2012-04-14 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
2012-07-13 22:57:48 -07:00
|
|
|
fn has_uniq(x: ~str) {
|
2012-06-30 12:23:59 +01:00
|
|
|
wants_box(x); //~ ERROR str storage differs: expected @ but found ~
|
2012-04-14 18:45:03 -07:00
|
|
|
wants_uniq(x);
|
2012-10-20 17:40:21 -07:00
|
|
|
wants_slice(x);
|
2012-04-14 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
2012-10-20 17:40:21 -07: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 18:45:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|