Rollup merge of #67420 - lzutao:_val, r=Centril

use _val to ignore parameter of any::type_name_of_val

mem::drop does the same thing too.
This commit is contained in:
Mazdak Farrokhzad 2019-12-21 19:07:37 +01:00 committed by GitHub
commit 9fa2046ed9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -496,7 +496,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
/// ```
#[unstable(feature = "type_name_of_val", issue = "66359")]
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
pub const fn type_name_of_val<T: ?Sized>(val: &T) -> &'static str {
let _ = val;
pub const fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str {
type_name::<T>()
}