Skip to content

Commit 845cf93

Browse files
refactor: switch idempotence/system tests to style_edition
Updates all the various files utilized in the system and idempotence tests to directly use the corresponding 'style_edition' configuration as opposed to keeping the original 'version' values and relying on the mapping.
1 parent 781ce9d commit 845cf93

File tree

97 files changed

+97
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+97
-97
lines changed

tests/config/issue-5801-v2.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
max_width = 120
22
version = "Two"
3-
attr_fn_like_width = 120
3+
attr_fn_like_width = 120

tests/source/arrow_in_comments/arrow_in_single_comment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
match a {
44
_ =>

tests/source/arrow_in_comments/multiple_arrows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
match a {
44
_ => // comment with =>

tests/source/configs/indent_style/block_trailing_comma_call/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22
// rustfmt-error_on_line_overflow: false
33
// rustfmt-indent_style: Block
44

tests/source/configs/indent_style/block_trailing_comma_call/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-error_on_line_overflow: false
33
// rustfmt-indent_style: Block
44

tests/source/fn-single-line/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-fn_single_line: true
2-
// rustfmt-version: One
2+
// rustfmt-style_edition: 2015
33
// Test single-line functions.
44

55
fn foo_expr() {

tests/source/fn-single-line/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-fn_single_line: true
2-
// rustfmt-version: Two
2+
// rustfmt-style_edition: 2024
33
// Test single-line functions.
44

55
fn foo_expr() {

tests/source/issue-2179/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22
// rustfmt-error_on_line_overflow: false
33

44
fn issue_2179() {

tests/source/issue-2179/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-error_on_line_overflow: false
33

44
fn issue_2179() {

tests/source/issue-3213/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn foo() {
44
match 0 {

tests/source/issue-3213/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn foo() {
44
match 0 {

tests/source/issue-3227/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn main() {
44
thread::spawn(|| {

tests/source/issue-3270/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
pub fn main() {
44
/* let s = String::from(

tests/source/issue-3270/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub fn main() {
44
/* let s = String::from(

tests/source/issue-3272/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn main() {
44
assert!(HAYSTACK

tests/source/issue-3272/v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn main() {
44
assert!(HAYSTACK

tests/source/issue-3278/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
pub fn parse_conditional<'a, I: 'a>(
44
) -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a

tests/source/issue-3278/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub fn parse_conditional<'a, I: 'a>()
44
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a

tests/source/issue-3295/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
pub enum TestEnum {
33
a,
44
b,

tests/source/issue-3302.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
macro_rules! moo1 {
44
() => {

tests/source/issue-3701/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn build_sorted_static_get_entry_names(
44
mut entries: Vec<(u8, &'static str)>,

tests/source/issue-3701/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn build_sorted_static_get_entry_names(
44
mut entries: Vec<(u8, &'static str)>,

tests/source/issue-3805.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-format_macro_matchers: true
33

44
// From original issue example - Line length 101

tests/source/issue-3840/version-two_hard-tabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-hard_tabs: true
2-
// rustfmt-version: Two
2+
// rustfmt-style_edition: 2024
33

44
impl<Target: FromEvent<A> + FromEvent<B>, A: Widget2<Ctx = C>, B: Widget2<Ctx = C>, C: for<'a> CtxFamily<'a>> Widget2 for WidgetEventLifter<Target, A, B>
55
{

tests/source/issue-3840/version-two_soft-tabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
impl<Target: FromEvent<A> + FromEvent<B>, A: Widget2<Ctx = C>, B: Widget2<Ctx = C>, C: for<'a> CtxFamily<'a>> Widget2 for WidgetEventLifter<Target, A, B>
44
{

tests/source/issue-4530.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
let [aaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, cccccccccccccccccccccccccc, ddddddddddddddddddddddddd] = panic!();
44
}

tests/source/issue-4689/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
// Based on the issue description
44
pub trait PrettyPrinter<'tcx>:

tests/source/issue-4689/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
// Based on the issue description
44
pub trait PrettyPrinter<'tcx>:

tests/source/issue-5586.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
// sample 1
44
{

tests/source/issue-5655/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn foo<T>(_: T)
44
where

tests/source/issue-5655/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn foo<T>(_: T)
44
where

tests/source/issue-5801/comment_unexpectedly_wraps_before_max_width.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// rustfmt-comment_width: 120
22
// rustfmt-wrap_comments: true
33
// rustfmt-max_width: 120
4-
// rustfmt-version: One
4+
// rustfmt-style_edition: 2015
55

66
/// This function is 120 columns wide and is left alone. This comment is 120 columns wide and the formatter is also fine
77
fn my_super_cool_function_name(my_very_cool_argument_name: String, my_other_very_cool_argument_name: String) -> String {

tests/source/issue-5987/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn main() {
44
trace!(

tests/source/issue-6147/case_rustfmt_v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
pub fn main() {
44
let a = Some(12);

tests/source/issue-6147/case_rustfmt_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub fn main() {
44
let a = Some(12);

tests/source/issue_5027.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;
44

tests/source/let_else_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-single_line_let_else_max_width: 100
33

44
fn issue5901() {

tests/source/long-fn-1/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22
// Tests that a function which is almost short enough, but not quite, gets
33
// formatted correctly.
44

tests/source/long-fn-1/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// Tests that a function which is almost short enough, but not quite, gets
33
// formatted correctly.
44

tests/source/one_line_if_v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn plain_if(x: bool) -> u8 {
44
if x {

tests/source/one_line_if_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn plain_if(x: bool) -> u8 {
44
if x {

tests/source/single-line-macro/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
// #2652
44
// Preserve trailing comma inside macro, even if it looks an array.

tests/source/single-line-macro/v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
// #2652
44
// Preserve trailing comma inside macro, even if it looks an array.

tests/source/trailing_comments/hard_tabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-wrap_comments: true
33
// rustfmt-hard_tabs: true
44

tests/source/trailing_comments/soft_tabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-wrap_comments: true
33

44
pub const IFF_MULTICAST: ::c_int = 0x0000000800; // Supports multicast

tests/source/tuple_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn issue_4355() {
44
let _ = ((1,),).0 .0;

tests/target/arrow_in_comments/arrow_in_single_comment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
match a {
44
_ =>

tests/target/arrow_in_comments/multiple_arrows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
fn main() {
33
match a {
44
_ =>

tests/target/fn-single-line/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-fn_single_line: true
2-
// rustfmt-version: One
2+
// rustfmt-style_edition: 2015
33
// Test single-line functions.
44

55
fn foo_expr() { 1 }

tests/target/fn-single-line/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-fn_single_line: true
2-
// rustfmt-version: Two
2+
// rustfmt-style_edition: 2024
33
// Test single-line functions.
44

55
fn foo_expr() { 1 }

tests/target/issue-2179/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22
// rustfmt-error_on_line_overflow: false
33

44
fn issue_2179() {

tests/target/issue-2179/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
// rustfmt-error_on_line_overflow: false
33

44
fn issue_2179() {

tests/target/issue-3132.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn test() {
44
/*

tests/target/issue-3213/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn foo() {
44
match 0 {

tests/target/issue-3213/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn foo() {
44
match 0 {

tests/target/issue-3227/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn main() {
44
thread::spawn(|| {

tests/target/issue-3227/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn main() {
44
thread::spawn(|| {

tests/target/issue-3270/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
pub fn main() {
44
/* let s = String::from(

tests/target/issue-3270/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub fn main() {
44
/* let s = String::from(

tests/target/issue-3270/wrap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-wrap_comments: true
2-
// rustfmt-version: Two
2+
// rustfmt-style_edition: 2024
33

44
// check that a line below max_width does not get over the limit when wrapping
55
// it in a block comment

tests/target/issue-3272/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
fn main() {
44
assert!(HAYSTACK

tests/target/issue-3272/v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
fn main() {
44
assert!(

tests/target/issue-3278/version_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: One
1+
// rustfmt-style_edition: 2015
22

33
pub fn parse_conditional<'a, I: 'a>(
44
) -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a

tests/target/issue-3278/version_two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22

33
pub fn parse_conditional<'a, I: 'a>()
44
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a

tests/target/issue-3295/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-version: Two
1+
// rustfmt-style_edition: 2024
22
pub enum TestEnum {
33
a,
44
b,

0 commit comments

Comments
 (0)