diff options
| author | bors <bors@rust-lang.org> | 2013-03-21 19:39:53 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-21 19:39:53 -0700 |
| commit | 5f2d4102c5dabde915f1f6cb99c38b9274790cda (patch) | |
| tree | ef06cf4055b220ccc73f5dcd6c3c62faf53da292 /src/libsyntax/parse | |
| parent | d8c0da39402818db2d41369826956538ba9672e1 (diff) | |
| parent | 0a47cd5ef183d5a7e763484e211f4b3aed6d72de (diff) | |
| download | rust-5f2d4102c5dabde915f1f6cb99c38b9274790cda.tar.gz rust-5f2d4102c5dabde915f1f6cb99c38b9274790cda.zip | |
auto merge of #5479 : Kimundi/rust/str-dealloc, r=z0w0
This makes the `trim` and `substr` functions return a slice instead of an `~str`, and removes the unnecessary `Trimmable` trait (`StrSlice` already contains the same functionality). Also moves the `ToStr` implementations for the three str types into the str module in anticipation of further untangling.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index b5072e8c2b5..6ebaa42357e 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -109,7 +109,10 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { } if comment.starts_with(~"//") { - return comment.slice(3u, comment.len()).trim(); + // FIXME #5475: + // return comment.slice(3u, comment.len()).trim().to_owned(); + let r = comment.slice(3u, comment.len()); return r.trim().to_owned(); + } if comment.starts_with(~"/*") { |
