From cec1877e180393eba0f6ddb0cf97bf3a791631c7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:42 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/derivative/src/paths.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 vendor/derivative/src/paths.rs (limited to 'vendor/derivative/src/paths.rs') diff --git a/vendor/derivative/src/paths.rs b/vendor/derivative/src/paths.rs new file mode 100644 index 000000000..7a6ec7de3 --- /dev/null +++ b/vendor/derivative/src/paths.rs @@ -0,0 +1,10 @@ +//! Contains some standard paths. + +/// Return the path of the `discriminant` function, that is `::std::mem::discriminant`. +pub fn discriminant_path() -> syn::Path { + if cfg!(feature = "use_core") { + parse_quote!(::core::mem::discriminant) + } else { + parse_quote!(::std::mem::discriminant) + } +} \ No newline at end of file -- cgit v1.2.3