the command 'cargo build --no-default-features --features borsh' failed with:
error[E0599]: no function or associated item named 'other' found for struct 'borsh::io::Error' in the current scope
--> lib/smol_str/src/borsh.rs:33:39
|
33 | .ok_or_else(|| Error::other("u8::vec_from_reader unexpectedly returned None"))?;
| ^^^^^ function or associated item not found in 'borsh::io::Error'
|
rust-analyzer has handy prebuilt `cargo doc` output at
https://rust-lang.github.io/rust-analyzer/ide/
However, it doesn't include private definitions, which makes it less
useful when trying to learn unfamiliar parts of the codebase.
Instead, pass `--document-private-items` so the HTML includes
information on private types and modules too. rustdoc renders these
with a padlock icon, so it's still clear that they're private.
This change also exposes some more rustdoc warnings, which I've fixed.
I missed a ["__0"] to access the str in the Static case.
Also, simplify the code to rely on the pretty printer for str
rather than accessing data_ptr/length directly. This makes it
more robust against changes in str.
Output before: "<SmolStr Static error: There is no member named data_ptr.>"
Output after: "preferred-width"
Auto-loaded via the debugger_visualizer attribute.
Tested on smolstr's unittest:
$ RUSTFLAGS="-C debuginfo=2 -C opt-level=0" cargo test -p smol_str --no-run
$ rust-gdb target/debug/deps/test-a806b111557a7133
(gdb) break test::conversions
(gdb) run
(gdb) next
(gdb) print s
(and other locations in that file, to test the three cases: Inline,
Static and Heap)
* `examples/minimal_lsp.rs` – compact LSP server showing definition,
completion, hover, rustfmt-based formatting, and dummy diagnostics.
Advertises UTF-8 offset encoding.
* `examples/manual_test.sh` – FIFO script that streams the canonical
nine LSP packets so anyone can validate the server from two terminals.
No new runtime deps; `anyhow` stays under [dev-dependencies].