mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Attempt to fix option::test_unwrap_str breakage.
This commit is contained in:
@@ -264,10 +264,10 @@ fn test_unwrap_ptr() {
|
||||
#[test]
|
||||
fn test_unwrap_str() {
|
||||
let x = ~"test";
|
||||
let addr_x = str::as_buf(x, |buf, _len| ptr::p2::addr_of(&buf));
|
||||
let opt = Some(x);
|
||||
let y = unwrap(opt);
|
||||
let addr_y = str::as_buf(y, |buf, _len| ptr::p2::addr_of(&buf));
|
||||
let addr_x = str::as_buf(x, |buf, _len| buf);
|
||||
let opt = Some(move x);
|
||||
let y = unwrap(move opt);
|
||||
let addr_y = str::as_buf(y, |buf, _len| buf);
|
||||
assert addr_x == addr_y;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user