Add a comment line.
(&mut self, s: impl AsRef<str>)
| 162 | |
| 163 | /// Add a comment line. |
| 164 | pub fn comment(&mut self, s: impl AsRef<str>) { |
| 165 | // Avoid `fmtln!` here: we don't want to append a location comment to a |
| 166 | // comment. |
| 167 | self.line(format!("{} {}", self.lang.comment_token(), s.as_ref())); |
| 168 | } |
| 169 | |
| 170 | /// Add a (multi-line) documentation comment. |
| 171 | pub fn doc_comment(&mut self, contents: impl AsRef<str>) { |