Skip to content

Commit 9d552c4

Browse files
committed
Rust 2018
1 parent 401678e commit 9d552c4

Some content is hidden

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

109 files changed

+307
-365
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ matrix:
99
fast_finish: true
1010
include:
1111
# NB: To help with CI delays, each `pull_request` is only tested on Linux,
12-
# with 1.28 for compatibility and stable+rayon_unstable for broad test
12+
# with 1.31 for compatibility and stable+rayon_unstable for broad test
1313
# coverage. The bors bot counts as a `push` type, which will run it all.
1414

15-
- rust: 1.28.0
15+
- rust: 1.31.0
1616
os: linux
1717
#if: everything!
1818
before_script: cp ci/compat-Cargo.lock ./Cargo.lock

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "1.2.1"
55
authors = ["Niko Matsakis <niko@alum.mit.edu>",
66
"Josh Stone <cuviper@gmail.com>"]
77
description = "Simple work-stealing parallelism for Rust"
8+
edition = "2018"
89
license = "Apache-2.0/MIT"
910
repository = "https://github.com/rayon-rs/rayon"
1011
documentation = "https://docs.rs/rayon/"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ just add:
9090
use rayon::prelude::*;
9191
```
9292

93-
Rayon currently requires `rustc 1.28.0` or greater.
93+
Rayon currently requires `rustc 1.31.0` or greater.
9494

9595
## Contribution
9696

ci/alt-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[package]
2+
edition = "2018"
23
name = "alt-core"
34
version = "0.0.0"
45
authors = ["Josh Stone <cuviper@gmail.com>"]

ci/highlander/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[package]
22
authors = ["Josh Stone <cuviper@gmail.com>"]
3+
edition = "2018"
34
name = "highlander"
45
description = "There Can Be Only One"
56
version = "0.0.0"

examples/cpu_monitor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
extern crate docopt;
2-
extern crate rayon;
31
#[macro_use]
42
extern crate serde_derive;
5-
extern crate serde;
63

74
use docopt::Docopt;
5+
use rayon;
86
use std::io;
97
use std::process;
108

rayon-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ description = "Core APIs for Rayon"
77
license = "Apache-2.0/MIT"
88
repository = "https://github.com/rayon-rs/rayon"
99
documentation = "https://docs.rs/rayon/"
10+
edition = "2018"
1011
links = "rayon-core"
1112
build = "build.rs"
1213
readme = "README.md"

rayon-core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Please see [Rayon Docs] for details about using Rayon.
88

99
[Rayon Docs]: https://docs.rs/rayon/
1010

11-
Rayon-core currently requires `rustc 1.28.0` or greater.
11+
Rayon-core currently requires `rustc 1.31.0` or greater.

rayon-core/src/internal/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub unsafe trait ScopeHandle<'scope>: 'scope {
6060
/// This takes ownership of the scope handle, meaning that once
6161
/// you invoke `panicked`, the scope is permitted to terminate
6262
/// (and, in particular, the Rust lifetime `'scope` may end).
63-
fn panicked(self, err: Box<Any + Send>);
63+
fn panicked(self, err: Box<dyn Any + Send>);
6464

6565
/// Indicates that the sub-tasks of this scope that you have
6666
/// spawned concluded successfully.

rayon-core/src/internal/worker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//! worker thread. Intended for building abstractions atop the
33
//! rayon-core thread pool, rather than direct use by end users.
44
5-
use latch::LatchProbe;
6-
use registry;
5+
use crate::latch::LatchProbe;
6+
use crate::registry;
77
use std::fmt;
88

99
/// Represents the active worker thread.
@@ -29,7 +29,7 @@ impl<'w> WorkerThread<'w> {
2929
where
3030
F: Fn() -> bool,
3131
{
32-
struct DummyLatch<'a, F: 'a> {
32+
struct DummyLatch<'a, F> {
3333
f: &'a F,
3434
}
3535

@@ -44,7 +44,7 @@ impl<'w> WorkerThread<'w> {
4444
}
4545

4646
impl<'w> fmt::Debug for WorkerThread<'w> {
47-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
47+
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
4848
fmt.debug_struct("WorkerThread")
4949
.field("pool", &self.thread.registry().id())
5050
.field("index", &self.thread.index())
@@ -58,7 +58,7 @@ impl<'w> fmt::Debug for WorkerThread<'w> {
5858
/// a Rayon worker thread, `None` is immediately returned.
5959
pub fn if_in_worker_thread<F, R>(if_true: F) -> Option<R>
6060
where
61-
F: FnOnce(&WorkerThread) -> R,
61+
F: FnOnce(&WorkerThread<'_>) -> R,
6262
{
6363
unsafe {
6464
let thread = registry::WorkerThread::current().as_ref()?;

0 commit comments

Comments
 (0)