Fix missing_doc lint

Some items including traits are exported even when they aren't public,
so the missing_doc lint used to warn for private traits.

Closes #11592