diff options
| author | bors <bors@rust-lang.org> | 2014-12-14 11:37:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-12-14 11:37:27 +0000 |
| commit | 52f7a4a351646d3837f214b5c7aec390c9b08221 (patch) | |
| tree | f1d12edf0aa7adbb96bf09ea6cc56411898c949c /src/libstd/path | |
| parent | 3a9305ce823df267fb1afcce76ef06ca09e407ff (diff) | |
| parent | f6d60f32080314f1167dd3efb13d772528f500f0 (diff) | |
| download | rust-52f7a4a351646d3837f214b5c7aec390c9b08221.tar.gz rust-52f7a4a351646d3837f214b5c7aec390c9b08221.zip | |
auto merge of #19338 : nikomatsakis/rust/unboxed-closure-purge-the-proc, r=acrichto
They are replaced with unboxed closures. cc @pcwalton @aturon This is a [breaking-change]. Mostly, uses of `proc()` simply need to be converted to `move||` (unboxed closures), but in some cases the adaptations required are more complex (particularly for library authors). A detailed write-up can be found here: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/ The commits are ordered to emphasize the more important changes, but are not truly standalone.
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/posix.rs | 6 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 3daba53cd86..4041a6f60d7 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -515,17 +515,17 @@ mod tests { #[test] fn test_null_byte() { use task; - let result = task::try(proc() { + let result = task::try(move|| { Path::new(b"foo/bar\0") }); assert!(result.is_err()); - let result = task::try(proc() { + let result = task::try(move|| { Path::new("test").set_filename(b"f\0o") }); assert!(result.is_err()); - let result = task::try(proc() { + let result = task::try(move|| { Path::new("test").push(b"f\0o"); }); assert!(result.is_err()); diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index e1b0d9b1395..3983e365ae1 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -1299,17 +1299,17 @@ mod tests { #[test] fn test_null_byte() { use task; - let result = task::try(proc() { + let result = task::try(move|| { Path::new(b"foo/bar\0") }); assert!(result.is_err()); - let result = task::try(proc() { + let result = task::try(move|| { Path::new("test").set_filename(b"f\0o") }); assert!(result.is_err()); - let result = task::try(proc() { + let result = task::try(move|| { Path::new("test").push(b"f\0o"); }); assert!(result.is_err()); |
