Skip to content

Commit eba55c0

Browse files
committed
---
yaml --- r: 59886 b: refs/heads/master c: afcb9e9 h: refs/heads/master v: v3
1 parent c3e9790 commit eba55c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+961
-174
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d1f7220219c722665e15b88aeecfc78601fa4f22
2+
refs/heads/master: afcb9e9d868238accfdff2089684470bf89a92f8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589

trunk/src/compiletest/compiletest.rc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,10 @@ pub fn make_test_closure(config: config, testfile: &Path) -> test::TestFn {
223223
let testfile = testfile.to_str();
224224
test::DynTestFn(|| runtest::run(config, testfile))
225225
}
226+
227+
// Local Variables:
228+
// fill-column: 78;
229+
// indent-tabs-mode: nil
230+
// c-basic-offset: 4
231+
// buffer-file-coding-system: utf-8-unix
232+
// End:

trunk/src/libcore/core.rc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,12 @@ mod core {
263263
pub use sys;
264264
pub use pipes;
265265
}
266+
267+
268+
// Local Variables:
269+
// mode: rust;
270+
// fill-column: 78;
271+
// indent-tabs-mode: nil
272+
// c-basic-offset: 4
273+
// buffer-file-coding-system: utf-8-unix
274+
// End:

trunk/src/libcore/either.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,13 @@ fn test_partition_empty() {
263263
assert_eq!(vec::len(lefts), 0u);
264264
assert_eq!(vec::len(rights), 0u);
265265
}
266+
267+
//
268+
// Local Variables:
269+
// mode: rust
270+
// fill-column: 78;
271+
// indent-tabs-mode: nil
272+
// c-basic-offset: 4
273+
// buffer-file-coding-system: utf-8-unix
274+
// End:
275+
//

trunk/src/libcore/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ pub impl <T:Hash + Eq> HashSet<T> {
833833
}
834834
}
835835

836-
#[cfg(test)]
836+
#[test]
837837
mod test_map {
838838
use container::{Container, Map, Set};
839839
use option::{None, Some};
@@ -1009,7 +1009,7 @@ mod test_map {
10091009
}
10101010
}
10111011

1012-
#[cfg(test)]
1012+
#[test]
10131013
mod test_set {
10141014
use super::*;
10151015
use container::{Container, Map, Set};

trunk/src/libcore/io.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,3 +1954,13 @@ mod tests {
19541954
}
19551955
}
19561956
}
1957+
1958+
//
1959+
// Local Variables:
1960+
// mode: rust
1961+
// fill-column: 78;
1962+
// indent-tabs-mode: nil
1963+
// c-basic-offset: 4
1964+
// buffer-file-coding-system: utf-8-unix
1965+
// End:
1966+
//

trunk/src/libcore/libc.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,3 +1846,12 @@ pub mod funcs {
18461846
}
18471847
}
18481848
}
1849+
1850+
1851+
// Local Variables:
1852+
// mode: rust;
1853+
// fill-column: 78;
1854+
// indent-tabs-mode: nil
1855+
// c-basic-offset: 4
1856+
// buffer-file-coding-system: utf-8-unix
1857+
// End:

trunk/src/libcore/num/cmath.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,14 @@ pub mod c_double_targ_consts {
267267
}
268268
269269
*/
270+
271+
//
272+
// Local Variables:
273+
// mode: rust
274+
// fill-column: 78;
275+
// indent-tabs-mode: nil
276+
// c-basic-offset: 4
277+
// buffer-file-coding-system: utf-8-unix
278+
// End:
279+
//
280+

trunk/src/libcore/num/f32.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,3 +986,13 @@ mod tests {
986986
assert_eq!(Primitive::bytes::<f32>(), sys::size_of::<f32>());
987987
}
988988
}
989+
990+
//
991+
// Local Variables:
992+
// mode: rust
993+
// fill-column: 78;
994+
// indent-tabs-mode: nil
995+
// c-basic-offset: 4
996+
// buffer-file-coding-system: utf-8-unix
997+
// End:
998+
//

trunk/src/libcore/num/f64.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,3 +1033,13 @@ mod tests {
10331033
assert_eq!(Primitive::bytes::<f64>(), sys::size_of::<f64>());
10341034
}
10351035
}
1036+
1037+
//
1038+
// Local Variables:
1039+
// mode: rust
1040+
// fill-column: 78;
1041+
// indent-tabs-mode: nil
1042+
// c-basic-offset: 4
1043+
// buffer-file-coding-system: utf-8-unix
1044+
// End:
1045+
//

trunk/src/libcore/num/float.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,3 +1139,13 @@ mod tests {
11391139
assert_eq!(to_str_digits(-infinity, 10u), ~"-inf");
11401140
}
11411141
}
1142+
1143+
//
1144+
// Local Variables:
1145+
// mode: rust
1146+
// fill-column: 78;
1147+
// indent-tabs-mode: nil
1148+
// c-basic-offset: 4
1149+
// buffer-file-coding-system: utf-8-unix
1150+
// End:
1151+
//

