Skip to content

Commit

Permalink
use _val to ignore parameter of any::type_name_of_val
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Dec 21, 2019
1 parent c605199 commit c93198f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libcore/any.rs
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 c93198f

Please sign in to comment.