forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#3200 from scampi/issue-3194
compute the span after a struct-like item based on the ident description
- Loading branch information
Showing
3 changed files
with
71 additions
and
3 deletions.
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,13 @@ | ||
mod m { struct S where A: B; } | ||
|
||
mod n { struct Foo where A: B { foo: usize } } | ||
|
||
mod o { enum Bar where A: B { Bar } } | ||
|
||
mod with_comments { | ||
mod m { struct S /* before where */ where A: B; /* after where */ } | ||
|
||
mod n { struct Foo /* before where */ where A: B /* after where */ { foo: usize } } | ||
|
||
mod o { enum Bar /* before where */ where A: B /* after where */ { Bar } } | ||
} |
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,52 @@ | ||
mod m { | ||
struct S | ||
where | ||
A: B; | ||
} | ||
|
||
mod n { | ||
struct Foo | ||
where | ||
A: B, | ||
{ | ||
foo: usize, | ||
} | ||
} | ||
|
||
mod o { | ||
enum Bar | ||
where | ||
A: B, | ||
{ | ||
Bar, | ||
} | ||
} | ||
|
||
mod with_comments { | ||
mod m { | ||
struct S | ||
/* before where */ | ||
where | ||
A: B; /* after where */ | ||
} | ||
|
||
mod n { | ||
struct Foo | ||
/* before where */ | ||
where | ||
A: B, /* after where */ | ||
{ | ||
foo: usize, | ||
} | ||
} | ||
|
||
mod o { | ||
enum Bar | ||
/* before where */ | ||
where | ||
A: B, /* after where */ | ||
{ | ||
Bar, | ||
} | ||
} | ||
} |