From: Seiichi Uchida Date: Tue, 11 Sep 2018 04:30:36 +0000 (+0900) Subject: Add a test for #3009 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9674e12a5c2ac427ae3b765d310ffff63434462d;p=rust.git Add a test for #3009 --- diff --git a/tests/source/long-fn-1.rs b/tests/source/long-fn-1.rs new file mode 100644 index 00000000000..1f53d78802d --- /dev/null +++ b/tests/source/long-fn-1.rs @@ -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, ) -> (Input, Option) {} + + fn some_inpu(&mut self, input: Input, input_path: Option) -> (Input, Option) {} +} + +// #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 > {} +} diff --git a/tests/target/long-fn-1.rs b/tests/target/long-fn-1.rs index c3d44de7c69..5fd605dd315 100644 --- a/tests/target/long-fn-1.rs +++ b/tests/target/long-fn-1.rs @@ -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> { + } +}