Skip to content

Commit

Permalink
Move RBE to stable
Browse files Browse the repository at this point in the history
This commit moves everything to stable Rust.

In it, we lose a few things:

* FnBox examples
* Associated Constants
* Benchmark tests
* PathExt stuff
* SIMD
* Inline Assembly

These are varying degrees of unfortunate. A better build system
might be able to do nightly vs stable builds for the relevant bits
in the future.
  • Loading branch information
steveklabnik committed Aug 17, 2015
1 parent db87c06 commit f2bc6c6
Show file tree
Hide file tree
Showing 20 changed files with 13 additions and 366 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
sudo: false

install:
- curl -L https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly --yes --prefix=$PWD --disable-sudo --disable-ldconfig
- curl -L https://static.rust-lang.org/rustup.sh | sh -s -- --yes --prefix=$PWD --disable-sudo --disable-ldconfig
- export PATH=$PATH:$PWD/bin
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See [CONTRIBUTING.md][how-to-contribute].

### Debian (Ubuntu) prerequisites

Install Rust [nightly](http://www.rust-lang.org/install.html) and
Install [Rust](http://www.rust-lang.org/install.html) and
run:

```
Expand Down
3 changes: 0 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ for this site][home].
Be sure to have Rust [installed][install] and the [docs][std] at hand, and
let's start!

*Note*: Rust by Example uses the latest nightly build. If you're
following along on your computer, make sure to have it installed.

[rust]: http://www.rust-lang.org/
[install]: http://www.rust-lang.org/install.html
[std]: http://doc.rust-lang.org/std/
Expand Down
30 changes: 0 additions & 30 deletions examples/fn/closures/output_parameters/input.md

This file was deleted.

33 changes: 0 additions & 33 deletions examples/fn/closures/output_parameters/output_parameters.rs

This file was deleted.

4 changes: 1 addition & 3 deletions examples/fn/hof/hof.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(iter_arith)]

fn main() {
println!("Find the sum of all the squared odd numbers under 1000");
let upper = 1000;
Expand Down Expand Up @@ -27,7 +25,7 @@ fn main() {
(0..).map(|n| n * n) // All natural numbers squared
.take_while(|&n| n < upper) // Below upper limit
.filter(|n| is_odd(*n)) // That are odd
.sum(); // Sum them
.fold(0, |sum, i| sum + i); // Sum them
println!("functional style: {}", sum_of_squared_odd_numbers);
}

Expand Down
40 changes: 0 additions & 40 deletions examples/generics/assoc_items/consts/consts.rs

This file was deleted.

7 changes: 0 additions & 7 deletions examples/generics/assoc_items/consts/input.md

This file was deleted.

55 changes: 0 additions & 55 deletions examples/meta/bench/bench.rs

This file was deleted.

17 changes: 0 additions & 17 deletions examples/meta/bench/input.md

This file was deleted.

16 changes: 8 additions & 8 deletions examples/std_misc/arg/matching/match_args.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(slice_patterns)]

use std::env;

fn increase(number: i32) {
Expand All @@ -21,21 +19,23 @@ match_args {{increase|decrease}} <integer>
fn main() {
let args: Vec<String> = env::args().collect();

match &args[..] {
match args.len() {
// no arguments passed
[ref name] => {
println!("My name is '{}'. Try passing some arguments!", name);
1 => {
println!("My name is 'match_args'. Try passing some arguments!");
},
// one argument passed
[_, ref string] => {
if string == &"42" {
2 => {
if &42 == &args[1].parse().unwrap() {
println!("This is the answer!");
} else {
println!("This is not the answer.");
}
},
// one command and one argument passed
[_, ref cmd, ref num] => {
3 => {
let cmd = &args[1];
let num = &args[2];
// parse the number
let number: i32 = match num.parse() {
Ok(n) => {
Expand Down
12 changes: 0 additions & 12 deletions examples/std_misc/fs/fs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(fs_walk)]

use std::fs;
use std::fs::{File, OpenOptions};
use std::io;
Expand Down Expand Up @@ -80,16 +78,6 @@ fn main() {
},
}

println!("`walk a`");
// Recursively walk over the contents of a directory, returns
// `Directories`, which implements the `Iterator<Path> trait
match fs::walk_dir("a") {
Err(why) => println!("! {:?}", why.kind()),
Ok(paths) => for path in paths {
println!("> {:?}", path.unwrap().path());
},
}

println!("`rm a/c/e.txt`");
// Remove a file, returns `io::Result<()>`
fs::remove_file("a/c/e.txt").unwrap_or_else(|why| {
Expand Down
18 changes: 0 additions & 18 deletions examples/std_misc/path/path.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#![feature(path_ext)]

use std::path::Path;
use std::fs::PathExt;

fn main() {
// Create a `Path` from an `&'static str`
Expand All @@ -10,21 +7,6 @@ fn main() {
// The `display` method returns a `Show`able structure
let display = path.display();

// Check if the path exists
if path.exists() {
println!("{} exists", display);
}

// Check if the path is a file
if path.is_file() {
println!("{} is a file", display);
}

// Check if the path is a directory
if path.is_dir() {
println!("{} is a directory", display);
}

// `join` merges a path with a byte container using the OS specific
// separator, and returns the new path
let new_path = path.join("a").join("b");
Expand Down
25 changes: 0 additions & 25 deletions examples/std_misc/simd/input.md

This file was deleted.

17 changes: 0 additions & 17 deletions examples/std_misc/simd/simd.rs

This file was deleted.

Loading

0 comments on commit f2bc6c6

Please sign in to comment.