Match unmatched backticks in comments in compiler/
This commit is contained in:
parent
ff2c609d66
commit
6df5ae4fb0
24 changed files with 28 additions and 25 deletions
|
@ -134,11 +134,11 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
|
|||
// Process the replace ranges, starting from the highest start
|
||||
// position and working our way back. If have tokens like:
|
||||
//
|
||||
// `#[cfg(FALSE)]` struct Foo { #[cfg(FALSE)] field: bool }`
|
||||
// `#[cfg(FALSE)] struct Foo { #[cfg(FALSE)] field: bool }`
|
||||
//
|
||||
// Then we will generate replace ranges for both
|
||||
// the `#[cfg(FALSE)] field: bool` and the entire
|
||||
// `#[cfg(FALSE)]` struct Foo { #[cfg(FALSE)] field: bool }`
|
||||
// `#[cfg(FALSE)] struct Foo { #[cfg(FALSE)] field: bool }`
|
||||
//
|
||||
// By starting processing from the replace range with the greatest
|
||||
// start position, we ensure that any replace range which encloses
|
||||
|
|
|
@ -335,7 +335,7 @@ impl TokenCursor {
|
|||
num_of_hashes = cmp::max(num_of_hashes, count);
|
||||
}
|
||||
|
||||
// `/// foo` becomes `doc = r"foo".
|
||||
// `/// foo` becomes `doc = r"foo"`.
|
||||
let delim_span = DelimSpan::from_single(span);
|
||||
let body = TokenTree::Delimited(
|
||||
delim_span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue