pub fn ensure_pub_visibility(
name: &str,
parent_span: Span,
vis: &Visibility,
) -> Result<(), Error>Expand description
Ensures that the given visibility is pub and otherwise returns an appropriate error.
ยงNote
The name parameter is given to improve the resulting error message. It denotes the
entity which cannot have non-public visibility.