Skip to content

Commit

Permalink
docs(rust): properly document optional feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Sep 10, 2024
1 parent c25b635 commit 2c1ccfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ setup.py linguist-generated
Package.swift linguist-generated

bindings/rust/lib.rs -linguist-generated
bindings/rust/parser.rs -linguist-generated
bindings/rust/benchmark.rs -linguist-generated
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ required-features = ["parser"]

[profile.release]
debug = true

[package.metadata.docs.rs]
features = ["parser"]
2 changes: 0 additions & 2 deletions bindings/rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ pub const NODE_TYPES_INLINE: &str =
include_str!("../../tree-sitter-markdown-inline/src/node-types.json");

#[cfg(feature = "parser")]
#[cfg_attr(docsrs, doc(cfg(feature = "parser")))]
mod parser;

#[cfg(feature = "parser")]
#[cfg_attr(docsrs, doc(cfg(feature = "parser")))]
pub use parser::*;

#[cfg(test)]
Expand Down

0 comments on commit 2c1ccfa

Please sign in to comment.