Skip to content

Commit

Permalink
Move format-ref-cell test
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Sep 21, 2020
1 parent f6a4189 commit 5be843f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 8 additions & 0 deletions library/core/tests/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,11 @@ fn refcell_replace_borrows() {
let _b = x.borrow();
x.replace(1);
}

#[test]
fn refcell_format() {
let name = RefCell::new("rust");
let what = RefCell::new("rocks");
let msg = format!("{name} {}", &*what.borrow(), name = &*name.borrow());
assert_eq!(msg, "rust rocks".to_string());
}
10 changes: 0 additions & 10 deletions src/test/ui/format-ref-cell.rs

This file was deleted.

0 comments on commit 5be843f

Please sign in to comment.