From 716fc5d1989e6059a6efffee631f239ee3815be7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 28 Jul 2021 18:29:13 -0700 Subject: [PATCH] Recognize std::marker::Trait bound in addition to core::marker::Trait --- src/expand.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/expand.rs b/src/expand.rs index 42e2cd8..3ae9eea 100644 --- a/src/expand.rs +++ b/src/expand.rs @@ -398,7 +398,8 @@ fn has_bound(supertraits: &Supertraits, marker: &Ident) -> bool { if let TypeParamBound::Trait(bound) = bound { if bound.path.is_ident(marker) || bound.path.segments.len() == 3 - && bound.path.segments[0].ident == "core" + && (bound.path.segments[0].ident == "std" + || bound.path.segments[0].ident == "core") && bound.path.segments[1].ident == "marker" && bound.path.segments[2].ident == *marker {