]> git.lizzy.rs Git - rust.git/commitdiff
Add a test for #3009
authorSeiichi Uchida <seuchida@gmail.com>
Tue, 11 Sep 2018 04:30:36 +0000 (13:30 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Tue, 11 Sep 2018 04:30:36 +0000 (13:30 +0900)
tests/source/long-fn-1.rs [new file with mode: 0644]
tests/target/long-fn-1.rs

diff --git a/tests/source/long-fn-1.rs b/tests/source/long-fn-1.rs
new file mode 100644 (file)
index 0000000..1f53d78
--- /dev/null
@@ -0,0 +1,20 @@
+// Tests that a function which is almost short enough, but not quite, gets
+// formatted correctly.
+
+impl Foo {
+    fn some_input(&mut self, input: Input, input_path: Option<PathBuf>, ) -> (Input, Option<PathBuf>) {}
+
+    fn some_inpu(&mut self, input: Input, input_path: Option<PathBuf>) -> (Input, Option<PathBuf>) {}
+}
+
+// #1843
+#[allow(non_snake_case)]
+pub extern "C" fn Java_com_exonum_binding_storage_indices_ValueSetIndexProxy_nativeContainsByHash() -> bool {
+    false
+}
+
+// #3009
+impl Something {
+    fn my_function_name_is_way_to_long_but_used_as_a_case_study_or_an_example_its_fine(
+) -> Result<  (), String  > {}
+}
index c3d44de7c69be40ffd1f499a8b48748a5201f048..5fd605dd3155491c66ac1f7b8f597320fbc653ef 100644 (file)
@@ -19,3 +19,10 @@ pub extern "C" fn Java_com_exonum_binding_storage_indices_ValueSetIndexProxy_nat
 ) -> bool {
     false
 }
+
+// #3009
+impl Something {
+    fn my_function_name_is_way_to_long_but_used_as_a_case_study_or_an_example_its_fine(
+    ) -> Result<(), String> {
+    }
+}