Skip to content

Commit b4bb364

Browse files
committed
auto merge of #7490 : mozilla/rust/rollup, r=thestinger
603137c r=cmr fe10db2 r=bstrie
2 parents c6b0d4f + 052f28a commit b4bb364

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

src/librust/rust.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ fn usage() {
238238

239239
pub fn main() {
240240
let os_args = os::args();
241+
242+
if (os_args.len() > 1 && (os_args[1] == ~"-v" || os_args[1] == ~"--version")) {
243+
rustc::version(os_args[0]);
244+
unsafe { exit(0); }
245+
}
246+
241247
let args = os_args.tail();
242248

243249
if !args.is_empty() {

src/libstd/iterator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,20 @@ pub trait IteratorUtil<A> {
356356
///
357357
/// # Example
358358
///
359-
/// --- {.rust}
359+
/// ~~~ {.rust}
360360
/// let xs = [-3, 0, 1, 5, -10];
361361
/// assert_eq!(*xs.iter().max_by(|x| x.abs()).unwrap(), -10);
362-
/// ---
362+
/// ~~~
363363
fn max_by<B: Ord>(&mut self, f: &fn(&A) -> B) -> Option<A>;
364364

365365
/// Return the element that gives the minimum value from the specfied function
366366
///
367367
/// # Example
368368
///
369-
/// --- {.rust}
369+
/// ~~~ {.rust}
370370
/// let xs = [-3, 0, 1, 5, -10];
371371
/// assert_eq!(*xs.iter().min_by(|x| x.abs()).unwrap(), 0);
372-
/// ---
372+
/// ~~~
373373
fn min_by<B: Ord>(&mut self, f: &fn(&A) -> B) -> Option<A>;
374374
}
375375

src/libstd/vec.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use iter::FromIter;
2323
use kinds::Copy;
2424
use libc;
2525
use num::Zero;
26+
use ops::Add;
2627
use option::{None, Option, Some};
2728
use ptr::to_unsafe_ptr;
2829
use ptr;
@@ -40,6 +41,7 @@ use util;
4041

4142
#[cfg(not(test))] use cmp::Equiv;
4243

44+
#[doc(hidden)]
4345
pub mod rustrt {
4446
use libc;
4547
use vec::raw;
@@ -1180,16 +1182,10 @@ impl<T:Ord> Ord for @[T] {
11801182
}
11811183

11821184
#[cfg(not(test))]
1183-
pub mod traits {
1184-
use kinds::Copy;
1185-
use ops::Add;
1186-
use vec::append;
1187-
1188-
impl<'self,T:Copy> Add<&'self [T],~[T]> for ~[T] {
1189-
#[inline]
1190-
fn add(&self, rhs: & &'self [T]) -> ~[T] {
1191-
append(copy *self, (*rhs))
1192-
}
1185+
impl<'self,T:Copy> Add<&'self [T], ~[T]> for ~[T] {
1186+
#[inline]
1187+
fn add(&self, rhs: & &'self [T]) -> ~[T] {
1188+
append(copy *self, (*rhs))
11931189
}
11941190
}
11951191

0 commit comments

Comments
 (0)