From d904c72af830bd4bec773ce35897703dff2ee3b1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 18 Jun 2013 14:45:18 -0700 Subject: replace #[inline(always)] with #[inline]. r=burningtree. --- src/libextra/arc.rs | 22 ++++++------ src/libextra/arena.rs | 16 ++++----- src/libextra/bitv.rs | 82 ++++++++++++++++++++++---------------------- src/libextra/dlist.rs | 4 +-- src/libextra/num/complex.rs | 4 +-- src/libextra/num/rational.rs | 10 +++--- src/libextra/rc.rs | 2 +- src/libextra/semver.rs | 20 +++++------ src/libextra/sort.rs | 4 +-- src/libextra/sync.rs | 2 +- src/libextra/treemap.rs | 50 +++++++++++++-------------- src/libextra/workcache.rs | 2 +- 12 files changed, 109 insertions(+), 109 deletions(-) (limited to 'src/libextra') diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index b1bec1f95db..6dc37ef58d3 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -58,7 +58,7 @@ pub struct Condvar<'self> { impl<'self> Condvar<'self> { /// Atomically exit the associated ARC and block until a signal is sent. - #[inline(always)] + #[inline] pub fn wait(&self) { self.wait_on(0) } /** @@ -67,7 +67,7 @@ impl<'self> Condvar<'self> { * * wait() is equivalent to wait_on(0). */ - #[inline(always)] + #[inline] pub fn wait_on(&self, condvar_id: uint) { assert!(!*self.failed); self.cond.wait_on(condvar_id); @@ -76,28 +76,28 @@ impl<'self> Condvar<'self> { } /// Wake up a blocked task. Returns false if there was no blocked task. - #[inline(always)] + #[inline] pub fn signal(&self) -> bool { self.signal_on(0) } /** * Wake up a blocked task on a specified condvar (as * sync::cond.signal_on). Returns false if there was no blocked task. */ - #[inline(always)] + #[inline] pub fn signal_on(&self, condvar_id: uint) -> bool { assert!(!*self.failed); self.cond.signal_on(condvar_id) } /// Wake up all blocked tasks. Returns the number of tasks woken. - #[inline(always)] + #[inline] pub fn broadcast(&self) -> uint { self.broadcast_on(0) } /** * Wake up all blocked tasks on a specified condvar (as * sync::cond.broadcast_on). Returns the number of tasks woken. */ - #[inline(always)] + #[inline] pub fn broadcast_on(&self, condvar_id: uint) -> uint { assert!(!*self.failed); self.cond.broadcast_on(condvar_id) @@ -198,7 +198,7 @@ impl MutexARC { * any tasks that subsequently try to access it (including those already * blocked on the mutex) will also fail immediately. */ - #[inline(always)] + #[inline] pub unsafe fn access(&self, blk: &fn(x: &mut T) -> U) -> U { unsafe { let state = self.x.get(); @@ -213,7 +213,7 @@ impl MutexARC { } /// As access(), but with a condvar, as sync::mutex.lock_cond(). - #[inline(always)] + #[inline] pub unsafe fn access_cond<'x, 'c, U>(&self, blk: &fn(x: &'x mut T, c: &'c Condvar) -> U) @@ -231,7 +231,7 @@ impl MutexARC { } // Common code for {mutex.access,rwlock.write}{,_cond}. -#[inline(always)] +#[inline] #[doc(hidden)] fn check_poison(is_mutex: bool, failed: bool) { if failed { @@ -322,7 +322,7 @@ impl RWARC { * that other tasks won't block forever. As MutexARC.access, it will also * poison the ARC, so subsequent readers and writers will both also fail. */ - #[inline(always)] + #[inline] pub fn write(&self, blk: &fn(x: &mut T) -> U) -> U { unsafe { let state = self.x.get(); @@ -335,7 +335,7 @@ impl RWARC { } /// As write(), but with a condvar, as sync::rwlock.write_cond(). - #[inline(always)] + #[inline] pub fn write_cond<'x, 'c, U>(&self, blk: &fn(x: &'x mut T, c: &'c Condvar) -> U) -> U { diff --git a/src/libextra/arena.rs b/src/libextra/arena.rs index 2926d5958f1..db4cf564bab 100644 --- a/src/libextra/arena.rs +++ b/src/libextra/arena.rs @@ -119,7 +119,7 @@ pub fn Arena() -> Arena { arena_with_size(32u) } -#[inline(always)] +#[inline] fn round_up_to(base: uint, align: uint) -> uint { (base + (align - 1)) & !(align - 1) } @@ -156,12 +156,12 @@ unsafe fn destroy_chunk(chunk: &Chunk) { // initialized in the arena in the low bit of the tydesc pointer. This // is necessary in order to properly do cleanup if a failure occurs // during an initializer. -#[inline(always)] +#[inline] unsafe fn bitpack_tydesc_ptr(p: *TypeDesc, is_done: bool) -> uint { let p_bits: uint = transmute(p); p_bits | (is_done as uint) } -#[inline(always)] +#[inline] unsafe fn un_bitpack_tydesc_ptr(p: uint) -> (*TypeDesc, bool) { (transmute(p & !1), p & 1 == 1) } @@ -179,7 +179,7 @@ impl Arena { return self.alloc_pod_inner(n_bytes, align); } - #[inline(always)] + #[inline] fn alloc_pod_inner(&mut self, n_bytes: uint, align: uint) -> *u8 { unsafe { // XXX: Borrow check @@ -199,7 +199,7 @@ impl Arena { } } - #[inline(always)] + #[inline] fn alloc_pod<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T { unsafe { let tydesc = sys::get_type_desc::(); @@ -223,7 +223,7 @@ impl Arena { return self.alloc_nonpod_inner(n_bytes, align); } - #[inline(always)] + #[inline] fn alloc_nonpod_inner(&mut self, n_bytes: uint, align: uint) -> (*u8, *u8) { unsafe { @@ -246,7 +246,7 @@ impl Arena { } } - #[inline(always)] + #[inline] fn alloc_nonpod<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T { unsafe { let tydesc = sys::get_type_desc::(); @@ -268,7 +268,7 @@ impl Arena { } // The external interface - #[inline(always)] + #[inline] pub fn alloc<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T { unsafe { // XXX: Borrow check diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs index e3a15f76c78..647fa81c718 100644 --- a/src/libextra/bitv.rs +++ b/src/libextra/bitv.rs @@ -23,7 +23,7 @@ struct SmallBitv { } /// a mask that has a 1 for each defined bit in a small_bitv, assuming n bits -#[inline(always)] +#[inline] fn small_mask(nbits: uint) -> uint { (1 << nbits) - 1 } @@ -33,7 +33,7 @@ impl SmallBitv { SmallBitv {bits: bits} } - #[inline(always)] + #[inline] pub fn bits_op(&mut self, right_bits: uint, nbits: uint, @@ -46,32 +46,32 @@ impl SmallBitv { mask & old_b != mask & new_b } - #[inline(always)] + #[inline] pub fn union(&mut self, s: &SmallBitv, nbits: uint) -> bool { self.bits_op(s.bits, nbits, |u1, u2| u1 | u2) } - #[inline(always)] + #[inline] pub fn intersect(&mut self, s: &SmallBitv, nbits: uint) -> bool { self.bits_op(s.bits, nbits, |u1, u2| u1 & u2) } - #[inline(always)] + #[inline] pub fn become(&mut self, s: &SmallBitv, nbits: uint) -> bool { self.bits_op(s.bits, nbits, |_u1, u2| u2) } - #[inline(always)] + #[inline] pub fn difference(&mut self, s: &SmallBitv, nbits: uint) -> bool { self.bits_op(s.bits, nbits, |u1, u2| u1 & !u2) } - #[inline(always)] + #[inline] pub fn get(&self, i: uint) -> bool { (self.bits & (1 << i)) != 0 } - #[inline(always)] + #[inline] pub fn set(&mut self, i: uint, x: bool) { if x { self.bits |= 1< bool { let mask = small_mask(nbits); mask & self.bits == mask & b.bits } - #[inline(always)] + #[inline] pub fn clear(&mut self) { self.bits = 0; } - #[inline(always)] + #[inline] pub fn set_all(&mut self) { self.bits = !0; } - #[inline(always)] + #[inline] pub fn is_true(&self, nbits: uint) -> bool { small_mask(nbits) & !self.bits == 0 } - #[inline(always)] + #[inline] pub fn is_false(&self, nbits: uint) -> bool { small_mask(nbits) & self.bits == 0 } - #[inline(always)] + #[inline] pub fn invert(&mut self) { self.bits = !self.bits; } } @@ -115,7 +115,7 @@ struct BigBitv { * a mask that has a 1 for each defined bit in the nth element of a big_bitv, * assuming n bits. */ -#[inline(always)] +#[inline] fn big_mask(nbits: uint, elem: uint) -> uint { let rmd = nbits % uint::bits; let nelems = nbits/uint::bits + if rmd == 0 {0} else {1}; @@ -132,7 +132,7 @@ impl BigBitv { BigBitv {storage: storage} } - #[inline(always)] + #[inline] pub fn process(&mut self, b: &BigBitv, nbits: uint, @@ -154,35 +154,35 @@ impl BigBitv { changed } - #[inline(always)] + #[inline] pub fn each_storage(&mut self, op: &fn(v: &mut uint) -> bool) -> bool { uint::range(0, self.storage.len(), |i| op(&mut self.storage[i])) } - #[inline(always)] + #[inline] pub fn invert(&mut self) { for self.each_storage |w| { *w = !*w } } - #[inline(always)] + #[inline] pub fn union(&mut self, b: &BigBitv, nbits: uint) -> bool { self.process(b, nbits, |w1, w2| w1 | w2) } - #[inline(always)] + #[inline] pub fn intersect(&mut self, b: &BigBitv, nbits: uint) -> bool { self.process(b, nbits, |w1, w2| w1 & w2) } - #[inline(always)] + #[inline] pub fn become(&mut self, b: &BigBitv, nbits: uint) -> bool { self.process(b, nbits, |_, w| w) } - #[inline(always)] + #[inline] pub fn difference(&mut self, b: &BigBitv, nbits: uint) -> bool { self.process(b, nbits, |w1, w2| w1 & !w2) } - #[inline(always)] + #[inline] pub fn get(&self, i: uint) -> bool { let w = i / uint::bits; let b = i % uint::bits; @@ -190,7 +190,7 @@ impl BigBitv { x == 1 } - #[inline(always)] + #[inline] pub fn set(&mut self, i: uint, x: bool) { let w = i / uint::bits; let b = i % uint::bits; @@ -199,7 +199,7 @@ impl BigBitv { else { self.storage[w] & !flag }; } - #[inline(always)] + #[inline] pub fn equals(&self, b: &BigBitv, nbits: uint) -> bool { let len = b.storage.len(); for uint::iterate(0, len) |i| { @@ -229,7 +229,7 @@ fn die() -> ! { } impl Bitv { - #[inline(always)] + #[inline] fn do_op(&mut self, op: Op, other: &Bitv) -> bool { if self.nbits != other.nbits { die(); @@ -279,7 +279,7 @@ impl Bitv { * Sets `self` to the union of `self` and `v1`. Both bitvectors must be * the same length. Returns 'true' if `self` changed. */ - #[inline(always)] + #[inline] pub fn union(&mut self, v1: &Bitv) -> bool { self.do_op(Union, v1) } /** @@ -288,7 +288,7 @@ impl Bitv { * Sets `self` to the intersection of `self` and `v1`. Both bitvectors * must be the same length. Returns 'true' if `self` changed. */ - #[inline(always)] + #[inline] pub fn intersect(&mut self, v1: &Bitv) -> bool { self.do_op(Intersect, v1) } @@ -299,11 +299,11 @@ impl Bitv { * Both bitvectors must be the same length. Returns `true` if `self` was * changed */ - #[inline(always)] + #[inline] pub fn assign(&mut self, v: &Bitv) -> bool { self.do_op(Assign, v) } /// Retrieve the value at index `i` - #[inline(always)] + #[inline] pub fn get(&self, i: uint) -> bool { assert!((i < self.nbits)); match self.rep { @@ -317,7 +317,7 @@ impl Bitv { * * `i` must be less than the length of the bitvector. */ - #[inline(always)] + #[inline] pub fn set(&mut self, i: uint, x: bool) { assert!((i < self.nbits)); match self.rep { @@ -332,7 +332,7 @@ impl Bitv { * Both bitvectors must be the same length. Returns `true` if both * bitvectors contain identical elements. */ - #[inline(always)] + #[inline] pub fn equal(&self, v1: &Bitv) -> bool { if self.nbits != v1.nbits { return false; } match self.rep { @@ -348,7 +348,7 @@ impl Bitv { } /// Set all bits to 0 - #[inline(always)] + #[inline] pub fn clear(&mut self) { match self.rep { Small(ref mut b) => b.clear(), @@ -357,7 +357,7 @@ impl Bitv { } /// Set all bits to 1 - #[inline(always)] + #[inline] pub fn set_all(&mut self) { match self.rep { Small(ref mut b) => b.set_all(), @@ -365,7 +365,7 @@ impl Bitv { } /// Invert all bits - #[inline(always)] + #[inline] pub fn invert(&mut self) { match self.rep { Small(ref mut b) => b.invert(), @@ -381,13 +381,13 @@ impl Bitv { * * Returns `true` if `v0` was changed. */ - #[inline(always)] + #[inline] pub fn difference(&mut self, v: &Bitv) -> bool { self.do_op(Difference, v) } /// Returns true if all bits are 1 - #[inline(always)] + #[inline] pub fn is_true(&self) -> bool { match self.rep { Small(ref b) => b.is_true(self.nbits), @@ -398,7 +398,7 @@ impl Bitv { } } - #[inline(always)] + #[inline] pub fn each(&self, f: &fn(bool) -> bool) -> bool { let mut i = 0; while i < self.nbits { @@ -508,7 +508,7 @@ impl Bitv { impl Clone for Bitv { /// Makes a copy of a bitvector - #[inline(always)] + #[inline] fn clone(&self) -> Bitv { match self.rep { Small(ref b) => { @@ -562,7 +562,7 @@ impl ops::Index for Bitv { } } -#[inline(always)] +#[inline] fn iterate_bits(base: uint, bits: uint, f: &fn(uint) -> bool) -> bool { if bits == 0 { return true; @@ -623,7 +623,7 @@ impl BitvSet { return Bitv{ nbits:cap, rep: Big(~bitv) }; } - #[inline(always)] + #[inline] fn other_op(&mut self, other: &BitvSet, f: &fn(uint, uint) -> uint) { fn nbits(mut w: uint) -> uint { let mut bits = 0; diff --git a/src/libextra/dlist.rs b/src/libextra/dlist.rs index a67b1738819..953803c6843 100644 --- a/src/libextra/dlist.rs +++ b/src/libextra/dlist.rs @@ -160,7 +160,7 @@ impl DList { } // Link two nodes together. If either of them are 'none', also sets // the head and/or tail pointers appropriately. - #[inline(always)] + #[inline] fn link(&mut self, before: DListLink, after: DListLink) { match before { Some(neighbour) => neighbour.next = after, @@ -532,7 +532,7 @@ impl BaseIter for @mut DList { return true; } - #[inline(always)] + #[inline] fn size_hint(&self) -> Option { Some(self.len()) } } diff --git a/src/libextra/num/complex.rs b/src/libextra/num/complex.rs index 1bb364f3a1c..90ca3bc47c0 100644 --- a/src/libextra/num/complex.rs +++ b/src/libextra/num/complex.rs @@ -83,7 +83,7 @@ impl Cmplx { #[cfg(not(stage0))] // Fixed by #4228 impl Cmplx { /// Calculate |self| - #[inline(always)] + #[inline] pub fn norm(&self) -> T { self.re.hypot(&self.im) } @@ -92,7 +92,7 @@ impl Cmplx { #[cfg(not(stage0))] // Fixed by #4228 impl Cmplx { /// Calculate the principal Arg of self. - #[inline(always)] + #[inline] pub fn arg(&self) -> T { self.im.atan2(&self.re) } diff --git a/src/libextra/num/rational.rs b/src/libextra/num/rational.rs index ebb88a13481..b2b966928e9 100644 --- a/src/libextra/num/rational.rs +++ b/src/libextra/num/rational.rs @@ -36,19 +36,19 @@ pub type BigRational = Ratio; impl Ratio { /// Create a ratio representing the integer `t`. - #[inline(always)] + #[inline] pub fn from_integer(t: T) -> Ratio { Ratio::new_raw(t, One::one()) } /// Create a ratio without checking for `denom == 0` or reducing. - #[inline(always)] + #[inline] pub fn new_raw(numer: T, denom: T) -> Ratio { Ratio { numer: numer, denom: denom } } /// Create a new Ratio. Fails if `denom == 0`. - #[inline(always)] + #[inline] pub fn new(numer: T, denom: T) -> Ratio { if denom == Zero::zero() { fail!("denominator == 0"); @@ -206,7 +206,7 @@ impl } } - #[inline(always)] + #[inline] fn round(&self) -> Ratio { if *self < Zero::zero() { Ratio::from_integer((self.numer - self.denom + One::one()) / self.denom) @@ -215,7 +215,7 @@ impl } } - #[inline(always)] + #[inline] fn trunc(&self) -> Ratio { Ratio::from_integer(self.numer / self.denom) } diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs index 96ad629ea83..b90b0983dc2 100644 --- a/src/libextra/rc.rs +++ b/src/libextra/rc.rs @@ -60,7 +60,7 @@ pub fn rc_from_const(value: T) -> Rc { } impl Rc { - #[inline(always)] + #[inline] pub fn borrow<'r>(&'r self) -> &'r T { unsafe { cast::copy_lifetime(self, &(*self.ptr).value) } } diff --git a/src/libextra/semver.rs b/src/libextra/semver.rs index 462461439e6..cb372dd920d 100644 --- a/src/libextra/semver.rs +++ b/src/libextra/semver.rs @@ -29,7 +29,7 @@ pub enum Identifier { } impl cmp::Ord for Identifier { - #[inline(always)] + #[inline] fn lt(&self, other: &Identifier) -> bool { match (self, other) { (&Numeric(a), &Numeric(b)) => a < b, @@ -38,22 +38,22 @@ impl cmp::Ord for Identifier { (&AlphaNumeric(_), _) => false } } - #[inline(always)] + #[inline] fn le(&self, other: &Identifier) -> bool { ! (other < self) } - #[inline(always)] + #[inline] fn gt(&self, other: &Identifier) -> bool { other < self } - #[inline(always)] + #[inline] fn ge(&self, other: &Identifier) -> bool { ! (self < other) } } impl ToStr for Identifier { - #[inline(always)] + #[inline] fn to_str(&self) -> ~str { match self { &Numeric(n) => n.to_str(), @@ -73,7 +73,7 @@ pub struct Version { } impl ToStr for Version { - #[inline(always)] + #[inline] fn to_str(&self) -> ~str { let s = fmt!("%u.%u.%u", self.major, self.minor, self.patch); let s = if self.pre.is_empty() { @@ -90,7 +90,7 @@ impl ToStr for Version { } impl cmp::Ord for Version { - #[inline(always)] + #[inline] fn lt(&self, other: &Version) -> bool { self.major < other.major || @@ -123,15 +123,15 @@ impl cmp::Ord for Version { self.build < other.build) } - #[inline(always)] + #[inline] fn le(&self, other: &Version) -> bool { ! (other < self) } - #[inline(always)] + #[inline] fn gt(&self, other: &Version) -> bool { other < self } - #[inline(always)] + #[inline] fn ge(&self, other: &Version) -> bool { ! (self < other) } diff --git a/src/libextra/sort.rs b/src/libextra/sort.rs index b5645d9c501..3e81216fc3a 100644 --- a/src/libextra/sort.rs +++ b/src/libextra/sort.rs @@ -725,7 +725,7 @@ impl MergeState { } } -#[inline(always)] +#[inline] fn copy_vec(dest: &mut [T], s1: uint, from: &[T]) { @@ -736,7 +736,7 @@ fn copy_vec(dest: &mut [T], } } -#[inline(always)] +#[inline] fn shift_vec(dest: &mut [T], s1: uint, s2: uint, diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs index 5930bf50ff7..f5d0b6946d3 100644 --- a/src/libextra/sync.rs +++ b/src/libextra/sync.rs @@ -363,7 +363,7 @@ impl<'self> Condvar<'self> { // Checks whether a condvar ID was out of bounds, and fails if so, or does // something else next on success. -#[inline(always)] +#[inline] #[doc(hidden)] fn check_cvar_bounds(out_of_bounds: Option, id: uint, act: &str, blk: &fn() -> U) -> U { diff --git a/src/libextra/treemap.rs b/src/libextra/treemap.rs index e37ce7c71ef..f857581c17d 100644 --- a/src/libextra/treemap.rs +++ b/src/libextra/treemap.rs @@ -75,13 +75,13 @@ fn lt(a: &TreeMap, } impl Ord for TreeMap { - #[inline(always)] + #[inline] fn lt(&self, other: &TreeMap) -> bool { lt(self, other) } - #[inline(always)] + #[inline] fn le(&self, other: &TreeMap) -> bool { !lt(other, self) } - #[inline(always)] + #[inline] fn ge(&self, other: &TreeMap) -> bool { !lt(self, other) } - #[inline(always)] + #[inline] fn gt(&self, other: &TreeMap) -> bool { lt(other, self) } } @@ -145,7 +145,7 @@ impl Map for TreeMap { } /// Return a mutable reference to the value corresponding to the key - #[inline(always)] + #[inline] fn find_mut<'a>(&'a mut self, key: &K) -> Option<&'a mut V> { find_mut(&mut self.root, key) } @@ -236,7 +236,7 @@ impl<'self, K, V> Iterator<(&'self K, &'self V)> for TreeMapIterator<'self, K, V impl<'self, T> Iterator<&'self T> for TreeSetIterator<'self, T> { /// Advance the iterator to the next node (in order). If there are no more nodes, return `None`. - #[inline(always)] + #[inline] fn next(&mut self) -> Option<&'self T> { do self.iter.next().map |&(value, _)| { value } } @@ -251,69 +251,69 @@ pub struct TreeSet { impl BaseIter for TreeSet { /// Visit all values in order - #[inline(always)] + #[inline] fn each(&self, f: &fn(&T) -> bool) -> bool { self.map.each_key(f) } - #[inline(always)] + #[inline] fn size_hint(&self) -> Option { Some(self.len()) } } impl ReverseIter for TreeSet { /// Visit all values in reverse order - #[inline(always)] + #[inline] fn each_reverse(&self, f: &fn(&T) -> bool) -> bool { self.map.each_key_reverse(f) } } impl Eq for TreeSet { - #[inline(always)] + #[inline] fn eq(&self, other: &TreeSet) -> bool { self.map == other.map } - #[inline(always)] + #[inline] fn ne(&self, other: &TreeSet) -> bool { self.map != other.map } } impl Ord for TreeSet { - #[inline(always)] + #[inline] fn lt(&self, other: &TreeSet) -> bool { self.map < other.map } - #[inline(always)] + #[inline] fn le(&self, other: &TreeSet) -> bool { self.map <= other.map } - #[inline(always)] + #[inline] fn ge(&self, other: &TreeSet) -> bool { self.map >= other.map } - #[inline(always)] + #[inline] fn gt(&self, other: &TreeSet) -> bool { self.map > other.map } } impl Container for TreeSet { /// Return the number of elements in the set - #[inline(always)] + #[inline] fn len(&const self) -> uint { self.map.len() } /// Return true if the set contains no elements - #[inline(always)] + #[inline] fn is_empty(&const self) -> bool { self.map.is_empty() } } impl Mutable for TreeSet { /// Clear the set, removing all values. - #[inline(always)] + #[inline] fn clear(&mut self) { self.map.clear() } } impl Set for TreeSet { /// Return true if the set contains a value - #[inline(always)] + #[inline] fn contains(&self, value: &T) -> bool { self.map.contains_key(value) } /// Add a value to the set. Return true if the value was not already /// present in the set. - #[inline(always)] + #[inline] fn insert(&mut self, value: T) -> bool { self.map.insert(value, ()) } /// Remove a value from the set. Return true if the value was /// present in the set. - #[inline(always)] + #[inline] fn remove(&mut self, value: &T) -> bool { self.map.remove(value) } /// Return true if the set has no elements in common with `other`. @@ -336,7 +336,7 @@ impl Set for TreeSet { } /// Return true if the set is a subset of another - #[inline(always)] + #[inline] fn is_subset(&self, other: &TreeSet) -> bool { other.is_superset(self) } @@ -490,12 +490,12 @@ impl Set for TreeSet { impl TreeSet { /// Create an empty TreeSet - #[inline(always)] + #[inline] pub fn new() -> TreeSet { TreeSet{map: TreeMap::new()} } /// Get a lazy iterator over the values in the set. /// Requires that it be frozen (immutable). - #[inline(always)] + #[inline] pub fn iter<'a>(&'a self) -> TreeSetIterator<'a, T> { TreeSetIterator{iter: self.map.iter()} } @@ -518,7 +518,7 @@ struct TreeNode { impl TreeNode { /// Creates a new tree node. - #[inline(always)] + #[inline] pub fn new(key: K, value: V) -> TreeNode { TreeNode{key: key, value: value, left: None, right: None, level: 1} } diff --git a/src/libextra/workcache.rs b/src/libextra/workcache.rs index b2fd998b73f..12a26606f36 100644 --- a/src/libextra/workcache.rs +++ b/src/libextra/workcache.rs @@ -104,7 +104,7 @@ struct WorkKey { } impl to_bytes::IterBytes for WorkKey { - #[inline(always)] + #[inline] fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) -> bool { self.kind.iter_bytes(lsb0, f) && self.name.iter_bytes(lsb0, f) } -- cgit 1.4.1-3-g733a5