File tree Expand file tree Collapse file tree 6 files changed +23
-16
lines changed Expand file tree Collapse file tree 6 files changed +23
-16
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 ( "rustdoc flags are passed via `RUSTDOCFLAGS`" ) ?;
243
244
}
244
245
}
245
246
}
Original file line number Diff line number Diff line change @@ -846,8 +846,8 @@ 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.
850
- // For now we only try the canonical lysing `-` to `_` and vice versa.
849
+ // have enough information to offer "a similar crate exists " suggestions.
850
+ // For now we only try canonicalizing `-` to `_` and vice versa.
851
851
// More advanced fuzzy searching become in the future.
852
852
for name_permutation in [
853
853
dep. package_name ( ) . replace ( '-' , "_" ) ,
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 @@ -1851,13 +1851,16 @@ fn warn_if_default_features() {
1851
1851
. file ( "bar/src/lib.rs" , "pub fn bar() {}" )
1852
1852
. build ( ) ;
1853
1853
1854
- p. cargo ( "check" ) . with_stderr_data ( str![ [ r#"
1855
- [WARNING] `default-features = [".."]` was found in [features]. Did you mean to use `default = [".."]`?
1854
+ p. cargo ( "check" )
1855
+ . with_stderr_data ( str![ [ r#"
1856
+ [WARNING] `[features]` defines a feature named `default-features`
1857
+ [NOTE] only a feature named `default` will be enabled by default
1856
1858
[LOCKING] 1 package to latest compatible version
1857
1859
[CHECKING] foo v0.0.1 ([ROOT]/foo)
1858
1860
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1859
1861
1860
- "# ] ] ) . run ( ) ;
1862
+ "# ] ] )
1863
+ . run ( ) ;
1861
1864
}
1862
1865
1863
1866
#[ cargo_test]
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ 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 environment variable `RUSTDOC_FLAGS`
119
+ [NOTE] rustdoc flags are passed via `RUSTDOCFLAGS`
119
120
...
120
121
"# ] ] )
121
122
. 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