Skip to content

Commit 756e518

Browse files
committed
doc: fix cargo doc warnings
1 parent 0862921 commit 756e518

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version.workspace = true
1414
[[bin]]
1515
name = "tree-sitter"
1616
path = "src/main.rs"
17+
doc = false
1718

1819
[[bench]]
1920
name = "benchmark"

lib/binding_rust/bindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ extern "C" {
164164
pub fn ts_parser_set_language(self_: *mut TSParser, language: *const TSLanguage) -> bool;
165165
}
166166
extern "C" {
167-
#[doc = " Set the ranges of text that the parser should include when parsing.\n\n By default, the parser will always include entire documents. This function\n allows you to parse only a *portion* of a document but still return a syntax\n tree whose ranges match up with the document as a whole. You can also pass\n multiple disjoint ranges.\n\n The second and third parameters specify the location and length of an array\n of ranges. The parser does *not* take ownership of these ranges; it copies\n the data, so it doesn't matter how these ranges are allocated.\n\n If `count` is zero, then the entire document will be parsed. Otherwise,\n the given ranges must be ordered from earliest to latest in the document,\n and they must not overlap. That is, the following must hold for all\n `i` < `count - 1`: ranges[i].end_byte <= ranges[i + 1].start_byte\n\n If this requirement is not satisfied, the operation will fail, the ranges\n will not be assigned, and this function will return `false`. On success,\n this function returns `true`"]
167+
#[doc = " Set the ranges of text that the parser should include when parsing.\n\n By default, the parser will always include entire documents. This function\n allows you to parse only a *portion* of a document but still return a syntax\n tree whose ranges match up with the document as a whole. You can also pass\n multiple disjoint ranges.\n\n The second and third parameters specify the location and length of an array\n of ranges. The parser does *not* take ownership of these ranges; it copies\n the data, so it doesn't matter how these ranges are allocated.\n\n If `count` is zero, then the entire document will be parsed. Otherwise,\n the given ranges must be ordered from earliest to latest in the document,\n and they must not overlap. That is, the following must hold for all:\n\n `i < count - 1`: `ranges[i].end_byte <= ranges[i + 1].start_byte`\n\n If this requirement is not satisfied, the operation will fail, the ranges\n will not be assigned, and this function will return `false`. On success,\n this function returns `true`"]
168168
pub fn ts_parser_set_included_ranges(
169169
self_: *mut TSParser,
170170
ranges: *const TSRange,

lib/include/tree_sitter/api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ bool ts_parser_set_language(TSParser *self, const TSLanguage *language);
192192
*
193193
* If `count` is zero, then the entire document will be parsed. Otherwise,
194194
* the given ranges must be ordered from earliest to latest in the document,
195-
* and they must not overlap. That is, the following must hold for all
196-
* `i` < `count - 1`: ranges[i].end_byte <= ranges[i + 1].start_byte
195+
* and they must not overlap. That is, the following must hold for all:
196+
*
197+
* `i < count - 1`: `ranges[i].end_byte <= ranges[i + 1].start_byte`
197198
*
198199
* If this requirement is not satisfied, the operation will fail, the ranges
199200
* will not be assigned, and this function will return `false`. On success,

0 commit comments

Comments
 (0)