Skip to content

Commit 2ef5621

Browse files
committed
Auto merge of #12939 - hi-rustin:rustin-patch-feature-msg, r=epage
Fix the invalidate feature name message
2 parents 8cf7143 + 976835d commit 2ef5621

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cargo/core/summary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ fn validate_feature_name(pkg_id: PackageId, name: &str) -> CargoResult<()> {
451451
if !(unicode_xid::UnicodeXID::is_xid_continue(ch) || ch == '-' || ch == '+' || ch == '.') {
452452
bail!(
453453
"invalid character `{}` in feature `{}` in package {}, \
454-
characters must be Unicode XID characters, `+`, or `.` \
454+
characters must be Unicode XID characters, '-', `+`, or `.` \
455455
(numbers, `+`, `-`, `_`, `.`, or most letters)",
456456
ch,
457457
name,

tests/testsuite/features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
20762076
20772077
Caused by:
20782078
invalid character `&` in feature `a&b` in package foo v0.1.0 ([ROOT]/foo), \
2079-
characters must be Unicode XID characters, `+`, or `.` \
2079+
characters must be Unicode XID characters, '-', `+`, or `.` \
20802080
(numbers, `+`, `-`, `_`, `.`, or most letters)
20812081
",
20822082
)

0 commit comments

Comments
 (0)