Merge #2865
2865: fix(mixed): fixed a couple of typos and added a todo r=kjeremy a=Veetaha Fixed a couple of typos and added a todo while studying the codebase. Co-authored-by: Veetaha <gerzoh1@gmail.com>
This commit is contained in:
commit
ea2b27d8b9
@ -1,7 +1,7 @@
|
|||||||
//! This is the actual "grammar" of the Rust language.
|
//! This is the actual "grammar" of the Rust language.
|
||||||
//!
|
//!
|
||||||
//! Each function in this module and its children corresponds
|
//! Each function in this module and its children corresponds
|
||||||
//! to a production of the format grammar. Submodules roughly
|
//! to a production of the formal grammar. Submodules roughly
|
||||||
//! correspond to different *areas* of the grammar. By convention,
|
//! correspond to different *areas* of the grammar. By convention,
|
||||||
//! each submodule starts with `use super::*` import and exports
|
//! each submodule starts with `use super::*` import and exports
|
||||||
//! "public" productions via `pub(super)`.
|
//! "public" productions via `pub(super)`.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//! This module generate AST datatype used by rust-analyzer.
|
//! This module generates AST datatype used by rust-analyzer.
|
||||||
//!
|
//!
|
||||||
//! Specifically, it generates the `SyntaxKind` enum and a number of newtype
|
//! Specifically, it generates the `SyntaxKind` enum and a number of newtype
|
||||||
//! wrappers around `SyntaxNode` which implement `ra_syntax::AstNode`.
|
//! wrappers around `SyntaxNode` which implement `ra_syntax::AstNode`.
|
||||||
|
@ -53,6 +53,7 @@ fn reformat(text: impl std::fmt::Display) -> Result<String> {
|
|||||||
write!(rustfmt.stdin.take().unwrap(), "{}", text)?;
|
write!(rustfmt.stdin.take().unwrap(), "{}", text)?;
|
||||||
let output = rustfmt.wait_with_output()?;
|
let output = rustfmt.wait_with_output()?;
|
||||||
let stdout = String::from_utf8(output.stdout)?;
|
let stdout = String::from_utf8(output.stdout)?;
|
||||||
|
// TODO: update the preable: replace ra_tools with the relevant path
|
||||||
let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`";
|
let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`";
|
||||||
Ok(format!("//! {}\n\n{}", preamble, stdout))
|
Ok(format!("//! {}\n\n{}", preamble, stdout))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user