From d9089245fefdc4179c1d61839e78131c5e5a5a45 Mon Sep 17 00:00:00 2001 From: Geoffrey Copin Date: Sat, 11 Apr 2020 20:32:58 +0200 Subject: Generate doc --- crates/ra_assists/src/doc_tests/generated.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crates/ra_assists/src/doc_tests') diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index 64444ee3a..6dc049715 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs @@ -606,6 +606,21 @@ impl Walrus { ) } +#[test] +fn doctest_reorder_fields() { + check( + "reorder_fields", + r#####" +struct Foo {foo: i32, bar: i32}; +const test: Foo = <|>Foo {bar: 0, foo: 1} +"#####, + r#####" +struct Foo {foo: i32, bar: i32}; +const test: Foo = Foo {foo: 1, bar: 0} +"#####, + ) +} + #[test] fn doctest_replace_if_let_with_match() { check( -- cgit v1.2.3