diff --git a/tests/snapshots/output/changes.snapshot.txt b/tests/snapshots/output/changes.snapshot.txt index 28d87201f0..6f88351717 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 04767b8b3a..6de1f8f651 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 655b6e248f..98518e196e 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 cee4737f4d..f8ecaa32c3 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 cee4737f4d..f8ecaa32c3 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 655b6e248f..98518e196e 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 7fe7cccfdc..0154a2b092 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 7fe7cccfdc..0154a2b092 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 04767b8b3a..6de1f8f651 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 82fe8c47cb..d5c1afd920 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 77145eb9b2..cc99df08b3 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 77145eb9b2..cc99df08b3 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 82fe8c47cb..d5c1afd920 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 bdfe745bff..5b4044110e 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 bdfe745bff..5b4044110e 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 28d87201f0..6f88351717 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 cee4737f4d..f8ecaa32c3 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 5b970581f5..7061949760 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 50c16941e9..010e3a8137 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 e9f1a9cfe6..dfbb934bb7 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 e9f1a9cfe6..dfbb934bb7 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 50c16941e9..010e3a8137 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 0961466704..83ee57cdca 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 0961466704..83ee57cdca 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 5b970581f5..7061949760 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 0889edfd32..3cbbad49d2 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 a681e6b407..82fa9175a5 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 a681e6b407..82fa9175a5 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 0889edfd32..3cbbad49d2 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 c1341d29df..560e755702 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 c1341d29df..560e755702 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 dbc49f9fdd..b9da99a904 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 dbc49f9fdd..b9da99a904 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 bb1a794375..fff9f98213 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,