Skip to content

Commit 65f2a87

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents fad1681 + 6bc510d commit 65f2a87

File tree

4 files changed

+22
-28
lines changed

4 files changed

+22
-28
lines changed

src/cargo/core/summary.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,11 +460,11 @@ fn validate_feature_name(config: &Config, pkg_id: PackageId, name: &str) -> Carg
460460
}
461461
}
462462
for ch in chars {
463-
if !(unicode_xid::UnicodeXID::is_xid_continue(ch) || ch == '-' || ch == '+') {
463+
if !(unicode_xid::UnicodeXID::is_xid_continue(ch) || ch == '-' || ch == '+' || ch == '.') {
464464
config.shell().warn(&format!(
465465
"invalid character `{}` in feature `{}` in package {}, \
466-
characters must be Unicode XID characters or `+` \
467-
(numbers, `+`, `-`, `_`, or most letters)\n\
466+
characters must be Unicode XID characters, `+`, or `.` \
467+
(numbers, `+`, `-`, `_`, `.`, or most letters)\n\
468468
{}",
469469
ch, name, pkg_id, FUTURE
470470
))?;

src/doc/src/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ sometimes rebuild code when you're not expecting it!
210210
We've long [wanted to provide better diagnostics about
211211
this](https://github.com/rust-lang/cargo/issues/2904) but unfortunately haven't
212212
been able to make progress on that issue in quite some time. In the meantime,
213-
however, you can debug a rebuild at least a little by by setting the `CARGO_LOG`
213+
however, you can debug a rebuild at least a little by setting the `CARGO_LOG`
214214
environment variable:
215215

216216
```sh
@@ -233,7 +233,7 @@ Some issues we've seen historically which can cause crates to get rebuilt are:
233233

234234
* Two successive Cargo builds may differ in the set of features enabled for some
235235
dependencies. For example if the first build command builds the whole
236-
workspace and the second command builds only one crate, this may causes a
236+
workspace and the second command builds only one crate, this may cause a
237237
dependency on crates.io to have a different set of features enabled, causing
238238
it and everything that depends on it to get rebuilt. There's unfortunately not
239239
really a great fix for this, although if possible it's best to have the set of
@@ -243,7 +243,7 @@ Some issues we've seen historically which can cause crates to get rebuilt are:
243243
* Some filesystems exhibit unusual behavior around timestamps. Cargo primarily
244244
uses timestamps on files to govern whether rebuilding needs to happen, but if
245245
you're using a nonstandard filesystem it may be affecting the timestamps
246-
somehow (e.g. truncating them, causing them to drift, etc). In this scenario
246+
somehow (e.g. truncating them, causing them to drift, etc). In this scenario,
247247
feel free to open an issue and we can see if we can accomodate the filesystem
248248
somehow.
249249

src/doc/src/reference/semver.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub struct Foo {
224224
///////////////////////////////////////////////////////////
225225
// Example usage that will break.
226226
fn main() {
227-
let x = updated_crate::Foo { f1: 123 }; // Error: missing field `f2`
227+
let x = updated_crate::Foo { f1: 123 }; // Error: cannot construct `Foo`
228228
}
229229
```
230230

@@ -738,7 +738,7 @@ pub struct Foo<A: Eq> {
738738
use updated_crate::Foo;
739739
740740
fn main() {
741-
let s = Foo { f1: 1.23 }; // Error: the trait bound `{float}: std::cmp::Eq` is not satisfied
741+
let s = Foo { f1: 1.23 }; // Error: the trait bound `{float}: Eq` is not satisfied
742742
}
743743
```
744744

@@ -1070,7 +1070,7 @@ pub fn foo<T: Copy + IntoIterator<Item = u8>>(x: T) {}
10701070
use updated_crate::foo;
10711071
10721072
fn main() {
1073-
foo(vec![1, 2, 3]); // Error: `std::marker::Copy` is not implemented for `std::vec::Vec<u8>`
1073+
foo(vec![1, 2, 3]); // Error: `Copy` is not implemented for `Vec<u8>`
10741074
}
10751075
```
10761076

tests/testsuite/features.rs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,14 +1993,14 @@ fn invalid_feature_names() {
19931993
"_foo" = []
19941994
"feat-name" = []
19951995
"feat_name" = []
1996+
"foo.bar" = []
19961997
19971998
# Invalid names.
19981999
"+foo" = []
19992000
"-foo" = []
20002001
".foo" = []
20012002
"foo/bar" = []
20022003
"foo:bar" = []
2003-
"foo.bar" = []
20042004
"foo?" = []
20052005
"?foo" = []
20062006
"ⒶⒷⒸ" = []
@@ -2028,28 +2028,25 @@ For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues
20282028
[WARNING] invalid character `?` in feature `?foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)
20292029
This was previously accepted but is being phased out; it will become a hard error in a future release.
20302030
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2031-
[WARNING] invalid character `¼` in feature `a¼` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2032-
This was previously accepted but is being phased out; it will become a hard error in a future release.
2033-
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2034-
[WARNING] invalid character `.` in feature `foo.bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2031+
[WARNING] invalid character `¼` in feature `a¼` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20352032
This was previously accepted but is being phased out; it will become a hard error in a future release.
20362033
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2037-
[WARNING] invalid character `/` in feature `foo/bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2034+
[WARNING] invalid character `/` in feature `foo/bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20382035
This was previously accepted but is being phased out; it will become a hard error in a future release.
20392036
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2040-
[WARNING] invalid character `:` in feature `foo:bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2037+
[WARNING] invalid character `:` in feature `foo:bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20412038
This was previously accepted but is being phased out; it will become a hard error in a future release.
20422039
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2043-
[WARNING] invalid character `?` in feature `foo?` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2040+
[WARNING] invalid character `?` in feature `foo?` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20442041
This was previously accepted but is being phased out; it will become a hard error in a future release.
20452042
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
20462043
[WARNING] invalid character `Ⓐ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)
20472044
This was previously accepted but is being phased out; it will become a hard error in a future release.
20482045
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2049-
[WARNING] invalid character `Ⓑ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2046+
[WARNING] invalid character `Ⓑ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20502047
This was previously accepted but is being phased out; it will become a hard error in a future release.
20512048
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2052-
[WARNING] invalid character `Ⓒ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2049+
[WARNING] invalid character `Ⓒ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20532050
This was previously accepted but is being phased out; it will become a hard error in a future release.
20542051
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
20552052
[WARNING] invalid character `+` in feature `+foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)
@@ -2064,28 +2061,25 @@ For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues
20642061
[WARNING] invalid character `?` in feature `?foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)
20652062
This was previously accepted but is being phased out; it will become a hard error in a future release.
20662063
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2067-
[WARNING] invalid character `¼` in feature `a¼` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2068-
This was previously accepted but is being phased out; it will become a hard error in a future release.
2069-
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2070-
[WARNING] invalid character `.` in feature `foo.bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2064+
[WARNING] invalid character `¼` in feature `a¼` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20712065
This was previously accepted but is being phased out; it will become a hard error in a future release.
20722066
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2073-
[WARNING] invalid character `/` in feature `foo/bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2067+
[WARNING] invalid character `/` in feature `foo/bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20742068
This was previously accepted but is being phased out; it will become a hard error in a future release.
20752069
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2076-
[WARNING] invalid character `:` in feature `foo:bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2070+
[WARNING] invalid character `:` in feature `foo:bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20772071
This was previously accepted but is being phased out; it will become a hard error in a future release.
20782072
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2079-
[WARNING] invalid character `?` in feature `foo?` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2073+
[WARNING] invalid character `?` in feature `foo?` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20802074
This was previously accepted but is being phased out; it will become a hard error in a future release.
20812075
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
20822076
[WARNING] invalid character `Ⓐ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`)
20832077
This was previously accepted but is being phased out; it will become a hard error in a future release.
20842078
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2085-
[WARNING] invalid character `Ⓑ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2079+
[WARNING] invalid character `Ⓑ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20862080
This was previously accepted but is being phased out; it will become a hard error in a future release.
20872081
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
2088-
[WARNING] invalid character `Ⓒ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters or `+` (numbers, `+`, `-`, `_`, or most letters)
2082+
[WARNING] invalid character `Ⓒ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters)
20892083
This was previously accepted but is being phased out; it will become a hard error in a future release.
20902084
For more information, see issue #8813 <https://github.com/rust-lang/cargo/issues/8813>, and please leave a comment if this will be a problem for your project.
20912085
[CHECKING] foo v0.1.0 [..]

0 commit comments

Comments
 (0)