mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
Fix tests for field parsing changes
This commit is contained in:
@@ -5,7 +5,7 @@ struct cat {
|
||||
|
||||
impl cat : Drop {
|
||||
fn finalize(&self) {
|
||||
self.done(self.meows);
|
||||
(self.done)(self.meows);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ fn cat() -> cat {
|
||||
|
||||
// Code compiles and runs successfully if we add a + before the first arg
|
||||
fn nyan(kitty: cat, _kitty_info: kitty_info) {
|
||||
kitty.meow();
|
||||
(kitty.meow)();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
|
||||
fn main() {
|
||||
let myval = mytype({compute: compute, val: 30});
|
||||
assert (myval.compute(myval) == 50);
|
||||
assert ((myval.compute)(myval) == 50);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ fn main() {
|
||||
let mut i = 3;
|
||||
let cl_box = box_it(|| i += 1);
|
||||
assert i == 3;
|
||||
cl_box.cl();
|
||||
(cl_box.cl)();
|
||||
assert i == 4;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ fn box_it(+x: &r/fn()) -> closure_box/&r {
|
||||
}
|
||||
|
||||
fn call_static_closure(cl: closure_box/&static) {
|
||||
cl.cl();
|
||||
(cl.cl)();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -7,7 +7,7 @@ struct finish<T: Copy> {
|
||||
|
||||
impl<T: Copy> finish<T> : Drop {
|
||||
fn finalize(&self) {
|
||||
self.arg.fin(self.arg.val);
|
||||
(self.arg.fin)(self.arg.val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user