derivative/
paths.rs

1//! Contains some standard paths.
2
3/// Return the path of the `discriminant` function, that is `::std::mem::discriminant`.
4pub fn discriminant_path() -> syn::Path {
5    if cfg!(feature = "use_core") {
6        parse_quote!(::core::mem::discriminant)
7    } else {
8        parse_quote!(::std::mem::discriminant)
9    }
10}