Auto merge of #5146 - lzutao:rustup, r=flip1995

Rustup https://github.com/rust-lang/rust/pull/67359

cc https://github.com/rust-lang/rust/pull/67359

changelog: none
This commit is contained in:
bors 2020-02-07 08:28:41 +00:00
commit 550affd763
18 changed files with 51 additions and 13 deletions

View File

@ -6,6 +6,7 @@ LL | assert!(true);
| |
= note: `-D clippy::assertions-on-constants` implied by `-D warnings` = note: `-D clippy::assertions-on-constants` implied by `-D warnings`
= help: remove it = help: remove it
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(false)` should probably be replaced error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:10:5 --> $DIR/assertions_on_constants.rs:10:5
@ -14,6 +15,7 @@ LL | assert!(false);
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
| |
= help: use `panic!()` or `unreachable!()` = help: use `panic!()` or `unreachable!()`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(true)` will be optimized out by the compiler error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:11:5 --> $DIR/assertions_on_constants.rs:11:5
@ -22,6 +24,7 @@ LL | assert!(true, "true message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
= help: remove it = help: remove it
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(false, "false message")` should probably be replaced error: `assert!(false, "false message")` should probably be replaced
--> $DIR/assertions_on_constants.rs:12:5 --> $DIR/assertions_on_constants.rs:12:5
@ -30,6 +33,7 @@ LL | assert!(false, "false message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
= help: use `panic!("false message")` or `unreachable!("false message")` = help: use `panic!("false message")` or `unreachable!("false message")`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(false, msg.to_uppercase())` should probably be replaced error: `assert!(false, msg.to_uppercase())` should probably be replaced
--> $DIR/assertions_on_constants.rs:15:5 --> $DIR/assertions_on_constants.rs:15:5
@ -38,6 +42,7 @@ LL | assert!(false, msg.to_uppercase());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
= help: use `panic!(msg.to_uppercase())` or `unreachable!(msg.to_uppercase())` = help: use `panic!(msg.to_uppercase())` or `unreachable!(msg.to_uppercase())`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(true)` will be optimized out by the compiler error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:18:5 --> $DIR/assertions_on_constants.rs:18:5
@ -46,6 +51,7 @@ LL | assert!(B);
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| |
= help: remove it = help: remove it
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(false)` should probably be replaced error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:21:5 --> $DIR/assertions_on_constants.rs:21:5
@ -54,6 +60,7 @@ LL | assert!(C);
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| |
= help: use `panic!()` or `unreachable!()` = help: use `panic!()` or `unreachable!()`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert!(false, "C message")` should probably be replaced error: `assert!(false, "C message")` should probably be replaced
--> $DIR/assertions_on_constants.rs:22:5 --> $DIR/assertions_on_constants.rs:22:5
@ -62,6 +69,7 @@ LL | assert!(C, "C message");
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^
| |
= help: use `panic!("C message")` or `unreachable!("C message")` = help: use `panic!("C message")` or `unreachable!("C message")`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `debug_assert!(true)` will be optimized out by the compiler error: `debug_assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:24:5 --> $DIR/assertions_on_constants.rs:24:5
@ -70,7 +78,7 @@ LL | debug_assert!(true);
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
| |
= help: remove it = help: remove it
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 9 previous errors error: aborting due to 9 previous errors

View File

@ -54,6 +54,8 @@ LL | $a.unwrap(); // unnecessary
... ...
LL | m!(x); LL | m!(x);
| ------ in this macro invocation | ------ in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`. error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
--> $DIR/simple_conditionals.rs:27:9 --> $DIR/simple_conditionals.rs:27:9

View File

@ -11,6 +11,7 @@ LL | test_hash!(&a, A => 0, B => 1, C => 2);
| --------------------------------------- in this macro invocation | --------------------------------------- in this macro invocation
| |
= note: `-D clippy::match-ref-pats` implied by `-D warnings` = note: `-D clippy::match-ref-pats` implied by `-D warnings`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error error: aborting due to previous error

View File

@ -32,6 +32,8 @@ LL | const $name: $ty = $e;
... ...
LL | declare_const!(_ONCE: Once = Once::new()); //~ ERROR interior mutable LL | declare_const!(_ONCE: Once = Once::new()); //~ ERROR interior mutable
| ------------------------------------------ in this macro invocation | ------------------------------------------ in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: a `const` item should never be interior mutable error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:40:5 --> $DIR/declare_interior_mutable_const.rs:40:5
@ -71,6 +73,8 @@ LL | const $name: $ty = $e;
... ...
LL | declare_const!(ANOTHER_INPUT: T = Self::INPUT); //~ ERROR interior mutable LL | declare_const!(ANOTHER_INPUT: T = Self::INPUT); //~ ERROR interior mutable
| ----------------------------------------------- in this macro invocation | ----------------------------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: a `const` item should never be interior mutable error: a `const` item should never be interior mutable
--> $DIR/declare_interior_mutable_const.rs:60:5 --> $DIR/declare_interior_mutable_const.rs:60:5

View File

@ -15,7 +15,7 @@ note: the lint level is defined here
LL | #![deny(clippy::internal)] LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::default_lint)]` implied by `#[deny(clippy::internal)]` = note: `#[deny(clippy::default_lint)]` implied by `#[deny(clippy::internal)]`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error error: aborting due to previous error

View File

@ -14,6 +14,7 @@ LL | | true
LL | | } LL | | }
LL | | } LL | | }
| |_^ | |_^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: you are deriving `Hash` but have implemented `PartialEq` explicitly error: you are deriving `Hash` but have implemented `PartialEq` explicitly
--> $DIR/derive_hash_xor_eq.rs:19:10 --> $DIR/derive_hash_xor_eq.rs:19:10
@ -30,6 +31,7 @@ LL | | true
LL | | } LL | | }
LL | | } LL | | }
| |_^ | |_^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: you are implementing `Hash` explicitly but have derived `PartialEq` error: you are implementing `Hash` explicitly but have derived `PartialEq`
--> $DIR/derive_hash_xor_eq.rs:31:1 --> $DIR/derive_hash_xor_eq.rs:31:1
@ -44,6 +46,7 @@ note: `PartialEq` implemented here
| |
LL | #[derive(PartialEq)] LL | #[derive(PartialEq)]
| ^^^^^^^^^ | ^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: you are implementing `Hash` explicitly but have derived `PartialEq` error: you are implementing `Hash` explicitly but have derived `PartialEq`
--> $DIR/derive_hash_xor_eq.rs:49:5 --> $DIR/derive_hash_xor_eq.rs:49:5
@ -58,6 +61,7 @@ note: `PartialEq` implemented here
| |
LL | #[derive(PartialEq)] LL | #[derive(PartialEq)]
| ^^^^^^^^^ | ^^^^^^^^^
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

