Skip to content

Lint unnecessary doc(hidden) attribute #657

Open

Description

Lint against marking things that wouldn't show up in the documentation anyway doc(hidden).

Examples are:

  • Private items.

    #[doc(hidden)]
    fn foo() { }
  • Implementing private traits (example lifted from rust-sfml)

          // Wrappable is a private trait that doesn't show up in documentation,
          // so neither will implementations.
      #[doc(hidden)]
      impl Wrappable<*mut ffi::sfConvexShape> for ConvexShape {
          #[doc(hidden)]
          fn wrap(convex_shape: *mut ffi::sfConvexShape) -> ConvexShape {
              ConvexShape {
                  convex_shape: convex_shape.clone(),
                  texture: None
              }
          }
    
          #[doc(hidden)]
          fn unwrap(&self) -> *mut ffi::sfConvexShape {
              self.convex_shape
          }
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-ASTType: Requires working with the AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions