Skip to content

Commit

Permalink
Rollup merge of rust-lang#67420 - lzutao:_val, r=Centril
Browse files Browse the repository at this point in the history
use _val to ignore parameter of any::type_name_of_val

mem::drop does the same thing too.
  • Loading branch information
Centril authored Dec 21, 2019
2 parents ac6dbff + c93198f commit 9fa2046
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libcore/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>()
}

0 comments on commit 9fa2046

Please sign in to comment.