-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #104943 - aDotInTheVoid:jsondoclint-use-enum, r=Guill…
…aumeGomez jsondoclint: Handle using enum variants and glob using enums. More work on jsondoclint for `core.json` Closes #104942 r? `@GuillaumeGomez` `@rustbot` modify labels: +A-testsuite
- Loading branch information
Showing
4 changed files
with
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/104942> | ||
|
||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// @set Color = "$.index[*][?(@.name == 'Color')].id" | ||
pub enum Color { | ||
Red, | ||
Green, | ||
Blue, | ||
} | ||
|
||
// @set use_Color = "$.index[*][?(@.kind == 'import')].id" | ||
// @is "$.index[*][?(@.kind == 'import')].inner.id" $Color | ||
// @is "$.index[*][?(@.kind == 'import')].inner.glob" true | ||
pub use Color::*; | ||
|
||
// @ismany "$.index[*][?(@.name == 'use_glob')].inner.items[*]" $Color $use_Color |
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,15 @@ | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id" | ||
pub enum AlwaysNone { | ||
// @set None = "$.index[*][?(@.name == 'None')].id" | ||
None, | ||
} | ||
// @is "$.index[*][?(@.name == 'AlwaysNone')].inner.variants[*]" $None | ||
|
||
// @set use_None = "$.index[*][?(@.kind == 'import')].id" | ||
// @is "$.index[*][?(@.kind == 'import')].inner.id" $None | ||
pub use AlwaysNone::None; | ||
|
||
// @ismany "$.index[*][?(@.name == 'use_variant')].inner.items[*]" $AlwaysNone $use_None |
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