Auto merge of #106268 - kraktus:patch-2, r=Nilstrieb

fix comment for `TokenCursor::desugar`

the hashes of the text were forgotten.
This commit is contained in:
bors 2022-12-30 06:59:13 +00:00
commit e5e5fcb0b7

View File

@ -317,7 +317,7 @@ fn desugar(&mut self, attr_style: AttrStyle, data: Symbol, span: Span) -> (Token
// required to wrap the text. E.g. // required to wrap the text. E.g.
// - `abc d` is wrapped as `r"abc d"` (num_of_hashes = 0) // - `abc d` is wrapped as `r"abc d"` (num_of_hashes = 0)
// - `abc "d"` is wrapped as `r#"abc "d""#` (num_of_hashes = 1) // - `abc "d"` is wrapped as `r#"abc "d""#` (num_of_hashes = 1)
// - `abc "##d##"` is wrapped as `r###"abc "d""###` (num_of_hashes = 3) // - `abc "##d##"` is wrapped as `r###"abc ##"d"##"###` (num_of_hashes = 3)
let mut num_of_hashes = 0; let mut num_of_hashes = 0;
let mut count = 0; let mut count = 0;
for ch in data.as_str().chars() { for ch in data.as_str().chars() {