- 06 2月, 2015 1 次提交
-
-
由 Jorge Aparicio 提交于
-
- 05 2月, 2015 4 次提交
-
-
由 Steve Klabnik 提交于
Fixes #18936 Fixes #18938 Fixes #20038 Fixes #8395 Fixes #2080 Fixes #21194
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
-
由 Alex Crichton 提交于
On OSX the linker has a separate framework lookup path which is specified via the `-F` flag. This adds a new kind of `-L` path recognized by the compiler for frameworks to be passed through to the linker. Closes #20259
-
- 04 2月, 2015 22 次提交
-
-
由 Alex Crichton 提交于
-
由 P1start 提交于
`{` and `}` aren’t valid characters on ARM. This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
-
由 Aaron Turon 提交于
Implements [RFC 474](https://github.com/rust-lang/rfcs/pull/474); see that RFC for details/motivation for this change. This initial commit does not include additional normalization or platform-specific path extensions. These will be done in follow up commits or PRs.
-
由 Huon Wilson 提交于
Use the crates.io crate `rand` (version 0.1 should be a drop in replacement for `std::rand`) and `rand_macros` (`#[derive_Rand]` should be a drop-in replacement). [breaking-change]
-
由 Aaron Turon 提交于
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 576][rfc] which adds back the `std::io` module to the standard library. No functionality in `std::old_io` has been deprecated just yet, and the new `std::io` module is behind the same `io` feature gate. [rfc]: https://github.com/rust-lang/rfcs/pull/576 A good bit of functionality was copied over from `std::old_io`, but many tweaks were required for the new method signatures. Behavior such as precisely when buffered objects call to the underlying object may have been tweaked slightly in the transition. All implementations were audited to use composition wherever possible. For example the custom `pos` and `cap` cursors in `BufReader` were removed in favor of just using `Cursor<Vec<u8>>`. A few liberties were taken during this implementation which were not explicitly spelled out in the RFC: * The old `LineBufferedWriter` is now named `LineWriter` * The internal representation of `Error` now favors OS error codes (a 0-allocation path) and contains a `Box` for extra semantic data. * The io prelude currently reexports `Seek` as `NewSeek` to prevent conflicts with the real prelude reexport of `old_io::Seek` * The `chars` method was moved from `BufReadExt` to `ReadExt`. * The `chars` iterator returns a custom error with a variant that explains that the data was not valid UTF-8.
-
由 Alex Crichton 提交于
This removes the `ByRef` iterator adaptor to stay in line with the changes to `std::io`. The `by_ref` method instead just returns `&mut Self`. This also removes the implementation of `Iterator for &mut Iterator` and instead generalizes it to `Iterator for &mut I` where `I: Iterator + ?Sized`. The `Box<I>` implementations were also updated. This is a breaking change due to the removal of the `std::iter::ByRef` type. All mentions of `ByRef<'a, T>` should be replaced with `&mut T` to migrate forward. [breaking-change]
-
由 Manish Goregaokar 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
explicit annotation, leading to "extra `mut` declaration" lint errors.
-
由 Niko Matsakis 提交于
upgrade the inference based on expected type so that it is able to infer the fn kind in isolation even if the full signature is not available (and we could perhaps do better still in some cases, such as extracting just the types of the arguments but not the return value).
-
由 Niko Matsakis 提交于
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.)
-
由 Niko Matsakis 提交于
possible. There is some amount of duplication as a result (similar to select) -- I am not happy about this but not sure how to fix it without deeper rewrites.
-
由 Niko Matsakis 提交于
a trait obligation. Partial fix for #16440 -- closure return types are not handled yet.
-
- 03 2月, 2015 13 次提交
-
-
由 Björn Steinbrink 提交于
The extra check caused by the expect() call can, in general, not be optimized away, because the length of the iterator is unknown at compile time, causing a noticable slow-down. Since the check only triggers if the element isn't actually found in the iterator, i.e. it isn't guaranteed to trigger for ill-behaved ExactSizeIterators, it seems reasonable to switch to an implementation that doesn't need the check and just always returns None if the value isn't found. Benchmark: ````rust let v: Vec<u8> = (0..1024*65).map(|_| 0).collect(); b.iter(|| { v.as_slice().iter().rposition(|&c| c == 1) }); ```` Before: ```` test rposition ... bench: 49939 ns/iter (+/- 23) ```` After: ```` test rposition ... bench: 33306 ns/iter (+/- 68) ````
-
由 Alexis 提交于
-
由 Valerii Hiora 提交于
-
由 P1start 提交于
Closes #8706.
-
由 Huon Wilson 提交于
That is, when offering suggestions for unresolved method calls, avoid suggesting traits for which implementing the trait for the receiver type either makes little sense (e.g. type errors, or sugared unboxed closures), or violates coherence. The latter is approximated by ensuring that at least one of `{receiver type, trait}` is local. This isn't precisely correct due to multidispatch, but the error messages one encounters in such situation are useless more often than not; it is better to be conservative and miss some cases, than have overly many false positives (e.g. writing `some_slice.map(|x| ...)` uselessly suggested that one should implement `IteratorExt` for `&[T]`, while the correct fix is to call `.iter()`). Closes #21420.
-
由 Björn Steinbrink 提交于
These pointers are never null, let's tell LLVM about it.
-
由 Alex Crichton 提交于
* Display::fmt is stable * Debug::fmt is stable * FromIterator::from_iter is stable * Peekable::peek is stable
-
由 Alex Crichton 提交于
-
由 Björn Steinbrink 提交于
-
由 Alfie John 提交于
-
由 Jorge Aparicio 提交于
-
由 Jorge Aparicio 提交于
Also `for x in option.into_iter()` -> `if let Some(x) = option`
-
由 Jorge Aparicio 提交于
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
-