Commit Graph

10 Commits

Author SHA1 Message Date
Alex Crichton
212e03181e std: Remove old_io/old_path from the prelude
This commit removes the reexports of `old_io` traits as well as `old_path` types
and traits from the prelude. This functionality is now all deprecated and needs
to be removed to make way for other functionality like `Seek` in the `std::io`
module (currently reexported as `NewSeek` in the io prelude).

Closes #23377
Closes #23378
2015-03-20 20:07:19 -07:00
Jorge Aparicio
571cc7f8e9 remove all kind annotations from closures 2015-02-04 20:06:08 -05:00
Niko Matsakis
47f18659ff Update compile-fail tests to use the expected type to force the
closure kind, thereby detecting what happens if there are
mismatches. Simply removing the `:` annotations caused most of these
tests to pass or produce other errors, because the inference would
convert the closure into a more appropriate kind. (The ability to
override the inference by using the expected type is an important
backdoor partly for this reason.)
2015-02-03 11:55:46 -05:00
Tobias Bucher
b4a43f3864 Kill more isizes 2015-01-31 17:40:40 +01:00
Alex Crichton
3a07f859b8 Fallout of io => old_io 2015-01-26 16:01:16 -08:00
Huon Wilson
441044f071 Update compile-fail tests to use is/us, not i/u. 2015-01-08 11:02:24 -05:00
Niko Matsakis
5c3d398919 Mostly rote conversion of proc() to move|| (and occasionally Thunk::new) 2014-12-14 04:21:56 -05:00
Steven Fackler
e7c1f57d6c Back io::stdin with a global singleton BufferedReader
io::stdin returns a new `BufferedReader` each time it's called, which
results in some very confusing behavior with disappearing output. It now
returns a `StdinReader`, which wraps a global singleton
`Arc<Mutex<BufferedReader<StdReader>>`. `Reader` is implemented directly
on `StdinReader`. However, `Buffer` is not, as the `fill_buf` method is
fundamentaly un-thread safe. A `lock` method is defined on `StdinReader`
which returns a smart pointer wrapping the underlying `BufferedReader`
while guaranteeing mutual exclusion.

Code that treats the return value of io::stdin as implementing `Buffer`
will break. Add a call to `lock`:

```rust
io::stdin().lines()
// =>
io::stdin().lock().lines()
```

Closes #14434

[breaking-change]
2014-12-03 23:18:52 -08:00
Luqman Aden
f6dfff29ac Add tests. 2014-08-23 01:03:34 -07:00
Luqman Aden
f765759af2 Add tests. 2014-08-09 03:00:41 -07:00