diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-02-11 08:28:41 -0800 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-02-19 10:02:51 -0800 |
| commit | e6d84268fa18da997918b37e5b0325bed240939a (patch) | |
| tree | 26c3664b706f201105a937d7cb927fdfb930e81e /src/libsyntax/parse/comments.rs | |
| parent | 9da641bd8c186412813dca899cc8a0eb509122d9 (diff) | |
| download | rust-e6d84268fa18da997918b37e5b0325bed240939a.tar.gz rust-e6d84268fa18da997918b37e5b0325bed240939a.zip | |
Change functions from taking ~str to taking &str
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index d58d894b6a0..e27784d1f6b 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -46,14 +46,14 @@ impl cmp::Eq for cmnt_style { pub type cmnt = {style: cmnt_style, lines: ~[~str], pos: BytePos}; -pub fn is_doc_comment(s: ~str) -> bool { +pub fn is_doc_comment(s: &str) -> bool { (s.starts_with(~"///") && !is_line_non_doc_comment(s)) || s.starts_with(~"//!") || (s.starts_with(~"/**") && !is_block_non_doc_comment(s)) || s.starts_with(~"/*!") } -pub fn doc_comment_style(comment: ~str) -> ast::attr_style { +pub fn doc_comment_style(comment: &str) -> ast::attr_style { assert is_doc_comment(comment); if comment.starts_with(~"//!") || comment.starts_with(~"/*!") { ast::attr_inner @@ -62,7 +62,7 @@ pub fn doc_comment_style(comment: ~str) -> ast::attr_style { } } -pub fn strip_doc_comment_decoration(comment: ~str) -> ~str { +pub fn strip_doc_comment_decoration(comment: &str) -> ~str { /// remove whitespace-only lines from the start/end of lines fn vertical_trim(lines: ~[~str]) -> ~[~str] { |
