X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=Design.md;h=ccfc7227e75331b70e833a5c0f4291bae9e581c5;hb=5f02be6294cdef448366297065a26c268249f40b;hp=43caa7b81f80114aa7ac7e9b7728f58bf8dfecd5;hpb=068b8b3b5c92c20d5347a30a221e53d9f63a8704;p=rust.git diff --git a/Design.md b/Design.md index 43caa7b81f8..ccfc7227e75 100644 --- a/Design.md +++ b/Design.md @@ -116,7 +116,7 @@ until they are ready, and the 'do no harm' principle (see next section). ### First, do no harm -Until rustfmt it perfect, there will always be a trade-off between doing more and +Until rustfmt is perfect, there will always be a trade-off between doing more and doing existing things well. I want to err on the side of the latter. Specifically, rustfmt should never take OK code and make it look worse. If we can't make it better, we should leave it as is. That might mean being less @@ -151,10 +151,10 @@ for its configuration. Our visitor keeps track of the desired current indent due to blocks ( `block_indent`). Each `visit_*` method reformats code according to this indent, `config.comment_width()` and `config.max_width()`. Most reformatting done in the -`visit_*` methods is a bit hackey and is meant to be temporary until it can be +`visit_*` methods is a bit hacky and is meant to be temporary until it can be done properly. -There are a bunch of methods called `rewrite_*`. There do the bulk of the +There are a bunch of methods called `rewrite_*`. They do the bulk of the reformatting. These take the AST node to be reformatted (this may not literally be an AST node from syntex_syntax: there might be multiple parameters describing a logical node), the current indent, and the current width budget.