File tree Expand file tree Collapse file tree 7 files changed +18
-14
lines changed Expand file tree Collapse file tree 7 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -230,16 +230,17 @@ pub fn create_bcx<'a, 'gctx>(
230
230
match build_config. intent {
231
231
UserIntent :: Test | UserIntent :: Build | UserIntent :: Check { .. } | UserIntent :: Bench => {
232
232
if ws. gctx ( ) . get_env ( "RUST_FLAGS" ) . is_ok ( ) {
233
- gctx. shell ( ) . warn (
234
- "Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?" ,
235
- ) ?;
233
+ gctx. shell ( )
234
+ . warn ( "ignoring environment variable `RUST_FLAGS`" ) ? ;
235
+ gctx . shell ( ) . note ( "rust flags are passed via `RUSTFLAGS`" ) ?;
236
236
}
237
237
}
238
238
UserIntent :: Doc { .. } | UserIntent :: Doctest => {
239
239
if ws. gctx ( ) . get_env ( "RUSTDOC_FLAGS" ) . is_ok ( ) {
240
- gctx. shell ( ) . warn (
241
- "Cargo does not read `RUSTDOC_FLAGS` environment variable. Did you mean `RUSTDOCFLAGS`?"
242
- ) ?;
240
+ gctx. shell ( )
241
+ . warn ( "ignoring environment variable `RUSTDOC_FLAGS`" ) ?;
242
+ gctx. shell ( )
243
+ . note ( "rust flags are passed via `RUSTDOCFLAGS`" ) ?;
243
244
}
244
245
}
245
246
}
Original file line number Diff line number Diff line change @@ -846,7 +846,7 @@ impl<'gctx> Source for RegistrySource<'gctx> {
846
846
// Attempt to handle misspellings by searching for a chain of related
847
847
// names to the original name. The resolver will later
848
848
// reject any candidates that have the wrong name, and with this it'll
849
- // along the way produce helpful "did you mean? " suggestions.
849
+ // have enough information to offer "a similar crate exists " suggestions.
850
850
// For now we only try the canonical lysing `-` to `_` and vice versa.
851
851
// More advanced fuzzy searching become in the future.
852
852
for name_permutation in [
Original file line number Diff line number Diff line change @@ -1747,8 +1747,8 @@ pub fn to_real_manifest(
1747
1747
1748
1748
if summary. features ( ) . contains_key ( "default-features" ) {
1749
1749
warnings. push (
1750
- "`default-features = [ \" .. \" ]` was found in [features]. \
1751
- Did you mean to use ` default = [ \" .. \" ]`? "
1750
+ "`[features ]` defines a feature named `default-features`
1751
+ note: only a feature named `default` will be enabled by default"
1752
1752
. to_string ( ) ,
1753
1753
)
1754
1754
}
Original file line number Diff line number Diff line change @@ -3594,7 +3594,8 @@ fn wrong_default_feature_name() {
3594
3594
. build ( ) ;
3595
3595
p. cargo ( "check" )
3596
3596
. with_stderr_data ( str![ [ r#"
3597
- [WARNING] `default-features = [".."]` was found in [features]. Did you mean to use `default = [".."]`?
3597
+ [WARNING] `[features]` defines a feature named `default-features`
3598
+ [NOTE] only a feature named `default` will be enabled by default
3598
3599
[CHECKING] foo v1.0.0 ([ROOT]/foo)
3599
3600
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3600
3601
Original file line number Diff line number Diff line change @@ -1852,7 +1852,7 @@ fn warn_if_default_features() {
1852
1852
. build ( ) ;
1853
1853
1854
1854
p. cargo ( "check" ) . with_stderr_data ( str![ [ r#"
1855
- [WARNING] `default-features = [".." ]` was found in [ features]. Did you mean to use `default = [".."]`?
1855
+ [WARNING] `[features ]` defines a feature named `default- features`. Note that only a feature named `default` will be enabled by default.
1856
1856
[LOCKING] 1 package to latest compatible version
1857
1857
[CHECKING] foo v0.0.1 ([ROOT]/foo)
1858
1858
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ fn rustdocflags_misspelled() {
115
115
p. cargo ( "doc" )
116
116
. env ( "RUSTDOC_FLAGS" , "foo" )
117
117
. with_stderr_data ( str![ [ r#"
118
- [WARNING] Cargo does not read `RUSTDOC_FLAGS` environment variable. Did you mean `RUSTDOCFLAGS`?
118
+ [WARNING] Ignoring incorrect environment variable `RUSTDOC_FLAGS`; Rust flags are passed via `RUSTDOCFLAGS`.
119
119
...
120
120
"# ] ] )
121
121
. run ( ) ;
Original file line number Diff line number Diff line change @@ -1443,7 +1443,8 @@ fn env_rustflags_misspelled() {
1443
1443
. env ( "RUST_FLAGS" , "foo" )
1444
1444
. with_stderr_data (
1445
1445
"\
1446
- [WARNING] Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?
1446
+ [WARNING] ignoring environment variable `RUST_FLAGS`
1447
+ [NOTE] rust flags are passed via `RUSTFLAGS`
1447
1448
...
1448
1449
" ,
1449
1450
)
@@ -1471,7 +1472,8 @@ fn env_rustflags_misspelled_build_script() {
1471
1472
p. cargo ( "check" )
1472
1473
. env ( "RUST_FLAGS" , "foo" )
1473
1474
. with_stderr_data ( str![ [ r#"
1474
- [WARNING] Cargo does not read `RUST_FLAGS` environment variable. Did you mean `RUSTFLAGS`?
1475
+ [WARNING] ignoring environment variable `RUST_FLAGS`
1476
+ [NOTE] rust flags are passed via `RUSTFLAGS`
1475
1477
[COMPILING] foo v0.0.1 ([ROOT]/foo)
1476
1478
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1477
1479
You can’t perform that action at this time.
0 commit comments