Skip to content

Commit

Permalink
Recognize std::marker::Trait bound in addition to core::marker::Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 29, 2021
1 parent e2cd044 commit 716fc5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 716fc5d

Please sign in to comment.