- 15 9月, 2015 5 次提交
-
-
由 bors 提交于
This patch transforms functions of the form ``` fn f<Generic: AsRef<Concrete>>(arg: Generic) { let arg: &Concrete = arg.as_ref(); // Code using arg } ``` to the next form: ``` #[inline] fn f<Generic: AsRef<Concrete>>(arg: Generic) { fn f_inner(arg: &Concrete) { // Code using arg } f_inner(arg.as_ref()); } ``` Therefore, most of the code is concrete and not duplicated during monomorphisation (unless inlined) and only the tiny bit of conversion code is duplicated. This method was mentioned by @aturon in the Conversion Traits RFC (https://github.com/rust-lang/rfcs/blame/master/text/0529-conversion-traits.md#L249) and similar techniques are not uncommon in C++ template libraries. This patch goes to the extremes and applies the transformation even to smaller functions<sup>1</sup> for purity of the experiment. *Some of them can be rolled back* if considered too ridiculous. <sup>1</sup> However who knows how small are these functions are after inlining and everything. The functions in question are mostly `fs`/`os` functions and not used especially often with variety of argument types, so the code size reduction is rather small (but consistent). Here are the sizes of stage2 artifacts before and after the patch: https://gist.github.com/petrochenkov/e76a6b280f382da13c5d https://gist.github.com/petrochenkov/6cc28727d5256dbdfed0 Note: All the `inner` functions are concrete and unavailable for cross-crate inlining, some of them may need `#[inline]` annotations in the future. r? @aturon
-
由 bors 提交于
as per #28243.
-
由 bors 提交于
Windows's scheduler apparently has "problems" unblocking calls in the asked for time period.
-
由 Steven Fackler 提交于
Windows's scheduler apparently has "problems" unblocking calls in the asked for time period.
-
由 bors 提交于
Overflows in integer pow() computations would be missed if they preceded a 0 bit of the exponent being processed. This made calls such as 2i32.pow(1024) not trigger an overflow. Fixes #28012
-
- 14 9月, 2015 17 次提交
-
-
由 christopherdumas 提交于
-
由 bors 提交于
This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/
-
由 Björn Steinbrink 提交于
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
-
由 bors 提交于
In addition to instruction updates I - changed from wget to curl, because curl is a prerequisite of rust itself - removed `[...]` because they're missing from so many places it would just obscure the instructions if they were all put in r? @steveklabnik
-
由 bors 提交于
ignore severals tests under openbsd as we have disabling jemalloc under this target. r? @alexcrichton
-
由 Peter Reid 提交于
This would catch regressions of issue #28012.
-
由 bors 提交于
There is already a corresponding impl for `std::io::Write`. This change will make the two traits more consistent.
-
由 bors 提交于
This changes libfmt_macros `CharIndices` iterator into `Peekable` so it can be used without `.clone()`. Also changed some `loop match` and `match` to `while let` and `if let` respectively (mostly for readability).
-
由 Björn Steinbrink 提交于
-
由 Björn Steinbrink 提交于
-
由 bors 提交于
This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.
-
由 Ariel Ben-Yehuda 提交于
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682
-
由 bors 提交于
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
-
由 Ariel Ben-Yehuda 提交于
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377
-
由 bors 提交于
-
- 13 9月, 2015 9 次提交
-
-
由 christopherdumas 提交于
-
由 Aidan Hobson Sayers 提交于
-
由 bors 提交于
There is a dead code in libsyntax/parser/parse.rs, when parsing structs. Two functions are involved: * [parse_item_struct](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4691) * [parse_tuple_struct_body](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4769) The problem is that both functions handle the case with unit structs. But because `parse_tuple_struct_body` is called from `parse_item_struct`, it never faces this case. This PR removes unit struct case from `parse_tuple_struct_body` function. I tested with `make -j8 check-statge1`.
-
由 Chris Wong 提交于
There is already a corresponding impl for `std::io::Write`. This change will make the two traits more consistent.
-
由 christopherdumas 提交于
-
由 bors 提交于
This is something that I wish I had when I started contributing to Rust (not that long ago :). I plan on writing a manual for bors and the rust testing setup too, if there isn't one already.
-
由 bors 提交于
-
由 bors 提交于
- Headlines begin at 1st level now like the rest of the book - All Headlines a blank line above and below - Fix links in this chapter's TOC r? @steveklabnik
-
- 12 9月, 2015 9 次提交
-
-
由 Sébastien Marie 提交于
ignore severals tests under openbsd as we have disabling jemalloc under this target.
-
由 Andrea Canciani 提交于
and regenerate the platform intrinsics source files.
-
由 christopherdumas 提交于
-
由 Tobias Bucher 提交于
-
由 bors 提交于
The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well. r? @steveklabnik
-
由 Pascal Hertleif 提交于
The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well.
-
由 Pascal Hertleif 提交于
- Headlines begin at 1st level now like the rest of the book - All Headlines a blank line above and below - Fix links in this chapter's TOC
-
由 Andrea Canciani 提交于
Commit 9104a902 fixed the generated files, but that change would be lost (or require additional manual intervention) if they are re-generated of if new architectures are added. cc #28273
-
由 bors 提交于
Redirect stdout on the python bogosity detector. This is printing pwd to the terminal currently. Reformat the bogus python/cmake messages so they format correctly. echo does not always escape newlines (it doesn't here), and multiline strings don't whitespace munch. r? @alexcrichton
-