diff options
Diffstat (limited to 'src/tools/rustfmt/tests/target/configs/use_try_shorthand')
-rw-r--r-- | src/tools/rustfmt/tests/target/configs/use_try_shorthand/false.rs | 6 | ||||
-rw-r--r-- | src/tools/rustfmt/tests/target/configs/use_try_shorthand/true.rs | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/configs/use_try_shorthand/false.rs b/src/tools/rustfmt/tests/target/configs/use_try_shorthand/false.rs new file mode 100644 index 000000000..de7f8b4a5 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/use_try_shorthand/false.rs @@ -0,0 +1,6 @@ +// rustfmt-use_try_shorthand: false +// Use try! shorthand + +fn main() { + let lorem = try!(ipsum.map(|dolor| dolor.sit())); +} diff --git a/src/tools/rustfmt/tests/target/configs/use_try_shorthand/true.rs b/src/tools/rustfmt/tests/target/configs/use_try_shorthand/true.rs new file mode 100644 index 000000000..d3aa03579 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/use_try_shorthand/true.rs @@ -0,0 +1,6 @@ +// rustfmt-use_try_shorthand: true +// Use try! shorthand + +fn main() { + let lorem = ipsum.map(|dolor| dolor.sit())?; +} |