Skip to content

cobward/doc_cfg_attr_issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Issue with doc_cfg and cfg_attr.

When conditionally deriving a trait using cfg_attr, the feature gate is not documented.

(present in 1.66.0-nightly)

To reproduce:

  • Build the documentation of this project with cargo +nightly doc --all-features --open.
  • View the documentation for the struct Test.
  • Debug should be documentated as only active with the debug feature flag set.

Example:

#![feature(doc_auto_cfg)]

#[derive(Default)]
#[cfg_attr(feature = "debug", derive(Debug))]
pub struct Test();

example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages