]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/try-conversion.rs
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
[rust.git] / src / tools / rustfmt / tests / source / try-conversion.rs
1 // rustfmt-use_try_shorthand: true
2
3 fn main() {
4     let x = try!(some_expr());
5
6     let y = try!(a.very.loooooooooooooooooooooooooooooooooooooong().chain().inside().weeeeeeeeeeeeeee()).test().0.x;
7 }
8
9 fn test() {
10     a?
11 }
12
13 fn issue1291() {
14     try!(fs::create_dir_all(&gitfiledir).chain_err(|| {
15         format!("failed to create the {} submodule directory for the workarea",
16                 name)
17     }));
18 }