trunk/src/libcore/option.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,3 +565,11 @@ fn test_get_or_zero() {
565565
let no_stuff: Option<int> = None;
566566
assert!(no_stuff.get_or_zero() == 0);
567567
}
568+
569+
// Local Variables:
570+
// mode: rust;
571+
// fill-column: 78;
572+
// indent-tabs-mode: nil
573+
// c-basic-offset: 4
574+
// buffer-file-coding-system: utf-8-unix
575+
// End:

trunk/src/libcore/rand.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,3 +1073,12 @@ mod tests {
10731073
}
10741074
}
10751075
}
1076+
1077+
1078+
// Local Variables:
1079+
// mode: rust;
1080+
// fill-column: 78;
1081+
// indent-tabs-mode: nil
1082+
// c-basic-offset: 4
1083+
// buffer-file-coding-system: utf-8-unix
1084+
// End:

trunk/src/libcore/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ pub fn write_repr<T>(writer: @Writer, object: &T) {
673673
}
674674
}
675675
676-
#[cfg(test)]
676+
#[test]
677677
struct P {a: int, b: float}
678678
679679
#[test]

trunk/src/libcore/run.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,3 +639,11 @@ mod tests {
639639
test_destroy_actually_kills(true);
640640
}
641641
}
642+
643+
// Local Variables:
644+
// mode: rust
645+
// fill-column: 78;
646+
// indent-tabs-mode: nil
647+
// c-basic-offset: 4
648+
// buffer-file-coding-system: utf-8-unix
649+
// End:

trunk/src/libcore/str.rs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pub fn from_bytes_slice<'a>(vector: &'a [u8]) -> &'a str {
7777
}
7878

