Skip to content

Commit 0a280bc

Browse files
committed
---
yaml --- r: 53239 b: refs/heads/dist-snap c: e6d8426 h: refs/heads/master i: 53237: 47a5b38 53235: 00665e5 53231: 436a549 v: v3
1 parent 460b49a commit 0a280bc

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 9da641bd8c186412813dca899cc8a0eb509122d9
10+
refs/heads/dist-snap: e6d84268fa18da997918b37e5b0325bed240939a
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/back/link.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,12 @@ pub fn build_link_meta(sess: Session, c: &ast::crate, output: &Path,
487487
fn crate_meta_extras_hash(symbol_hasher: &hash::State,
488488
-cmh_items: ~[@ast::meta_item],
489489
dep_hashes: ~[~str]) -> @str {
490-
fn len_and_str(s: ~str) -> ~str {
491-
return fmt!("%u_%s", str::len(s), s);
490+
fn len_and_str(s: &str) -> ~str {
491+
fmt!("%u_%s", s.len(), s)
492492
}
493493

494494
fn len_and_str_lit(l: ast::lit) -> ~str {
495-
return len_and_str(pprust::lit_to_str(@l));
495+
len_and_str(pprust::lit_to_str(@l))
496496
}
497497

498498
let cmh_items = attr::sort_meta_items(cmh_items);
@@ -615,7 +615,7 @@ pub fn get_symbol_hash(ccx: @crate_ctxt, t: ty::t) -> @str {
615615
616616
// Name sanitation. LLVM will happily accept identifiers with weird names, but
617617
// gas doesn't!
618-
pub fn sanitize(s: ~str) -> ~str {
618+
pub fn sanitize(s: &str) -> ~str {
619619
let mut result = ~"";
620620
for str::chars_each(s) |c| {
621621
match c {
@@ -629,10 +629,10 @@ pub fn sanitize(s: ~str) -> ~str {
629629
'a' .. 'z'
630630
| 'A' .. 'Z'
631631
| '0' .. '9'
632-
| '_' => str::push_char(&mut result, c),
632+
| '_' => result.push_char(c),
633633
_ => {
634634
if c > 'z' && char::is_XID_continue(c) {
635-
str::push_char(&mut result, c);
635+
result.push_char(c);
636636
}
637637
}
638638
}

branches/dist-snap/src/libsyntax/parse/comments.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ impl cmp::Eq for cmnt_style {
4646

4747
pub type cmnt = {style: cmnt_style, lines: ~[~str], pos: BytePos};
4848

49-
pub fn is_doc_comment(s: ~str) -> bool {
49+
pub fn is_doc_comment(s: &str) -> bool {
5050
(s.starts_with(~"///") && !is_line_non_doc_comment(s)) ||
5151
s.starts_with(~"//!") ||
5252
(s.starts_with(~"/**") && !is_block_non_doc_comment(s)) ||
5353
s.starts_with(~"/*!")
5454
}
5555
56-
pub fn doc_comment_style(comment: ~str) -> ast::attr_style {
56+
pub fn doc_comment_style(comment: &str) -> ast::attr_style {
5757
assert is_doc_comment(comment);
5858
if comment.starts_with(~"//!") || comment.starts_with(~"/*!") {
5959
ast::attr_inner
@@ -62,7 +62,7 @@ pub fn doc_comment_style(comment: ~str) -> ast::attr_style {
6262
}
6363
}
6464
65-
pub fn strip_doc_comment_decoration(comment: ~str) -> ~str {
65+
pub fn strip_doc_comment_decoration(comment: &str) -> ~str {
6666
6767
/// remove whitespace-only lines from the start/end of lines
6868
fn vertical_trim(lines: ~[~str]) -> ~[~str] {

0 commit comments

Comments
 (0)