Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ normalizations! {
UnindentMultilineNote,
DependencyVersion,
HeadingNote,
UnindentSuggestion,
// New normalization steps are to be inserted here at the end so that any
// snapshots saved before your normalization change remain passing.
}
Expand Down Expand Up @@ -669,6 +670,14 @@ fn indented_line_kind(
if spaces > 0
&& (rest == "|"
|| rest.starts_with("| ")
|| normalization >= UnindentSuggestion
&& digits > 0
&& (rest == "~"
|| rest.starts_with("~ ")
|| rest == "+"
|| rest.starts_with("+ ")
|| rest == "-"
|| rest.starts_with("- "))
|| digits == 0
&& (rest.starts_with("--> ") || rest.starts_with("::: ") || rest.starts_with("= ")))
{
Expand Down
41 changes: 41 additions & 0 deletions src/tests/ghost-note-help.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
test_normalize! {"
error[E0004]: non-exhaustive patterns: `MyPhantom::__Phantom(_)` not covered
--> src/main.rs:9:11
|
9 | match phantom {
| ^^^^^^^ pattern `MyPhantom::__Phantom(_)` not covered
|
note: `MyPhantom<u8>` defined here
--> src/main.rs:4:8
|
3 | #[phantom]
| ---------- not covered
4 | struct MyPhantom<T: ?Sized>;
| ^^^^^^^^^
= note: the matched value is of type `MyPhantom<u8>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
10 ~ MyPhantom => {},
11 + MyPhantom::__Phantom(_) => todo!()
|
" "
error[E0004]: non-exhaustive patterns: `MyPhantom::__Phantom(_)` not covered
--> src/main.rs:9:11
|
9 | match phantom {
| ^^^^^^^ pattern `MyPhantom::__Phantom(_)` not covered
|
note: `MyPhantom<u8>` defined here
--> src/main.rs:4:8
|
3 | #[phantom]
| ---------- not covered
4 | struct MyPhantom<T: ?Sized>;
| ^^^^^^^^^
= note: the matched value is of type `MyPhantom<u8>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
10 ~ MyPhantom => {},
11 + MyPhantom::__Phantom(_) => todo!()
|
"}