7979
/// Copy a slice into a new unique str
80+
#[inline(always)]
8081
pub fn from_slice(s: &str) -> ~str {
8182
unsafe { raw::slice_bytes_owned(s, 0, len(s)) }
8283
}
@@ -820,6 +821,7 @@ Section: Comparing strings
820821
/// Bytewise slice equality
821822
#[cfg(notest)]
822823
#[lang="str_eq"]
824+
#[inline]
823825
pub fn eq_slice(a: &str, b: &str) -> bool {
824826
do as_buf(a) |ap, alen| {
825827
do as_buf(b) |bp, blen| {
@@ -836,6 +838,7 @@ pub fn eq_slice(a: &str, b: &str) -> bool {
836838
}
837839

838840
#[cfg(test)]
841+
#[inline]
839842
pub fn eq_slice(a: &str, b: &str) -> bool {
840843
do as_buf(a) |ap, alen| {
841844
do as_buf(b) |bp, blen| {
@@ -854,15 +857,18 @@ pub fn eq_slice(a: &str, b: &str) -> bool {
854857
/// Bytewise string equality
855858
#[cfg(notest)]
856859
#[lang="uniq_str_eq"]
860+
#[inline]
857861
pub fn eq(a: &~str, b: &~str) -> bool {
858862
eq_slice(*a, *b)
859863
}
860864

861865
#[cfg(test)]
866+
#[inline]
862867
pub fn eq(a: &~str, b: &~str) -> bool {
863868
eq_slice(*a, *b)
864869
}
865870

871+
#[inline]
866872
fn cmp(a: &str, b: &str) -> Ordering {
867873
let low = uint::min(a.len(), b.len());
868874

@@ -879,20 +885,24 @@ fn cmp(a: &str, b: &str) -> Ordering {
879885

880886
#[cfg(notest)]
881887
impl<'self> TotalOrd for &'self str {
888+
#[inline]
882889
fn cmp(&self, other: & &'self str) -> Ordering { cmp(*self, *other) }
883890
}
884891

885892
#[cfg(notest)]
886893
impl TotalOrd for ~str {
894+
#[inline]
887895
fn cmp(&self, other: &~str) -> Ordering { cmp(*self, *other) }
888896
}
889897

890898
#[cfg(notest)]
891899
impl TotalOrd for @str {
900+
#[inline]
892901
fn cmp(&self, other: &@str) -> Ordering { cmp(*self, *other) }
893902
}
894903

895904
/// Bytewise slice less than
905+
#[inline]
896906
fn lt(a: &str, b: &str) -> bool {
897907
let (a_len, b_len) = (a.len(), b.len());
898908
let end = uint::min(a_len, b_len);
@@ -909,16 +919,19 @@ fn lt(a: &str, b: &str) -> bool {
909919
}
910920

911921
/// Bytewise less than or equal
922+
#[inline]
912923
pub fn le(a: &str, b: &str) -> bool {
913924
!lt(b, a)
914925
}
915926

916927
/// Bytewise greater than or equal
928+
#[inline]
917929
fn ge(a: &str, b: &str) -> bool {
918930
!lt(a, b)
919931
}
920932

921933
/// Bytewise greater than
934+
#[inline]
922935
fn gt(a: &str, b: &str) -> bool {
923936
!le(a, b)
924937
}
@@ -1595,6 +1608,7 @@ Section: String properties
15951608
*/
15961609

15971610
/// Returns true if the string has length 0
1611+
#[inline(always)]
15981612
pub fn is_empty(s: &str) -> bool { len(s) == 0u }
15991613

16001614
/**
@@ -1616,11 +1630,13 @@ fn is_alphanumeric(s: &str) -> bool {
16161630
}
16171631

16181632
/// Returns the string length/size in bytes not counting the null terminator
1633+
#[inline(always)]
16191634
pub fn len(s: &str) -> uint {
16201635
do as_buf(s) |_p, n| { n - 1u }
16211636
}
16221637

16231638
/// Returns the number of characters that a string holds
1639+
#[inline(always)]
16241640
pub fn char_len(s: &str) -> uint { count_chars(s, 0u, len(s)) }
16251641

16261642
/*
@@ -1752,7 +1768,8 @@ pub fn count_chars(s: &str, start: uint, end: uint) -> uint {
17521768
return len;
17531769
}
17541770

1755-
/// Counts the number of bytes taken by the `n` in `s` starting from `start`.
1771+
/// Counts the number of bytes taken by the first `n` chars in `s`
1772+
/// starting from `start`.
17561773
pub fn count_bytes<'b>(s: &'b str, start: uint, n: uint) -> uint {
17571774
assert!(is_char_boundary(s, start));
17581775
let mut end = start, cnt = n;
@@ -1988,6 +2005,7 @@ static tag_six_b: uint = 252u;
19882005
* let i = str::as_bytes("Hello World") { |bytes| vec::len(bytes) };
19892006
* ~~~
19902007
*/
2008+
#[inline]
19912009
pub fn as_bytes<T>(s: &const ~str, f: &fn(&~[u8]) -> T) -> T {
19922010
unsafe {
19932011
let v: *~[u8] = cast::transmute(copy s);
@@ -2023,6 +2041,7 @@ pub fn as_bytes_slice<'a>(s: &'a str) -> &'a [u8] {
20232041
* let s = str::as_c_str("PATH", { |path| libc::getenv(path) });
20242042
* ~~~
20252043
*/
2044+
#[inline]
20262045
pub fn as_c_str<T>(s: &str, f: &fn(*libc::c_char) -> T) -> T {
20272046
do as_buf(s) |buf, len| {
20282047
// NB: len includes the trailing null.
@@ -2099,6 +2118,7 @@ pub fn subslice_offset(outer: &str, inner: &str) -> uint {
20992118
* * s - A string
21002119
* * n - The number of bytes to reserve space for
21012120
*/
2121+
#[inline(always)]
21022122
pub fn reserve(s: &mut ~str, n: uint) {
21032123
unsafe {
21042124
let v: *mut ~[u8] = cast::transmute(s);
@@ -2126,6 +2146,7 @@ pub fn reserve(s: &mut ~str, n: uint) {
21262146
* * s - A string
21272147
* * n - The number of bytes to reserve space for
21282148
*/
2149+
#[inline(always)]
21292150
pub fn reserve_at_least(s: &mut ~str, n: uint) {
21302151
reserve(s, uint::next_power_of_two(n + 1u) - 1u)
21312152
}
@@ -2314,6 +2335,7 @@ pub mod raw {
23142335
}
23152336

23162337
/// Sets the length of the string and adds the null terminator
2338+
#[inline]
23172339
pub unsafe fn set_len(v: &mut ~str, new_len: uint) {
23182340
let v: **mut vec::raw::VecRepr = cast::transmute(v);
23192341
let repr: *mut vec::raw::VecRepr = *v;
@@ -2489,7 +2511,7 @@ impl<'self> StrSlice<'self> for &'self str {
24892511
#[inline]
24902512
fn is_alphanumeric(&self) -> bool { is_alphanumeric(*self) }
24912513
/// Returns the size in bytes not counting the null terminator
2492-
#[inline]
2514+
#[inline(always)]
24932515
fn len(&self) -> uint { len(*self) }
24942516
/// Returns the number of characters that a string holds
24952517
#[inline]
@@ -2599,10 +2621,11 @@ pub trait OwnedStr {
25992621
}
26002622
26012623
impl OwnedStr for ~str {
2624+
#[inline]
26022625
fn push_str(&mut self, v: &str) {
26032626
push_str(self, v);
26042627
}
2605-
2628+
#[inline]
26062629
fn push_char(&mut self, c: char) {
26072630
push_char(self, c);
26082631
}

trunk/src/libcore/sys.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,11 @@ mod tests {
343343
#[should_fail]
344344
fn fail_owned() { FailWithCause::fail_with(~"cause", file!(), line!()) }
345345
}
346+
347+
// Local Variables:
348+
// mode: rust;
349+
// fill-column: 78;
350+
// indent-tabs-mode: nil
351+
// c-basic-offset: 4
352+
// buffer-file-coding-system: utf-8-unix
353+
// End:

trunk/src/libcore/task/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ fn test_run_basic() {
797797
po.recv();
798798
}
799799
800-
#[cfg(test)]
800+
#[test]
801801
struct Wrapper {
802802
mut f: Option<Chan<()>>
803803
}

0 commit comments

Comments
 (0)