@ -40,6 +40,8 @@ LL | | }
... ...
LL | very_unsafe!(); LL | very_unsafe!();
| --------------- in this macro invocation | --------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 5 previous errors error: aborting due to 5 previous errors

View File

@ -38,7 +38,7 @@ note: potential failure(s)
| |
LL | panic!(); LL | panic!();
| ^^^^^^^^^ | ^^^^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: consider implementing `TryFrom` instead error: consider implementing `TryFrom` instead
--> $DIR/fallible_impl_from.rs:35:1 --> $DIR/fallible_impl_from.rs:35:1
@ -65,7 +65,7 @@ LL | } else if s.parse::<u32>().unwrap() != 42 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | panic!("{:?}", s); LL | panic!("{:?}", s);
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: consider implementing `TryFrom` instead error: consider implementing `TryFrom` instead
--> $DIR/fallible_impl_from.rs:53:1 --> $DIR/fallible_impl_from.rs:53:1
@ -87,7 +87,7 @@ LL | if s.parse::<u32>().ok().unwrap() != 42 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | panic!("{:?}", s); LL | panic!("{:?}", s);
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

@ -105,6 +105,7 @@ LL | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
LL | gen!(impl); LL | gen!(impl);
| ----------- in this macro invocation | ----------- in this macro invocation
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider adding a type parameter help: consider adding a type parameter
| |
LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> { LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
@ -123,6 +124,7 @@ LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>)
LL | gen!(fn bar); LL | gen!(fn bar);
| ------------- in this macro invocation | ------------- in this macro invocation
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider adding a type parameter help: consider adding a type parameter
| |
LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {} LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
@ -137,6 +139,7 @@ LL | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>)
LL | gen!(fn bar); LL | gen!(fn bar);
| ------------- in this macro invocation | ------------- in this macro invocation
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider adding a type parameter help: consider adding a type parameter
| |
LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {} LL | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}

View File

@ -15,7 +15,7 @@ note: the lint level is defined here
LL | #![deny(clippy::internal)] LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::lint_without_lint_pass)]` implied by `#[deny(clippy::internal)]` = note: `#[deny(clippy::lint_without_lint_pass)]` implied by `#[deny(clippy::internal)]`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error error: aborting due to previous error

View File

@ -121,7 +121,7 @@ help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
| |
LL | (Ok(x), Some(_)) => println!("ok {}", x), LL | (Ok(x), Some(_)) => println!("ok {}", x),
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this `match` has identical arm bodies error: this `match` has identical arm bodies
--> $DIR/match_same_arms2.rs:117:18 --> $DIR/match_same_arms2.rs:117:18
@ -139,7 +139,7 @@ help: consider refactoring into `Ok(3) | Ok(_)`
| |
LL | Ok(3) => println!("ok"), LL | Ok(3) => println!("ok"),
| ^^^^^ | ^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 7 previous errors error: aborting due to 7 previous errors

