From 2339d78bf4cb32a5aa54699bc97ffe6c369eec69 Mon Sep 17 00:00:00 2001 From: Diva M Date: Fri, 15 Oct 2021 16:43:38 -0500 Subject: [PATCH] update snapshot tests --- tests/snapshots/output/changes.snapshot.txt | 1 + .../output/changes_grid.snapshot.txt | 1 + .../output/changes_grid_header.snapshot.txt | 1 + .../changes_grid_header_numbers.snapshot.txt | 45 ++++++++++--------- ...nges_grid_header_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../changes_grid_header_rule.snapshot.txt | 1 + .../output/changes_grid_numbers.snapshot.txt | 45 ++++++++++--------- .../changes_grid_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../output/changes_grid_rule.snapshot.txt | 1 + .../output/changes_header.snapshot.txt | 1 + .../changes_header_numbers.snapshot.txt | 45 ++++++++++--------- .../changes_header_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../output/changes_header_rule.snapshot.txt | 1 + .../output/changes_numbers.snapshot.txt | 45 ++++++++++--------- .../output/changes_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../output/changes_rule.snapshot.txt | 1 + tests/snapshots/output/full.snapshot.txt | 45 ++++++++++--------- tests/snapshots/output/grid.snapshot.txt | 1 + .../snapshots/output/grid_header.snapshot.txt | 1 + .../output/grid_header_numbers.snapshot.txt | 45 ++++++++++--------- .../grid_header_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../output/grid_header_rule.snapshot.txt | 1 + .../output/grid_numbers.snapshot.txt | 45 ++++++++++--------- .../output/grid_numbers_rule.snapshot.txt | 45 ++++++++++--------- tests/snapshots/output/grid_rule.snapshot.txt | 1 + tests/snapshots/output/header.snapshot.txt | 1 + .../output/header_numbers.snapshot.txt | 45 ++++++++++--------- .../output/header_numbers_rule.snapshot.txt | 45 ++++++++++--------- .../snapshots/output/header_rule.snapshot.txt | 1 + tests/snapshots/output/numbers.snapshot.txt | 45 ++++++++++--------- .../output/numbers_rule.snapshot.txt | 45 ++++++++++--------- tests/snapshots/output/plain.snapshot.txt | 1 + tests/snapshots/output/rule.snapshot.txt | 1 + tests/snapshots/sample.modified.rs | 1 + 34 files changed, 408 insertions(+), 374 deletions(-) diff --git a/tests/snapshots/output/changes.snapshot.txt b/tests/snapshots/output/changes.snapshot.txt index 28d87201..6f883517 100644 --- a/tests/snapshots/output/changes.snapshot.txt +++ b/tests/snapshots/output/changes.snapshot.txt @@ -1,3 +1,4 @@ ++ /// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/changes_grid.snapshot.txt b/tests/snapshots/output/changes_grid.snapshot.txt index 04767b8b..6de1f8f6 100644 --- a/tests/snapshots/output/changes_grid.snapshot.txt +++ b/tests/snapshots/output/changes_grid.snapshot.txt @@ -1,4 +1,5 @@ ──┬───────────────────────────────────────────────────────────────────────────── ++ │ /// A rectangle. First line is changed to prevent a regression of #1869 │ struct Rectangle { │ width: u32, │ height: u32, diff --git a/tests/snapshots/output/changes_grid_header.snapshot.txt b/tests/snapshots/output/changes_grid_header.snapshot.txt index 655b6e24..98518e19 100644 --- a/tests/snapshots/output/changes_grid_header.snapshot.txt +++ b/tests/snapshots/output/changes_grid_header.snapshot.txt @@ -1,6 +1,7 @@ ──┬───────────────────────────────────────────────────────────────────────────── │ File: sample.rs ──┼───────────────────────────────────────────────────────────────────────────── ++ │ /// A rectangle. First line is changed to prevent a regression of #1869 │ struct Rectangle { │ width: u32, │ height: u32, diff --git a/tests/snapshots/output/changes_grid_header_numbers.snapshot.txt b/tests/snapshots/output/changes_grid_header_numbers.snapshot.txt index cee4737f..f8ecaa32 100644 --- a/tests/snapshots/output/changes_grid_header_numbers.snapshot.txt +++ b/tests/snapshots/output/changes_grid_header_numbers.snapshot.txt @@ -1,26 +1,27 @@ ───────┬──────────────────────────────────────────────────────────────────────── │ File: sample.rs ───────┼──────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 _ │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 ~ │ "The perimeter of the rectangle is {} pixels.", - 11 ~ │ perimeter(&rect1) - 12 │ ); - 13 + │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 + │ - 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + │ (rectangle.width + rectangle.height) * 2 - 22 + │ } + 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 _ │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 ~ │ "The perimeter of the rectangle is {} pixels.", + 12 ~ │ perimeter(&rect1) + 13 │ ); + 14 + │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 + │ + 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + │ (rectangle.width + rectangle.height) * 2 + 23 + │ } ───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt b/tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt index cee4737f..f8ecaa32 100644 --- a/tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt @@ -1,26 +1,27 @@ ───────┬──────────────────────────────────────────────────────────────────────── │ File: sample.rs ───────┼──────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 _ │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 ~ │ "The perimeter of the rectangle is {} pixels.", - 11 ~ │ perimeter(&rect1) - 12 │ ); - 13 + │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 + │ - 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + │ (rectangle.width + rectangle.height) * 2 - 22 + │ } + 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 _ │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 ~ │ "The perimeter of the rectangle is {} pixels.", + 12 ~ │ perimeter(&rect1) + 13 │ ); + 14 + │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 + │ + 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + │ (rectangle.width + rectangle.height) * 2 + 23 + │ } ───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes_grid_header_rule.snapshot.txt b/tests/snapshots/output/changes_grid_header_rule.snapshot.txt index 655b6e24..98518e19 100644 --- a/tests/snapshots/output/changes_grid_header_rule.snapshot.txt +++ b/tests/snapshots/output/changes_grid_header_rule.snapshot.txt @@ -1,6 +1,7 @@ ──┬───────────────────────────────────────────────────────────────────────────── │ File: sample.rs ──┼───────────────────────────────────────────────────────────────────────────── ++ │ /// A rectangle. First line is changed to prevent a regression of #1869 │ struct Rectangle { │ width: u32, │ height: u32, diff --git a/tests/snapshots/output/changes_grid_numbers.snapshot.txt b/tests/snapshots/output/changes_grid_numbers.snapshot.txt index 7fe7cccf..0154a2b0 100644 --- a/tests/snapshots/output/changes_grid_numbers.snapshot.txt +++ b/tests/snapshots/output/changes_grid_numbers.snapshot.txt @@ -1,24 +1,25 @@ ───────┬──────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 _ │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 ~ │ "The perimeter of the rectangle is {} pixels.", - 11 ~ │ perimeter(&rect1) - 12 │ ); - 13 + │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 + │ - 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + │ (rectangle.width + rectangle.height) * 2 - 22 + │ } + 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 _ │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 ~ │ "The perimeter of the rectangle is {} pixels.", + 12 ~ │ perimeter(&rect1) + 13 │ ); + 14 + │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 + │ + 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + │ (rectangle.width + rectangle.height) * 2 + 23 + │ } ───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt b/tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt index 7fe7cccf..0154a2b0 100644 --- a/tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt @@ -1,24 +1,25 @@ ───────┬──────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 _ │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 ~ │ "The perimeter of the rectangle is {} pixels.", - 11 ~ │ perimeter(&rect1) - 12 │ ); - 13 + │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 + │ - 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + │ (rectangle.width + rectangle.height) * 2 - 22 + │ } + 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 _ │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 ~ │ "The perimeter of the rectangle is {} pixels.", + 12 ~ │ perimeter(&rect1) + 13 │ ); + 14 + │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 + │ + 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + │ (rectangle.width + rectangle.height) * 2 + 23 + │ } ───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes_grid_rule.snapshot.txt b/tests/snapshots/output/changes_grid_rule.snapshot.txt index 04767b8b..6de1f8f6 100644 --- a/tests/snapshots/output/changes_grid_rule.snapshot.txt +++ b/tests/snapshots/output/changes_grid_rule.snapshot.txt @@ -1,4 +1,5 @@ ──┬───────────────────────────────────────────────────────────────────────────── ++ │ /// A rectangle. First line is changed to prevent a regression of #1869 │ struct Rectangle { │ width: u32, │ height: u32, diff --git a/tests/snapshots/output/changes_header.snapshot.txt b/tests/snapshots/output/changes_header.snapshot.txt index 82fe8c47..d5c1afd9 100644 --- a/tests/snapshots/output/changes_header.snapshot.txt +++ b/tests/snapshots/output/changes_header.snapshot.txt @@ -1,4 +1,5 @@ File: sample.rs ++ /// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/changes_header_numbers.snapshot.txt b/tests/snapshots/output/changes_header_numbers.snapshot.txt index 77145eb9..cc99df08 100644 --- a/tests/snapshots/output/changes_header_numbers.snapshot.txt +++ b/tests/snapshots/output/changes_header_numbers.snapshot.txt @@ -1,23 +1,24 @@ File: sample.rs - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 _ fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 ~ "The perimeter of the rectangle is {} pixels.", - 11 ~ perimeter(&rect1) - 12 ); - 13 + println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 + - 20 + fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + (rectangle.width + rectangle.height) * 2 - 22 + } + 1 + /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 _ fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 ~ "The perimeter of the rectangle is {} pixels.", + 12 ~ perimeter(&rect1) + 13 ); + 14 + println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + + 21 + fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + (rectangle.width + rectangle.height) * 2 + 23 + } diff --git a/tests/snapshots/output/changes_header_numbers_rule.snapshot.txt b/tests/snapshots/output/changes_header_numbers_rule.snapshot.txt index 77145eb9..cc99df08 100644 --- a/tests/snapshots/output/changes_header_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/changes_header_numbers_rule.snapshot.txt @@ -1,23 +1,24 @@ File: sample.rs - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 _ fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 ~ "The perimeter of the rectangle is {} pixels.", - 11 ~ perimeter(&rect1) - 12 ); - 13 + println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 + - 20 + fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + (rectangle.width + rectangle.height) * 2 - 22 + } + 1 + /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 _ fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 ~ "The perimeter of the rectangle is {} pixels.", + 12 ~ perimeter(&rect1) + 13 ); + 14 + println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + + 21 + fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + (rectangle.width + rectangle.height) * 2 + 23 + } diff --git a/tests/snapshots/output/changes_header_rule.snapshot.txt b/tests/snapshots/output/changes_header_rule.snapshot.txt index 82fe8c47..d5c1afd9 100644 --- a/tests/snapshots/output/changes_header_rule.snapshot.txt +++ b/tests/snapshots/output/changes_header_rule.snapshot.txt @@ -1,4 +1,5 @@ File: sample.rs ++ /// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/changes_numbers.snapshot.txt b/tests/snapshots/output/changes_numbers.snapshot.txt index bdfe745b..5b404411 100644 --- a/tests/snapshots/output/changes_numbers.snapshot.txt +++ b/tests/snapshots/output/changes_numbers.snapshot.txt @@ -1,22 +1,23 @@ - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 _ fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 ~ "The perimeter of the rectangle is {} pixels.", - 11 ~ perimeter(&rect1) - 12 ); - 13 + println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 + - 20 + fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + (rectangle.width + rectangle.height) * 2 - 22 + } + 1 + /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 _ fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 ~ "The perimeter of the rectangle is {} pixels.", + 12 ~ perimeter(&rect1) + 13 ); + 14 + println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + + 21 + fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + (rectangle.width + rectangle.height) * 2 + 23 + } diff --git a/tests/snapshots/output/changes_numbers_rule.snapshot.txt b/tests/snapshots/output/changes_numbers_rule.snapshot.txt index bdfe745b..5b404411 100644 --- a/tests/snapshots/output/changes_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/changes_numbers_rule.snapshot.txt @@ -1,22 +1,23 @@ - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 _ fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 ~ "The perimeter of the rectangle is {} pixels.", - 11 ~ perimeter(&rect1) - 12 ); - 13 + println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 + - 20 + fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + (rectangle.width + rectangle.height) * 2 - 22 + } + 1 + /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 _ fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 ~ "The perimeter of the rectangle is {} pixels.", + 12 ~ perimeter(&rect1) + 13 ); + 14 + println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + + 21 + fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + (rectangle.width + rectangle.height) * 2 + 23 + } diff --git a/tests/snapshots/output/changes_rule.snapshot.txt b/tests/snapshots/output/changes_rule.snapshot.txt index 28d87201..6f883517 100644 --- a/tests/snapshots/output/changes_rule.snapshot.txt +++ b/tests/snapshots/output/changes_rule.snapshot.txt @@ -1,3 +1,4 @@ ++ /// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/full.snapshot.txt b/tests/snapshots/output/full.snapshot.txt index cee4737f..f8ecaa32 100644 --- a/tests/snapshots/output/full.snapshot.txt +++ b/tests/snapshots/output/full.snapshot.txt @@ -1,26 +1,27 @@ ───────┬──────────────────────────────────────────────────────────────────────── │ File: sample.rs ───────┼──────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 _ │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 ~ │ "The perimeter of the rectangle is {} pixels.", - 11 ~ │ perimeter(&rect1) - 12 │ ); - 13 + │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 + │ - 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 + │ (rectangle.width + rectangle.height) * 2 - 22 + │ } + 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 _ │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 ~ │ "The perimeter of the rectangle is {} pixels.", + 12 ~ │ perimeter(&rect1) + 13 │ ); + 14 + │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 + │ + 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 + │ (rectangle.width + rectangle.height) * 2 + 23 + │ } ───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid.snapshot.txt b/tests/snapshots/output/grid.snapshot.txt index 5b970581..70619497 100644 --- a/tests/snapshots/output/grid.snapshot.txt +++ b/tests/snapshots/output/grid.snapshot.txt @@ -1,4 +1,5 @@ ──────────────────────────────────────────────────────────────────────────────── +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/grid_header.snapshot.txt b/tests/snapshots/output/grid_header.snapshot.txt index 50c16941..010e3a81 100644 --- a/tests/snapshots/output/grid_header.snapshot.txt +++ b/tests/snapshots/output/grid_header.snapshot.txt @@ -1,6 +1,7 @@ ──────────────────────────────────────────────────────────────────────────────── File: sample.rs ──────────────────────────────────────────────────────────────────────────────── +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/grid_header_numbers.snapshot.txt b/tests/snapshots/output/grid_header_numbers.snapshot.txt index e9f1a9cf..dfbb934b 100644 --- a/tests/snapshots/output/grid_header_numbers.snapshot.txt +++ b/tests/snapshots/output/grid_header_numbers.snapshot.txt @@ -1,26 +1,27 @@ ─────┬────────────────────────────────────────────────────────────────────────── │ File: sample.rs ─────┼────────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 │ "The perimeter of the rectangle is {} pixels.", - 11 │ perimeter(&rect1) - 12 │ ); - 13 │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 │ - 20 │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 │ (rectangle.width + rectangle.height) * 2 - 22 │ } + 1 │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 │ "The perimeter of the rectangle is {} pixels.", + 12 │ perimeter(&rect1) + 13 │ ); + 14 │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 │ + 21 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 │ (rectangle.width + rectangle.height) * 2 + 23 │ } ─────┴────────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid_header_numbers_rule.snapshot.txt b/tests/snapshots/output/grid_header_numbers_rule.snapshot.txt index e9f1a9cf..dfbb934b 100644 --- a/tests/snapshots/output/grid_header_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/grid_header_numbers_rule.snapshot.txt @@ -1,26 +1,27 @@ ─────┬────────────────────────────────────────────────────────────────────────── │ File: sample.rs ─────┼────────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 │ "The perimeter of the rectangle is {} pixels.", - 11 │ perimeter(&rect1) - 12 │ ); - 13 │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 │ - 20 │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 │ (rectangle.width + rectangle.height) * 2 - 22 │ } + 1 │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 │ "The perimeter of the rectangle is {} pixels.", + 12 │ perimeter(&rect1) + 13 │ ); + 14 │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 │ + 21 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 │ (rectangle.width + rectangle.height) * 2 + 23 │ } ─────┴────────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid_header_rule.snapshot.txt b/tests/snapshots/output/grid_header_rule.snapshot.txt index 50c16941..010e3a81 100644 --- a/tests/snapshots/output/grid_header_rule.snapshot.txt +++ b/tests/snapshots/output/grid_header_rule.snapshot.txt @@ -1,6 +1,7 @@ ──────────────────────────────────────────────────────────────────────────────── File: sample.rs ──────────────────────────────────────────────────────────────────────────────── +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/grid_numbers.snapshot.txt b/tests/snapshots/output/grid_numbers.snapshot.txt index 09614667..83ee57cd 100644 --- a/tests/snapshots/output/grid_numbers.snapshot.txt +++ b/tests/snapshots/output/grid_numbers.snapshot.txt @@ -1,24 +1,25 @@ ─────┬────────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 │ "The perimeter of the rectangle is {} pixels.", - 11 │ perimeter(&rect1) - 12 │ ); - 13 │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 │ - 20 │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 │ (rectangle.width + rectangle.height) * 2 - 22 │ } + 1 │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 │ "The perimeter of the rectangle is {} pixels.", + 12 │ perimeter(&rect1) + 13 │ ); + 14 │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 │ + 21 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 │ (rectangle.width + rectangle.height) * 2 + 23 │ } ─────┴────────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid_numbers_rule.snapshot.txt b/tests/snapshots/output/grid_numbers_rule.snapshot.txt index 09614667..83ee57cd 100644 --- a/tests/snapshots/output/grid_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/grid_numbers_rule.snapshot.txt @@ -1,24 +1,25 @@ ─────┬────────────────────────────────────────────────────────────────────────── - 1 │ struct Rectangle { - 2 │ width: u32, - 3 │ height: u32, - 4 │ } - 5 │ - 6 │ fn main() { - 7 │ let rect1 = Rectangle { width: 30, height: 50 }; - 8 │ - 9 │ println!( - 10 │ "The perimeter of the rectangle is {} pixels.", - 11 │ perimeter(&rect1) - 12 │ ); - 13 │ println!(r#"This line contains invalid utf8: "�����"#; - 14 │ } - 15 │ - 16 │ fn area(rectangle: &Rectangle) -> u32 { - 17 │ rectangle.width * rectangle.height - 18 │ } - 19 │ - 20 │ fn perimeter(rectangle: &Rectangle) -> u32 { - 21 │ (rectangle.width + rectangle.height) * 2 - 22 │ } + 1 │ /// A rectangle. First line is changed to prevent a regression of #1869 + 2 │ struct Rectangle { + 3 │ width: u32, + 4 │ height: u32, + 5 │ } + 6 │ + 7 │ fn main() { + 8 │ let rect1 = Rectangle { width: 30, height: 50 }; + 9 │ + 10 │ println!( + 11 │ "The perimeter of the rectangle is {} pixels.", + 12 │ perimeter(&rect1) + 13 │ ); + 14 │ println!(r#"This line contains invalid utf8: "�����"#; + 15 │ } + 16 │ + 17 │ fn area(rectangle: &Rectangle) -> u32 { + 18 │ rectangle.width * rectangle.height + 19 │ } + 20 │ + 21 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 22 │ (rectangle.width + rectangle.height) * 2 + 23 │ } ─────┴────────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid_rule.snapshot.txt b/tests/snapshots/output/grid_rule.snapshot.txt index 5b970581..70619497 100644 --- a/tests/snapshots/output/grid_rule.snapshot.txt +++ b/tests/snapshots/output/grid_rule.snapshot.txt @@ -1,4 +1,5 @@ ──────────────────────────────────────────────────────────────────────────────── +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/header.snapshot.txt b/tests/snapshots/output/header.snapshot.txt index 0889edfd..3cbbad49 100644 --- a/tests/snapshots/output/header.snapshot.txt +++ b/tests/snapshots/output/header.snapshot.txt @@ -1,4 +1,5 @@ File: sample.rs +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/header_numbers.snapshot.txt b/tests/snapshots/output/header_numbers.snapshot.txt index a681e6b4..82fa9175 100644 --- a/tests/snapshots/output/header_numbers.snapshot.txt +++ b/tests/snapshots/output/header_numbers.snapshot.txt @@ -1,23 +1,24 @@ File: sample.rs - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 "The perimeter of the rectangle is {} pixels.", - 11 perimeter(&rect1) - 12 ); - 13 println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 - 20 fn perimeter(rectangle: &Rectangle) -> u32 { - 21 (rectangle.width + rectangle.height) * 2 - 22 } + 1 /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 "The perimeter of the rectangle is {} pixels.", + 12 perimeter(&rect1) + 13 ); + 14 println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + 21 fn perimeter(rectangle: &Rectangle) -> u32 { + 22 (rectangle.width + rectangle.height) * 2 + 23 } diff --git a/tests/snapshots/output/header_numbers_rule.snapshot.txt b/tests/snapshots/output/header_numbers_rule.snapshot.txt index a681e6b4..82fa9175 100644 --- a/tests/snapshots/output/header_numbers_rule.snapshot.txt +++ b/tests/snapshots/output/header_numbers_rule.snapshot.txt @@ -1,23 +1,24 @@ File: sample.rs - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 "The perimeter of the rectangle is {} pixels.", - 11 perimeter(&rect1) - 12 ); - 13 println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 - 20 fn perimeter(rectangle: &Rectangle) -> u32 { - 21 (rectangle.width + rectangle.height) * 2 - 22 } + 1 /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 "The perimeter of the rectangle is {} pixels.", + 12 perimeter(&rect1) + 13 ); + 14 println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + 21 fn perimeter(rectangle: &Rectangle) -> u32 { + 22 (rectangle.width + rectangle.height) * 2 + 23 } diff --git a/tests/snapshots/output/header_rule.snapshot.txt b/tests/snapshots/output/header_rule.snapshot.txt index 0889edfd..3cbbad49 100644 --- a/tests/snapshots/output/header_rule.snapshot.txt +++ b/tests/snapshots/output/header_rule.snapshot.txt @@ -1,4 +1,5 @@ File: sample.rs +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/numbers.snapshot.txt b/tests/snapshots/output/numbers.snapshot.txt index c1341d29..560e7557 100644 --- a/tests/snapshots/output/numbers.snapshot.txt +++ b/tests/snapshots/output/numbers.snapshot.txt @@ -1,22 +1,23 @@ - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 "The perimeter of the rectangle is {} pixels.", - 11 perimeter(&rect1) - 12 ); - 13 println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 - 20 fn perimeter(rectangle: &Rectangle) -> u32 { - 21 (rectangle.width + rectangle.height) * 2 - 22 } + 1 /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 "The perimeter of the rectangle is {} pixels.", + 12 perimeter(&rect1) + 13 ); + 14 println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + 21 fn perimeter(rectangle: &Rectangle) -> u32 { + 22 (rectangle.width + rectangle.height) * 2 + 23 } diff --git a/tests/snapshots/output/numbers_rule.snapshot.txt b/tests/snapshots/output/numbers_rule.snapshot.txt index c1341d29..560e7557 100644 --- a/tests/snapshots/output/numbers_rule.snapshot.txt +++ b/tests/snapshots/output/numbers_rule.snapshot.txt @@ -1,22 +1,23 @@ - 1 struct Rectangle { - 2 width: u32, - 3 height: u32, - 4 } - 5 - 6 fn main() { - 7 let rect1 = Rectangle { width: 30, height: 50 }; - 8 - 9 println!( - 10 "The perimeter of the rectangle is {} pixels.", - 11 perimeter(&rect1) - 12 ); - 13 println!(r#"This line contains invalid utf8: "�����"#; - 14 } - 15 - 16 fn area(rectangle: &Rectangle) -> u32 { - 17 rectangle.width * rectangle.height - 18 } - 19 - 20 fn perimeter(rectangle: &Rectangle) -> u32 { - 21 (rectangle.width + rectangle.height) * 2 - 22 } + 1 /// A rectangle. First line is changed to prevent a regression of #1869 + 2 struct Rectangle { + 3 width: u32, + 4 height: u32, + 5 } + 6 + 7 fn main() { + 8 let rect1 = Rectangle { width: 30, height: 50 }; + 9 + 10 println!( + 11 "The perimeter of the rectangle is {} pixels.", + 12 perimeter(&rect1) + 13 ); + 14 println!(r#"This line contains invalid utf8: "�����"#; + 15 } + 16 + 17 fn area(rectangle: &Rectangle) -> u32 { + 18 rectangle.width * rectangle.height + 19 } + 20 + 21 fn perimeter(rectangle: &Rectangle) -> u32 { + 22 (rectangle.width + rectangle.height) * 2 + 23 } diff --git a/tests/snapshots/output/plain.snapshot.txt b/tests/snapshots/output/plain.snapshot.txt index dbc49f9f..b9da99a9 100644 --- a/tests/snapshots/output/plain.snapshot.txt +++ b/tests/snapshots/output/plain.snapshot.txt @@ -1,3 +1,4 @@ +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/output/rule.snapshot.txt b/tests/snapshots/output/rule.snapshot.txt index dbc49f9f..b9da99a9 100644 --- a/tests/snapshots/output/rule.snapshot.txt +++ b/tests/snapshots/output/rule.snapshot.txt @@ -1,3 +1,4 @@ +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32, diff --git a/tests/snapshots/sample.modified.rs b/tests/snapshots/sample.modified.rs index bb1a7943..fff9f982 100644 --- a/tests/snapshots/sample.modified.rs +++ b/tests/snapshots/sample.modified.rs @@ -1,3 +1,4 @@ +/// A rectangle. First line is changed to prevent a regression of #1869 struct Rectangle { width: u32, height: u32,