Skip to content

Commit

Permalink
Auto merge of #12939 - hi-rustin:rustin-patch-feature-msg, r=epage
Browse files Browse the repository at this point in the history
Fix the invalidate feature name message
  • Loading branch information
bors committed Nov 8, 2023
2 parents 8cf7143 + 976835d commit 2ef5621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cargo/core/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ fn validate_feature_name(pkg_id: PackageId, name: &str) -> CargoResult<()> {
if !(unicode_xid::UnicodeXID::is_xid_continue(ch) || ch == '-' || ch == '+' || ch == '.') {
bail!(
"invalid character `{}` in feature `{}` in package {}, \
characters must be Unicode XID characters, `+`, or `.` \
characters must be Unicode XID characters, '-', `+`, or `.` \
(numbers, `+`, `-`, `_`, `.`, or most letters)",
ch,
name,
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
Caused by:
invalid character `&` in feature `a&b` in package foo v0.1.0 ([ROOT]/foo), \
characters must be Unicode XID characters, `+`, or `.` \
characters must be Unicode XID characters, '-', `+`, or `.` \
(numbers, `+`, `-`, `_`, `.`, or most letters)
",
)
Expand Down

0 comments on commit 2ef5621

Please sign in to comment.