diff --git a/tests/target/configs/indent_style/block_trailing_comma_call/one.rs b/tests/target/configs/indent_style/block_trailing_comma_call/one.rs index 6b9489bef550..204dce6d655a 100644 --- a/tests/target/configs/indent_style/block_trailing_comma_call/one.rs +++ b/tests/target/configs/indent_style/block_trailing_comma_call/one.rs @@ -1,4 +1,4 @@ -// rustfmt-version: One +// rustfmt-style_edition: 2015 // rustfmt-error_on_line_overflow: false // rustfmt-indent_style: Block diff --git a/tests/target/configs/indent_style/block_trailing_comma_call/two.rs b/tests/target/configs/indent_style/block_trailing_comma_call/two.rs index 4f4292e5f485..887e8328ccc7 100644 --- a/tests/target/configs/indent_style/block_trailing_comma_call/two.rs +++ b/tests/target/configs/indent_style/block_trailing_comma_call/two.rs @@ -1,4 +1,4 @@ -// rustfmt-version: Two +// rustfmt-style_edition: 2024 // rustfmt-error_on_line_overflow: false // rustfmt-indent_style: Block diff --git a/tests/target/configs/version/mapped.rs b/tests/target/configs/version/mapped.rs new file mode 100644 index 000000000000..296dc559a934 --- /dev/null +++ b/tests/target/configs/version/mapped.rs @@ -0,0 +1,9 @@ +// rustfmt-version: Two +fn main() { + let [ + aaaaaaaaaaaaaaaaaaaaaaaaaa, + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, + cccccccccccccccccccccccccc, + ddddddddddddddddddddddddd, + ] = panic!(); +} diff --git a/tests/target/style_edition/default.rs b/tests/target/style_edition/default.rs new file mode 100644 index 000000000000..17442df6c49a --- /dev/null +++ b/tests/target/style_edition/default.rs @@ -0,0 +1,10 @@ +fn build_sorted_static_get_entry_names( + mut entries: Vec<(u8, &'static str)>, +) -> (impl Fn( + AlphabeticalTraversal, + Box>, +) -> BoxFuture<'static, Result, Status>> + + Send + + Sync + + 'static) { +} diff --git a/tests/target/style_edition/follows_edition.rs b/tests/target/style_edition/follows_edition.rs new file mode 100644 index 000000000000..c36a993d842a --- /dev/null +++ b/tests/target/style_edition/follows_edition.rs @@ -0,0 +1,14 @@ +// rustfmt-edition: 2024 + +fn build_sorted_static_get_entry_names( + mut entries: Vec<(u8, &'static str)>, +) -> ( + impl Fn( + AlphabeticalTraversal, + Box>, + ) -> BoxFuture<'static, Result, Status>> + + Send + + Sync + + 'static +) { +} diff --git a/tests/target/style_edition/overrides_edition_when_set.rs b/tests/target/style_edition/overrides_edition_when_set.rs new file mode 100644 index 000000000000..6d0eaac8970f --- /dev/null +++ b/tests/target/style_edition/overrides_edition_when_set.rs @@ -0,0 +1,14 @@ +// rustfmt-edition: 2018 +// rustfmt-style_edition: 2024 +fn build_sorted_static_get_entry_names( + mut entries: Vec<(u8, &'static str)>, +) -> ( + impl Fn( + AlphabeticalTraversal, + Box>, + ) -> BoxFuture<'static, Result, Status>> + + Send + + Sync + + 'static +) { +}