-
Notifications
You must be signed in to change notification settings - Fork 601
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 #7500 from hi-rustin/rustin-patch-feature-name
Use the same feature name validation rule from Cargo
- Loading branch information
Showing
14 changed files
with
231 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
17 changes: 17 additions & 0 deletions
17
...apshots/all__krate__publish__features__feature_name_start_with_number_and_underscore.snap
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,17 @@ | ||
--- | ||
source: src/tests/krate/publish/features.rs | ||
expression: crates | ||
--- | ||
[ | ||
{ | ||
"name": "foo", | ||
"vers": "1.0.0", | ||
"deps": [], | ||
"cksum": "6f73fad556c46cdb740173ccc7a5f5bf64b8d954966be16963a08eb138e3c69c", | ||
"features": { | ||
"0foo1.bar": [], | ||
"_foo2.bar": [] | ||
}, | ||
"yanked": false | ||
} | ||
] |
16 changes: 16 additions & 0 deletions
16
src/tests/krate/publish/snapshots/all__krate__publish__features__feature_name_with_dot.snap
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 @@ | ||
--- | ||
source: src/tests/krate/publish/features.rs | ||
expression: crates | ||
--- | ||
[ | ||
{ | ||
"name": "foo", | ||
"vers": "1.0.0", | ||
"deps": [], | ||
"cksum": "d0bfdbcd4905a15b3dc6db5ce23e206ac413b4d780053fd38e145a75197fb1e1", | ||
"features": { | ||
"foo.bar": [] | ||
}, | ||
"yanked": false | ||
} | ||
] |
16 changes: 16 additions & 0 deletions
16
...ate/publish/snapshots/all__krate__publish__features__feature_name_with_unicode_chars.snap
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 @@ | ||
--- | ||
source: src/tests/krate/publish/features.rs | ||
expression: crates | ||
--- | ||
[ | ||
{ | ||
"name": "foo", | ||
"vers": "1.0.0", | ||
"deps": [], | ||
"cksum": "493720846371607438c1a4eb90c9cc7d7286600ca9c4e2ca04151aad9563b47a", | ||
"features": { | ||
"foo.你好世界": [] | ||
}, | ||
"yanked": false | ||
} | ||
] |
11 changes: 0 additions & 11 deletions
11
src/tests/krate/publish/snapshots/all__krate__publish__features__invalid_feature_name.snap
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/tests/krate/publish/snapshots/all__krate__publish__features__invalid_feature_name1.snap
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,11 @@ | ||
--- | ||
source: src/tests/krate/publish/features.rs | ||
expression: response.into_json() | ||
--- | ||
{ | ||
"errors": [ | ||
{ | ||
"detail": "invalid character `~` in feature `~foo`, the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)" | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
src/tests/krate/publish/snapshots/all__krate__publish__features__invalid_feature_name2.snap
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,11 @@ | ||
--- | ||
source: src/tests/krate/publish/features.rs | ||
expression: response.into_json() | ||
--- | ||
{ | ||
"errors": [ | ||
{ | ||
"detail": "invalid character `!` in feature `!bar`, the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)" | ||
} | ||
] | ||
} |
Oops, something went wrong.