-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use correct span for struct generics
- Loading branch information
1 parent
5391847
commit 34f9ca2
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
struct S<const C: usize> | ||
where | ||
[(); { num_slots!(C) }]:, { | ||
/* An asterisk-based, or a double-slash-prefixed, comment here is | ||
required to trigger the fmt bug. | ||
A single-line triple-slash-prefixed comment (with a field following it) is not enough - it will not trigger the fmt bug. | ||
Side note: If you have a combination of two, or all three of the | ||
above mentioned types of comments here, some of them disappear | ||
after `cargo fmt`. | ||
The bug gets triggered even if a field definition following the | ||
(asterisk-based, or a double-slash-prefixed) comment, too. | ||
*/ | ||
} |