Skip to content

Commit

Permalink
Merge pull request #173 from dtolnay/stdbound
Browse files Browse the repository at this point in the history
Recognize std::marker::Trait bound in addition to core::marker::Trait
  • Loading branch information
dtolnay committed Jul 29, 2021
2 parents e2cd044 + 716fc5d commit e5364be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/expand.rs
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 e5364be

Please sign in to comment.