aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/tests/expand.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update ungrammarJonas Schievink2021-06-111-20/+22
|
* Make `TokenTextRange` privateJonas Schievink2021-05-241-3/+2
|
* Merge #8560bors[bot]2021-04-181-2/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8560: Escape characters in doc comments in macros correctly r=jonas-schievink a=ChayimFriedman2 Previously they were escaped twice, both by `.escape_default()` and the debug view of strings (`{:?}`). This leads to things like newlines or tabs in documentation comments being `\\n`, but we unescape literals only once, ending up with `\n`. This was hard to spot because CMark unescaped them (at least for `'` and `"`), but it did not do so in code blocks. This also was the root cause of #7781. This issue was solved by using `.escape_debug()` instead of `.escape_default()`, but the real issue remained. We can bring the `.escape_default()` back by now, however I didn't do it because it is probably slower than `.escape_debug()` (more work to do), and also in order to change the code the least. Example (the keyword and primitive docs are `include!()`d at https://doc.rust-lang.org/src/std/lib.rs.html#570-578, and thus originate from macro): Before: ![image](https://user-images.githubusercontent.com/24700207/115130096-40544300-9ff5-11eb-847b-969e7034e8a4.png) After: ![image](https://user-images.githubusercontent.com/24700207/115130143-9cb76280-9ff5-11eb-9281-323746089440.png) Co-authored-by: Chayim Refael Friedman <[email protected]>
| * Escape characters in doc comments in macros correctlyChayim Refael Friedman2021-04-181-2/+22
| | | | | | | | | | | | | | | | | | Previously they were escaped twice, both by `.escape_default()` and the debug view of strings (`{:?}`). This leads to things like newlines or tabs in documentation comments being `\\n`, but we unescape literals only once, ending up with `\n`. This was hard to spot because CMark unescaped them (at least for `'` and `"`), but it did not do so in code blocks. This also was the root cause of #7781. This issue was solved by using `.escape_debug()` instead of `.escape_default()`, but the real issue remained. We can bring the `.escape_default()` back by now, however I didn't do it because it is probably slower than `.escape_debug()` (more work to do), and also in order to change the code the least.
* | Handle extended key value attr in mbeEdwin Cheng2021-04-171-0/+18
| |
* | Allow `,` to delimit macro 2.0 rulesJonas Schievink2021-04-031-0/+15
|/
* clippy::complexity simplifications related to IteratorsMatthias Krüger2021-03-211-2/+1
|
* Make bare underscore token an Ident rather than Punct in proc-macroKevin Mehall2021-03-201-0/+6
|
* Reorganize mbe testsEdwin Cheng2021-03-181-0/+1872