mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 13:07:37 +00:00

Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
21 lines
275 B
Rust
21 lines
275 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
|
|
|
|
fn borrow(_v: &isize) {}
|
|
|
|
fn borrow_from_arg_imm_ref(v: Box<isize>) {
|
|
borrow(&*v);
|
|
}
|
|
|
|
fn borrow_from_arg_mut_ref(v: &mut Box<isize>) {
|
|
borrow(&**v);
|
|
}
|
|
|
|
fn borrow_from_arg_copy(v: Box<isize>) {
|
|
borrow(&*v);
|
|
}
|
|
|
|
pub fn main() {
|
|
}
|