View File

@ -71,6 +71,8 @@ LL | mem_discriminant_but_in_a_macro!(&rro);
| | | | | |
| | help: try dereferencing: `*rro` | | help: try dereferencing: `*rro`
| in this macro invocation | in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: calling `mem::discriminant` on non-enum type `&&&&&std::option::Option<i32>` error: calling `mem::discriminant` on non-enum type `&&&&&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:34:5 --> $DIR/mem_discriminant.rs:34:5

View File

@ -8,6 +8,7 @@ LL | take!(s);
| --------- in this macro invocation | --------- in this macro invocation
| |
= note: `-D clippy::mem-replace-with-default` implied by `-D warnings` = note: `-D clippy::mem-replace-with-default` implied by `-D warnings`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error error: aborting due to previous error

View File

@ -20,6 +20,8 @@ LL | &mut $p
... ...
LL | let mut z = mut_ptr!(&mut 3u32); LL | let mut z = mut_ptr!(&mut 3u32);
| ------------------- in this macro invocation | ------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: this expression mutably borrows a mutable reference. Consider reborrowing error: this expression mutably borrows a mutable reference. Consider reborrowing
--> $DIR/mut_mut.rs:22:21 --> $DIR/mut_mut.rs:22:21

View File

@ -34,7 +34,7 @@ LL | | }
LL | | ); LL | | );
| |______^ | |______^
| |
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `debug_assert_eq` of unit values detected. This will always succeed error: `debug_assert_eq` of unit values detected. This will always succeed
--> $DIR/unit_cmp.rs:32:5 --> $DIR/unit_cmp.rs:32:5
@ -48,7 +48,7 @@ LL | | }
LL | | ); LL | | );
| |______^ | |______^
| |
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `assert_ne` of unit values detected. This will always fail error: `assert_ne` of unit values detected. This will always fail
--> $DIR/unit_cmp.rs:41:5 --> $DIR/unit_cmp.rs:41:5
@ -62,7 +62,7 @@ LL | | }
LL | | ); LL | | );
| |______^ | |______^
| |
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: `debug_assert_ne` of unit values detected. This will always fail error: `debug_assert_ne` of unit values detected. This will always fail
--> $DIR/unit_cmp.rs:49:5 --> $DIR/unit_cmp.rs:49:5
@ -76,7 +76,7 @@ LL | | }
LL | | ); LL | | );
| |______^ | |______^
| |
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 6 previous errors error: aborting due to 6 previous errors

View File

@ -50,6 +50,8 @@ LL | 42usize
... ...
LL | let _ = lit_from_macro!(); LL | let _ = lit_from_macro!();
| ----------------- in this macro invocation | ----------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: integer type suffix should be separated by an underscore error: integer type suffix should be separated by an underscore
--> $DIR/unseparated_prefix_literals.rs:40:16 --> $DIR/unseparated_prefix_literals.rs:40:16

View File

@ -12,7 +12,10 @@ if [[ "$1" == "--help" || "$1" == "-h" ]]; then
echo "usage: $0" echo "usage: $0"
fi fi
BUILD_DIR=$PWD/target/debug/test_build_base CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-$PWD/target}
PROFILE=${PROFILE:-debug}
BUILD_DIR=${CARGO_TARGET_DIR}/${PROFILE}/test_build_base
MY_DIR=$(dirname "$0") MY_DIR=$(dirname "$0")
cd "$MY_DIR" || exit cd "$MY_DIR" || exit
find . -name '*.rs' -exec ./update-references.sh "$BUILD_DIR" {} + find . -name '*.rs' -exec ./update-references.sh "$BUILD_DIR" {} +

View File

@ -56,6 +56,8 @@ LL | fn new() -> Foo {
... ...
LL | use_self_expand!(); // Should lint in local macros LL | use_self_expand!(); // Should lint in local macros
| ------------------- in this macro invocation | ------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: unnecessary structure name repetition error: unnecessary structure name repetition
--> $DIR/use_self.rs:113:17 --> $DIR/use_self.rs:113:17
@ -65,6 +67,8 @@ LL | Foo {}
... ...
LL | use_self_expand!(); // Should lint in local macros LL | use_self_expand!(); // Should lint in local macros
| ------------------- in this macro invocation | ------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: unnecessary structure name repetition error: unnecessary structure name repetition
--> $DIR/use_self.rs:148:21 --> $DIR/use_self.rs:148:21