]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #80337 - jyn514:add-query-desc, r=varkor
authorYuki Okushi <huyuumi.dev@gmail.com>
Wed, 30 Dec 2020 13:49:21 +0000 (22:49 +0900)
committerGitHub <noreply@github.com>
Wed, 30 Dec 2020 13:49:21 +0000 (22:49 +0900)
commit18ac1ecac957000b06b265f9157062abd57009a6
tree9e0690fa3d8256a9207f7373d673cc5a86ed9b6c
parent88b198b727d79c04d35c43feaabaa9e3d1a94f0c
parente67f9d3105ff462d16277cd9a035522117723937
Rollup merge of #80337 - jyn514:add-query-desc, r=varkor

Use `desc` as a doc-comment for queries if there are no doc comments

This at least gives *some* idea of what the query does even if it's not very readable. Some examples:

![image](https://user-images.githubusercontent.com/23638587/103021399-13e15c00-4518-11eb-8121-940774ae2fd1.png)
![image](https://user-images.githubusercontent.com/23638587/103021448-222f7800-4518-11eb-8ee6-cc10795fdc22.png)
![image](https://user-images.githubusercontent.com/23638587/103021434-1d6ac400-4518-11eb-885b-59d00c57bc70.png)

I want to turn `{}` into either `_` or the stringified expr, but [I'm not sure how to do that](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Evaluate.20format.20string.20in.20proc-macro). In the meantime, this is better than having no docs at all.