Skip to content

Commit e500640

Browse files
committed
---
yaml --- r: 63163 b: refs/heads/snap-stage3 c: a64e886 h: refs/heads/master i: 63161: fa61869 63159: ff1b4e2 v: v3
1 parent 090c190 commit e500640

File tree

13 files changed

+105
-136
lines changed

13 files changed

+105
-136
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 017450a6111a430eca86caf4ee6021ed654b552f
4+
refs/heads/snap-stage3: a64e886e3c1dd38473fd7711933557f1b97a9036
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -802,20 +802,15 @@ Use declarations support a number of convenient shortcuts:
802802
An example of `use` declarations:
803803

804804
~~~~
805-
use std::float::sin;
806-
use std::str::{from_chars, contains};
805+
use std::float::{sin, pow};
807806
use std::option::Some;
808807
809808
fn main() {
810-
// Equivalent to 'info!(std::float::sin(1.0));'
811-
info!(sin(1.0));
809+
// Equivalent to 'info!(std::float::pow(std::float::sin(1.0), 2.0));'
810+
info!(pow(sin(1.0), 2.0));
812811
813812
// Equivalent to 'info!(std::option::Some(1.0));'
814813
info!(Some(1.0));
815-
816-
// Equivalent to
817-
// 'info!(std::str::contains(std::str::from_chars(&['f','o','o']), "oo"));'
818-
info!(contains(from_chars(&['f','o','o']), "oo"));
819814
}
820815
~~~~
821816

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<Path> {
169169
}
170170

171171
fn parse_name_directive(line: &str, directive: &str) -> bool {
172-
str::contains(line, directive)
172+
line.contains(directive)
173173
}
174174

