]> git.lizzy.rs Git - rust.git/blob - src/test/ui/format-ref-cell.rs
Update tests
[rust.git] / src / test / ui / format-ref-cell.rs
1 // run-pass
2
3 use std::cell::RefCell;
4
5 pub fn main() {
6     let name = RefCell::new("rust");
7     let what = RefCell::new("rocks");
8     let msg = format!("{name} {}", &*what.borrow(), name=&*name.borrow());
9     assert_eq!(msg, "rust rocks".to_string());
10 }