]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/func-arg-incomplete-pattern.rs
Rollup merge of #45171 - rust-lang:petrochenkov-patch-2, r=steveklabnik
[rust.git] / src / test / run-pass / func-arg-incomplete-pattern.rs
index 4476ce309c478e63cdf956cbbf0d994686ba35bb..6030da44e4ade6982dc4c3238ea3e91c5408b7f1 100644 (file)
 // Test that we do not leak when the arg pattern must drop part of the
 // argument (in this case, the `y` field).
 
-// pretty-expanded FIXME #23616
 
 #![allow(unknown_features)]
 #![feature(box_syntax)]
 
 struct Foo {
-    x: Box<uint>,
-    y: Box<uint>,
+    x: Box<usize>,
+    y: Box<usize>,
 }
 
-fn foo(Foo {x, ..}: Foo) -> *const uint {
-    let addr: *const uint = &*x;
+fn foo(Foo {x, ..}: Foo) -> *const usize {
+    let addr: *const usize = &*x;
     addr
 }
 
 pub fn main() {
     let obj: Box<_> = box 1;
-    let objptr: *const uint = &*obj;
+    let objptr: *const usize = &*obj;
     let f = Foo {x: obj, y: box 2};
     let xptr = foo(f);
     assert_eq!(objptr, xptr);