Fix a bug in exporting trait implementations

I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.
auto merge of #10788 : alexcrichton/rust/fixes, r=pcwalton

I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.