mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
migrate ra_cli to the new rowan
This commit is contained in:
parent
f1abc7bdc6
commit
cf932181cf
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ use clap::{App, Arg, SubCommand};
|
||||||
use flexi_logger::Logger;
|
use flexi_logger::Logger;
|
||||||
use ra_ide_api::{file_structure, Analysis};
|
use ra_ide_api::{file_structure, Analysis};
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::{AstNode, SourceFile, TreeArc};
|
use ra_syntax::{AstNode, SourceFile};
|
||||||
|
|
||||||
type Result<T> = std::result::Result<T, Box<dyn Error + Send + Sync>>;
|
type Result<T> = std::result::Result<T, Box<dyn Error + Send + Sync>>;
|
||||||
|
|
||||||
|
@ -100,9 +100,9 @@ fn main() -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn file() -> Result<TreeArc<SourceFile>> {
|
fn file() -> Result<SourceFile> {
|
||||||
let text = read_stdin()?;
|
let text = read_stdin()?;
|
||||||
Ok(SourceFile::parse(&text).tree().to_owned())
|
Ok(SourceFile::parse(&text).tree())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_stdin() -> Result<String> {
|
fn read_stdin() -> Result<String> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue