2015-01-03 10:45:00 -05:00
|
|
|
fn with<F>(f: F) where F: FnOnce(&String) {}
|
2013-06-20 15:11:47 -04:00
|
|
|
|
2014-05-22 16:57:53 -07:00
|
|
|
fn arg_item(&_x: &String) {}
|
2019-04-22 08:40:08 +01:00
|
|
|
//~^ ERROR [E0507]
|
2013-06-20 15:11:47 -04:00
|
|
|
|
|
|
|
fn arg_closure() {
|
|
|
|
with(|&_x| ())
|
2019-04-22 08:40:08 +01:00
|
|
|
//~^ ERROR [E0507]
|
2013-06-20 15:11:47 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn let_pat() {
|
2014-05-25 03:10:11 -07:00
|
|
|
let &_x = &"hi".to_string();
|
2019-04-22 08:40:08 +01:00
|
|
|
//~^ ERROR [E0507]
|
2013-06-20 15:11:47 -04:00
|
|
|
}
|
|
|
|
|
2013-09-23 17:20:36 -07:00
|
|
|
pub fn main() {}
|