From: topecongiro Date: Fri, 23 Feb 2018 07:15:48 +0000 (+0900) Subject: Move type punctuation tests under config dir X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=391ed68ad41c944b97a85690515a33d3bbefabbb;p=rust.git Move type punctuation tests under config dir --- diff --git a/rustfmt-core/tests/source/configs/type_punctuation_density/compressed.rs b/rustfmt-core/tests/source/configs/type_punctuation_density/compressed.rs index 6e16e610566..223b9a2f0f0 100644 --- a/rustfmt-core/tests/source/configs/type_punctuation_density/compressed.rs +++ b/rustfmt-core/tests/source/configs/type_punctuation_density/compressed.rs @@ -4,3 +4,34 @@ fn lorem() { // body } + +struct Foo +where U: Eq + Clone { + // body +} + +trait Foo<'a, T = usize> +where T: 'a + Eq + Clone +{ + type Bar: Eq + Clone; +} + +trait Foo: Eq + Clone { + // body +} + +impl Foo<'a> for Bar +where for<'a> T: 'a + Eq + Clone +{ + // body +} + +fn foo<'a, 'b, 'c>() +where 'a: 'b + 'c +{ + // body +} + +fn Foo + Foo>() { + let i = 6; +} diff --git a/rustfmt-core/tests/source/configs/type_punctuation_density/wide.rs b/rustfmt-core/tests/source/configs/type_punctuation_density/wide.rs index 1fcdddf0f9a..fe0c0816701 100644 --- a/rustfmt-core/tests/source/configs/type_punctuation_density/wide.rs +++ b/rustfmt-core/tests/source/configs/type_punctuation_density/wide.rs @@ -4,3 +4,34 @@ fn lorem() { // body } + +struct Foo +where U: Eq + Clone { + // body +} + +trait Foo<'a, T = usize> +where T: 'a + Eq + Clone +{ + type Bar: Eq + Clone; +} + +trait Foo: Eq + Clone { + // body +} + +impl Foo<'a> for Bar +where for<'a> T: 'a + Eq + Clone +{ + // body +} + +fn foo<'a, 'b, 'c>() +where 'a: 'b + 'c +{ + // body +} + +fn Foo + Foo>() { + let i = 6; +} diff --git a/rustfmt-core/tests/source/type-punctuation.rs b/rustfmt-core/tests/source/type-punctuation.rs deleted file mode 100644 index 0980e4a3732..00000000000 --- a/rustfmt-core/tests/source/type-punctuation.rs +++ /dev/null @@ -1,32 +0,0 @@ -// rustfmt-type_punctuation_density: Compressed - -struct Foo - where U: Eq + Clone { - // body -} - -trait Foo<'a, T = usize> - where T: 'a + Eq + Clone -{ - type Bar: Eq + Clone; -} - -trait Foo: Eq + Clone { - // body -} - -impl Foo<'a> for Bar - where for<'a> T: 'a + Eq + Clone -{ - // body -} - -fn foo<'a, 'b, 'c>() - where 'a: 'b + 'c -{ - // body -} - -fn Foo + Foo>() { - let i = 6; -} diff --git a/rustfmt-core/tests/target/configs/type_punctuation_density/compressed.rs b/rustfmt-core/tests/target/configs/type_punctuation_density/compressed.rs index 4b3e02e19ea..6571e448e44 100644 --- a/rustfmt-core/tests/target/configs/type_punctuation_density/compressed.rs +++ b/rustfmt-core/tests/target/configs/type_punctuation_density/compressed.rs @@ -4,3 +4,38 @@ fn lorem() { // body } + +struct Foo +where + U: Eq+Clone, { + // body +} + +trait Foo<'a, T=usize> +where + T: 'a+Eq+Clone, +{ + type Bar: Eq+Clone; +} + +trait Foo: Eq+Clone { + // body +} + +impl Foo<'a> for Bar +where + for<'a> T: 'a+Eq+Clone, +{ + // body +} + +fn foo<'a, 'b, 'c>() +where + 'a: 'b+'c, +{ + // body +} + +fn Foo+Foo>() { + let i = 6; +} diff --git a/rustfmt-core/tests/target/configs/type_punctuation_density/wide.rs b/rustfmt-core/tests/target/configs/type_punctuation_density/wide.rs index 8909036e688..01546c7b0a5 100644 --- a/rustfmt-core/tests/target/configs/type_punctuation_density/wide.rs +++ b/rustfmt-core/tests/target/configs/type_punctuation_density/wide.rs @@ -4,3 +4,38 @@ fn lorem() { // body } + +struct Foo +where + U: Eq + Clone, { + // body +} + +trait Foo<'a, T = usize> +where + T: 'a + Eq + Clone, +{ + type Bar: Eq + Clone; +} + +trait Foo: Eq + Clone { + // body +} + +impl Foo<'a> for Bar +where + for<'a> T: 'a + Eq + Clone, +{ + // body +} + +fn foo<'a, 'b, 'c>() +where + 'a: 'b + 'c, +{ + // body +} + +fn Foo + Foo>() { + let i = 6; +} diff --git a/rustfmt-core/tests/target/type-punctuation.rs b/rustfmt-core/tests/target/type-punctuation.rs deleted file mode 100644 index f35293de626..00000000000 --- a/rustfmt-core/tests/target/type-punctuation.rs +++ /dev/null @@ -1,36 +0,0 @@ -// rustfmt-type_punctuation_density: Compressed - -struct Foo -where - U: Eq+Clone, { - // body -} - -trait Foo<'a, T=usize> -where - T: 'a+Eq+Clone, -{ - type Bar: Eq+Clone; -} - -trait Foo: Eq+Clone { - // body -} - -impl Foo<'a> for Bar -where - for<'a> T: 'a+Eq+Clone, -{ - // body -} - -fn foo<'a, 'b, 'c>() -where - 'a: 'b+'c, -{ - // body -} - -fn Foo+Foo>() { - let i = 6; -}