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

Diff for: tests/config/issue-5801-v2.toml

+1-1
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

Diff for: tests/source/arrow_in_comments/arrow_in_single_comment.rs

+1-1
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
_ =>

Diff for: tests/source/arrow_in_comments/multiple_arrows.rs

+1-1
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 =>

Diff for: tests/source/configs/indent_style/block_trailing_comma_call/one.rs

+1-1
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

Diff for: tests/source/configs/indent_style/block_trailing_comma_call/two.rs

+1-1
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

Diff for: tests/source/fn-single-line/version_one.rs

+1-1
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() {

Diff for: tests/source/fn-single-line/version_two.rs

+1-1
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() {

Diff for: tests/source/issue-2179/one.rs

+1-1
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() {

Diff for: tests/source/issue-2179/two.rs

+1-1
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() {

Diff for: tests/source/issue-3213/version_one.rs

+1-1
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 {

Diff for: tests/source/issue-3213/version_two.rs

+1-1
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 {

Diff for: tests/source/issue-3227/two.rs

+1-1
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(|| {

Diff for: tests/source/issue-3270/one.rs

+1-1
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(

Diff for: tests/source/issue-3270/two.rs

+1-1
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(

Diff for: tests/source/issue-3272/v1.rs

+1-1
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

Diff for: tests/source/issue-3272/v2.rs

+1-1
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

Diff for: tests/source/issue-3278/version_one.rs

+1-1
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

Diff for: tests/source/issue-3278/version_two.rs

+1-1
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

Diff for: tests/source/issue-3295/two.rs

+1-1
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,

Diff for: tests/source/issue-3302.rs

+1-1
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
() => {

Diff for: tests/source/issue-3701/one.rs

+1-1
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)>,

Diff for: tests/source/issue-3701/two.rs

+1-1
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)>,

Diff for: tests/source/issue-3805.rs

+1-1
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

Diff for: tests/source/issue-3840/version-two_hard-tabs.rs

+1-1
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
{

Diff for: tests/source/issue-3840/version-two_soft-tabs.rs

+1-1
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
{

Diff for: tests/source/issue-4530.rs

+1-1
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
}

Diff for: tests/source/issue-4689/one.rs

+1-1
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>:

Diff for: tests/source/issue-4689/two.rs

+1-1
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>:

Diff for: tests/source/issue-5586.rs

+1-1
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
{

Diff for: tests/source/issue-5655/one.rs

+1-1
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

Diff for: tests/source/issue-5655/two.rs

+1-1
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

Diff for: tests/source/issue-5801/comment_unexpectedly_wraps_before_max_width.rs

+1-1
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 {

Diff for: tests/source/issue-5987/two.rs

+1-1
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!(

Diff for: tests/source/issue-6147/case_rustfmt_v1.rs

+1-1
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);

Diff for: tests/source/issue-6147/case_rustfmt_v2.rs

+1-1
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);

Diff for: tests/source/issue_5027.rs

+1-1
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

Diff for: tests/source/let_else_v2.rs

+1-1
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() {

Diff for: tests/source/long-fn-1/version_one.rs

+1-1
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

Diff for: tests/source/long-fn-1/version_two.rs

+1-1
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

Diff for: tests/source/one_line_if_v1.rs

+1-1
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 {

Diff for: tests/source/one_line_if_v2.rs

+1-1
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 {

Diff for: tests/source/single-line-macro/v1.rs

+1-1
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.

Diff for: tests/source/single-line-macro/v2.rs

+1-1
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.

Diff for: tests/source/trailing_comments/hard_tabs.rs

+1-1
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

Diff for: tests/source/trailing_comments/soft_tabs.rs

+1-1
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

Diff for: tests/source/tuple_v2.rs

+1-1
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;

Diff for: tests/target/arrow_in_comments/arrow_in_single_comment.rs

+1-1
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
_ =>

Diff for: tests/target/arrow_in_comments/multiple_arrows.rs

+1-1
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
_ =>

Diff for: tests/target/fn-single-line/version_one.rs

+1-1
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 }

Diff for: tests/target/fn-single-line/version_two.rs

+1-1
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 }

Diff for: tests/target/issue-2179/one.rs

+1-1
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() {

Diff for: tests/target/issue-2179/two.rs

+1-1
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() {

Diff for: tests/target/issue-3132.rs

+1-1
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
/*

Diff for: tests/target/issue-3213/version_one.rs

+1-1
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 {

Diff for: tests/target/issue-3213/version_two.rs

+1-1
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 {

Diff for: tests/target/issue-3227/one.rs

+1-1
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(|| {

Diff for: tests/target/issue-3227/two.rs

+1-1
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(|| {

Diff for: tests/target/issue-3270/one.rs

+1-1
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(

Diff for: tests/target/issue-3270/two.rs

+1-1
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(

Diff for: tests/target/issue-3270/wrap.rs

+1-1
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

Diff for: tests/target/issue-3272/v1.rs

+1-1
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

Diff for: tests/target/issue-3272/v2.rs

+1-1
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!(

Diff for: tests/target/issue-3278/version_one.rs

+1-1
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

Diff for: tests/target/issue-3278/version_two.rs

+1-1
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

Diff for: tests/target/issue-3295/two.rs

+1-1
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)