175175
fn parse_name_value_directive(line: &str,

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ fn check_error_patterns(props: &TestProps,
309309
let mut next_err_pat = &props.error_patterns[next_err_idx];
310310
let mut done = false;
311311
for ProcRes.stderr.line_iter().advance |line| {
312-
if str::contains(line, *next_err_pat) {
312+
if line.contains(*next_err_pat) {
313313
debug!("found error pattern %s", *next_err_pat);
314314
next_err_idx += 1u;
315315
if next_err_idx == props.error_patterns.len() {
@@ -365,8 +365,8 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
365365
debug!("prefix=%s ee.kind=%s ee.msg=%s line=%s",
366366
prefixes[i], ee.kind, ee.msg, line);
367367
if (str::starts_with(line, prefixes[i]) &&
368-
str::contains(line, ee.kind) &&
369-
str::contains(line, ee.msg)) {
368+
line.contains(ee.kind) &&
369+
line.contains(ee.msg)) {
370370
found_flags[i] = true;
371371
was_expected = true;
372372
break;
@@ -375,7 +375,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
375375
}
376376

377377
// ignore this msg which gets printed at the end
378-
if str::contains(line, "aborting due to") {
378+
if line.contains("aborting due to") {
379379
was_expected = true;
380380
}
381381

branches/snap-stage3/src/libextra/net_tcp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,8 +1597,8 @@ mod test {
15971597
expected_req, actual_req);
15981598
debug!("RESP: expected: '%s' actual: '%s'",
15991599
expected_resp, actual_resp);
1600-
assert!(str::contains(actual_req, expected_req));
1601-
assert!(str::contains(actual_resp, expected_resp));
1600+
assert!(actual_req.contains(expected_req));
1601+
assert!(actual_resp.contains(expected_resp));
16021602
}
16031603
pub fn impl_gl_tcp_ipv4_get_peer_addr() {
16041604
let hl_loop = &uv::global_loop::get();
@@ -1765,8 +1765,8 @@ mod test {
17651765
expected_req, actual_req);
17661766
debug!("RESP: expected: '%s' actual: '%s'",
17671767
expected_resp, actual_resp);
1768-
assert!(str::contains(actual_req, expected_req));
1769-
assert!(str::contains(actual_resp, expected_resp));
1768+
assert!(actual_req.contains(expected_req));
1769+
assert!(actual_resp.contains(expected_resp));
17701770
}
17711771
17721772
pub fn impl_tcp_socket_impl_reader_handles_eof() {

branches/snap-stage3/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ pub fn filter_tests(
514514
515515
fn filter_fn(test: TestDescAndFn, filter_str: &str) ->
516516
Option<TestDescAndFn> {
517-
if str::contains(test.desc.name.to_str(), filter_str) {
517+
if test.desc.name.to_str().contains(filter_str) {
518518
return option::Some(test);
519519
} else { return option::None; }
520520
}

branches/snap-stage3/src/libextra/uv_ll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ mod test {
14801480
14811481
let server_kill_msg = copy (*client_data).server_kill_msg;
14821482
let write_req = (*client_data).server_write_req;
1483-
if str::contains(request_str, server_kill_msg) {
1483+
if request_str.contains(server_kill_msg) {
14841484
debug!(~"SERVER: client req contains kill_msg!");
14851485
debug!(~"SERVER: sending response to client");
14861486
read_stop(client_stream_ptr);
@@ -1753,8 +1753,8 @@ mod test {
17531753
let msg_from_client = server_port.recv();
17541754
let msg_from_server = client_port.recv();
17551755
1756-
assert!(str::contains(msg_from_client, kill_server_msg));
1757-
assert!(str::contains(msg_from_server, server_resp_msg));
1756+
assert!(msg_from_client.contains(kill_server_msg));
1757+
assert!(msg_from_server.contains(server_resp_msg));
17581758
}
17591759
17601760
// FIXME don't run on fbsd or linux 32 bit(#2064)

branches/snap-stage3/src/libfuzzer/fuzzer.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn write_file(filename: &Path, content: &str) {
5757
}
5858

5959
pub fn contains(haystack: &str, needle: &str) -> bool {
60-
str::contains(haystack, needle)
60+
haystack.contains(needle)
6161
}
6262

6363
pub fn find_rust_files(files: &mut ~[Path], path: &Path) {

branches/snap-stage3/src/librustc/driver/driver.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -465,33 +465,33 @@ pub fn pretty_print_input(sess: Session, cfg: ast::crate_cfg, input: &input,
465465
}
466466
467467
pub fn get_os(triple: &str) -> Option<session::os> {
468-
if str::contains(triple, "win32") ||
469-
str::contains(triple, "mingw32") {
468+
if triple.contains("win32") ||
469+
triple.contains("mingw32") {
470470
Some(session::os_win32)
471-
} else if str::contains(triple, "darwin") {
471+
} else if triple.contains("darwin") {
472472
Some(session::os_macos)
473-
} else if str::contains(triple, "android") {
473+
} else if triple.contains("android") {
474474
Some(session::os_android)
475-
} else if str::contains(triple, "linux") {
475+
} else if triple.contains("linux") {
476476
Some(session::os_linux)
477-
} else if str::contains(triple, "freebsd") {
477+
} else if triple.contains("freebsd") {
478478
Some(session::os_freebsd)
479479
} else { None }
480480
}
481481

482482
pub fn get_arch(triple: &str) -> Option<abi::Architecture> {
483-
if str::contains(triple, "i386") ||
484-
str::contains(triple, "i486") ||
485-
str::contains(triple, "i586") ||
486-
str::contains(triple, "i686") ||
487-
str::contains(triple, "i786") {
483+
if triple.contains("i386") ||
484+
triple.contains("i486") ||
485+
triple.contains("i586") ||
486+
triple.contains("i686") ||
487+
triple.contains("i786") {
488488
Some(abi::X86)
489-
} else if str::contains(triple, "x86_64") {
489+
} else if triple.contains("x86_64") {
490490
Some(abi::X86_64)
491-
} else if str::contains(triple, "arm") ||
492-
str::contains(triple, "xscale") {
491+
} else if triple.contains("arm") ||
492+
triple.contains("xscale") {
493493
Some(abi::Arm)
494-
} else if str::contains(triple, "mips") {
494+
} else if triple.contains("mips") {
495495
Some(abi::Mips)
496496
} else { None }
497497
}

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3099,7 +3099,7 @@ impl Resolver {
30993099
let import_count = imports.len();
31003100
if index != import_count {
31013101
let sn = self.session.codemap.span_to_snippet(imports[index].span);
3102-
if str::contains(sn, "::") {
3102+
if sn.contains("::") {
31033103
self.session.span_err(imports[index].span, "unresolved import");
31043104
} else {
31053105
let err = fmt!("unresolved import (maybe you meant `%s::*`?)",

0 commit comments

Comments
 (0)