mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
fixup tests
This commit is contained in:
parent
f9510a55eb
commit
4fa2969c39
@ -15,16 +15,16 @@ fn main() {
|
||||
// Test case where first chain element isn't a path, but is shorter than
|
||||
// the size of a tab.
|
||||
x().y(|| match cond() {
|
||||
true => (),
|
||||
false => (),
|
||||
});
|
||||
true => (),
|
||||
false => (),
|
||||
});
|
||||
|
||||
loong_func().quux(move || if true { 1 } else { 2 });
|
||||
|
||||
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
|
||||
let x = c;
|
||||
x
|
||||
});
|
||||
let x = c;
|
||||
x
|
||||
});
|
||||
|
||||
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
|
||||
let x = c;
|
||||
@ -59,7 +59,7 @@ fn floaters() {
|
||||
|
||||
let x = Foo { field1: val1,
|
||||
field2: val2, }.method_call()
|
||||
.method_call();
|
||||
.method_call();
|
||||
|
||||
let y = if cond { val1 } else { val2 }.method_call();
|
||||
|
||||
@ -80,7 +80,7 @@ fn floaters() {
|
||||
} else {
|
||||
none();
|
||||
}.bar()
|
||||
.baz();
|
||||
.baz();
|
||||
|
||||
Foo { x: val }.baz(|| {
|
||||
force();
|
||||
@ -90,10 +90,10 @@ fn floaters() {
|
||||
|
||||
Foo { y: i_am_multi_line,
|
||||
z: ok, }.baz(|| {
|
||||
force();
|
||||
multiline();
|
||||
})
|
||||
.quux();
|
||||
force();
|
||||
multiline();
|
||||
})
|
||||
.quux();
|
||||
|
||||
a + match x {
|
||||
true => "yay!",
|
||||
@ -137,9 +137,9 @@ fn issue1434() {
|
||||
for _ in 0..100 {
|
||||
let prototype_id =
|
||||
PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
|
||||
format!("could not read prototype ID at offset {:#010x}",
|
||||
current_offset)
|
||||
})?;
|
||||
format!("could not read prototype ID at offset {:#010x}",
|
||||
current_offset)
|
||||
})?;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,7 @@ fn main() {
|
||||
.method_call_a(aaaaa, bbbbb, |c| {
|
||||
let x = c;
|
||||
x
|
||||
})
|
||||
.method_call_b(aaaaa, bbbbb, |c| {
|
||||
}).method_call_b(aaaaa, bbbbb, |c| {
|
||||
let x = c;
|
||||
x
|
||||
});
|
||||
@ -65,8 +64,7 @@ fn main() {
|
||||
.map(|x| {
|
||||
x += 1;
|
||||
x
|
||||
})
|
||||
.filter(some_mod::some_filter)
|
||||
}).filter(some_mod::some_filter)
|
||||
}
|
||||
|
||||
fn floaters() {
|
||||
@ -79,7 +77,7 @@ fn floaters() {
|
||||
field1: val1,
|
||||
field2: val2,
|
||||
}.method_call()
|
||||
.method_call();
|
||||
.method_call();
|
||||
|
||||
let y = if cond {
|
||||
val1
|
||||
@ -106,15 +104,14 @@ fn floaters() {
|
||||
} else {
|
||||
none();
|
||||
}.bar()
|
||||
.baz();
|
||||
.baz();
|
||||
|
||||
Foo {
|
||||
x: val,
|
||||
}.baz(|| {
|
||||
force();
|
||||
multiline();
|
||||
})
|
||||
.quux();
|
||||
}).quux();
|
||||
|
||||
Foo {
|
||||
y: i_am_multi_line,
|
||||
@ -122,8 +119,7 @@ fn floaters() {
|
||||
}.baz(|| {
|
||||
force();
|
||||
multiline();
|
||||
})
|
||||
.quux();
|
||||
}).quux();
|
||||
|
||||
a + match x {
|
||||
true => "yay!",
|
||||
@ -238,8 +234,7 @@ impl Foo {
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
}).collect();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,18 +138,20 @@ fn issue470() {
|
||||
{
|
||||
{
|
||||
{
|
||||
let explicit_arg_decls = explicit_arguments.into_iter().enumerate().map(
|
||||
|(index, (ty, pattern))| {
|
||||
let lvalue = Lvalue::Arg(index as u32);
|
||||
block = this.pattern(
|
||||
block,
|
||||
argument_extent,
|
||||
hair::PatternRef::Hair(pattern),
|
||||
&lvalue,
|
||||
);
|
||||
ArgDecl { ty: ty }
|
||||
},
|
||||
);
|
||||
let explicit_arg_decls =
|
||||
explicit_arguments
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(index, (ty, pattern))| {
|
||||
let lvalue = Lvalue::Arg(index as u32);
|
||||
block = this.pattern(
|
||||
block,
|
||||
argument_extent,
|
||||
hair::PatternRef::Hair(pattern),
|
||||
&lvalue,
|
||||
);
|
||||
ArgDecl { ty: ty }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -169,8 +171,7 @@ fn issue1329() {
|
||||
.map(|x| {
|
||||
x += 1;
|
||||
x
|
||||
})
|
||||
.filter
|
||||
}).filter
|
||||
}
|
||||
|
||||
fn issue325() {
|
||||
|
@ -117,8 +117,7 @@ impl Cursor {
|
||||
debug_assert_eq!(n, -1);
|
||||
None
|
||||
}
|
||||
})
|
||||
.or_else(|| {
|
||||
}).or_else(|| {
|
||||
let canonical = self.canonical();
|
||||
if canonical != *self {
|
||||
canonical.num_template_args()
|
||||
|
@ -141,8 +141,7 @@ fn issue_1450() {
|
||||
Relaxed,
|
||||
Release,
|
||||
Relaxed,
|
||||
)
|
||||
.is_ok()
|
||||
).is_ok()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ fn floaters() {
|
||||
field1: val1,
|
||||
field2: val2,
|
||||
}.method_call()
|
||||
.method_call();
|
||||
.method_call();
|
||||
|
||||
let y = if cond {
|
||||
val1
|
||||
|
@ -5,7 +5,7 @@ fn floaters() {
|
||||
field1: val1,
|
||||
field2: val2,
|
||||
}.method_call()
|
||||
.method_call();
|
||||
.method_call();
|
||||
|
||||
let y = if cond { val1 } else { val2 }.method_call();
|
||||
|
||||
|
@ -56,8 +56,8 @@ fn bar() {}
|
||||
/// .boxed(),
|
||||
/// ]
|
||||
/// }).bind("127.0.0.1:8080")
|
||||
/// .unwrap()
|
||||
/// .run()
|
||||
/// .unwrap()
|
||||
/// .run()
|
||||
/// # });
|
||||
/// }
|
||||
/// ```
|
||||
|
@ -183,8 +183,7 @@ fn issue_1885() {
|
||||
chan_select! {
|
||||
rx.recv() => {}
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
}).collect::<Vec<_>>();
|
||||
}
|
||||
|
||||
fn issue_1917() {
|
||||
|
@ -381,8 +381,7 @@ fn issue1456() {
|
||||
.iter()
|
||||
.map(|node| {
|
||||
XPathNodeReader::new(node, &context).and_then(|r| ArtistRef::from_xml(&r))
|
||||
})
|
||||
.collect();
|
||||
}).collect();
|
||||
res?
|
||||
}
|
||||
_ => Vec::new(),
|
||||
|
Loading…
Reference in New Issue
Block a user