]>
git.proxmox.com Git - rustc.git/blob - src/tools/rust-analyzer/crates/rust-analyzer/src/cli/symbols.rs
1 //! Read Rust code on stdin, print syntax tree on stdout.
4 use crate::cli
::{flags, read_stdin}
;
7 pub fn run(self) -> anyhow
::Result
<()> {
8 let text
= read_stdin()?
;
9 let (analysis
, file_id
) = Analysis
::from_single_file(text
);
10 let structure
= analysis
.file_structure(file_id
).unwrap();