summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-24 14:50:46 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-24 14:50:46 -0700
commita1d2e62c1f94930aaab2f9d56b3ee4f34f95369a (patch)
tree3ed0a12ba754e76dc1af00f6a22e34a9cfd1bd88 /src/libcore/str
parent6da0b9dedbc975c3d9ae973216745de9dab535d2 (diff)
parent7e3ee02006ec53ff176fc3490ba01eb2a9c823b8 (diff)
downloadrust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.tar.gz
rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.zip
rollup merge of #23630: nrc/coerce-tidy
See notes on the first commit

Closes #18601

r? @nikomatsakis

cc @eddyb
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 7197649a0ea..36c3eb33c77 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -261,7 +261,7 @@ pub unsafe fn from_utf8_unchecked<'a>(v: &'a [u8]) -> &'a str {
              reason = "use std::ffi::c_str_to_bytes + str::from_utf8")]
 pub unsafe fn from_c_str(s: *const i8) -> &'static str {
     let s = s as *const u8;
-    let mut len = 0;
+    let mut len: usize = 0;
     while *s.offset(len as isize) != 0 {
         len += 1;
     }