- 12 10月, 2018 27 次提交
-
-
由 bors 提交于
Rollup of 16 pull requests Successful merges: - #54755 (Documents reference equality by address (#54197)) - #54811 (During rustc bootstrap, make default for `optimize` independent of `debug`) - #54825 (NLL says "borrowed content" instead of more precise "dereference of raw pointer") - #54860 (Add doc comments about safest way to initialize a vector of zeros) - #54869 (Fix mobile docs) - #54891 (Fix tracking issue for Once::is_completed) - #54913 (doc fix: it's auto traits that make for automatic implementations) - #54920 (Fix handling of #[must_use] on unit and uninhabited types) - #54932 (A handful of random string-related improvements) - #54936 (impl Eq+Hash for TyLayout) - #54950 (std: Synchronize global allocator on wasm32) - #54956 ("(using ..." doesn't have the matching ")") - #54958 (add a macro for static (compile-time) assertions) - #54967 (Remove incorrect span for second label inner macro invocation) - #54983 (Fix slice's benchmarks) - #54989 (Fix spelling in the documentation to htmldocck.py) Failed merges: r? @ghost
-
由 kennytm 提交于
Fix spelling in the documentation to htmldocck.py I was reading through htmldocck.py, and decided to attempt to clean it up a little bit. Let me know if you disagree with my edits.
-
由 kennytm 提交于
Fix slice's benchmarks Fixes #54013.
-
由 kennytm 提交于
Remove incorrect span for second label inner macro invocation A fix for issue #54841
-
由 kennytm 提交于
add a macro for static (compile-time) assertions Cc @oli-obk
-
由 kennytm 提交于
"(using ..." doesn't have the matching ")" Fixes #54948.
-
由 kennytm 提交于
std: Synchronize global allocator on wasm32 We originally didn't have threads, and now we're starting to add them! Make sure we properly synchronize access to dlmalloc when the `atomics` feature is enabled for `wasm32-unknown-unknown`.
-
由 kennytm 提交于
impl Eq+Hash for TyLayout As proposed by @EddyB at https://github.com/rust-lang/rust/pull/53671#pullrequestreview-159761136. I have an upcoming PR that would also significantly benefit from this.
-
由 kennytm 提交于
A handful of random string-related improvements - remove a few allocations in `errors/diagnostic` - make `build_helper::gnu_target` return `Cow<str>`
-
由 kennytm 提交于
Fix handling of #[must_use] on unit and uninhabited types Fixes https://github.com/rust-lang/rust/issues/54828.
-
由 kennytm 提交于
doc fix: it's auto traits that make for automatic implementations Being a marker trait is not good enough (that just means "no items in the trait"). r? @alexcrichton who [originally wrote these docs](https://github.com/RalfJung/rust/commit/0a13f1abafe70cddf34bf2b2ba3946c418ed6241).
-
由 kennytm 提交于
Fix tracking issue for Once::is_completed https://github.com/rust-lang/rust/pull/53027 was merged without a tracking issue. I just filed https://github.com/rust-lang/rust/issues/54890. CC @matklad
-
由 kennytm 提交于
Fix mobile docs Fixes #54836. <img width="1440" alt="screen shot 2018-10-06 at 18 53 19" src="https://user-images.githubusercontent.com/3050060/46573683-1b4cd700-c999-11e8-9e6b-86a23b332e22.png"> r? @QuietMisdreavus
-
由 kennytm 提交于
Add doc comments about safest way to initialize a vector of zeros This adds more information about the vec! macro as discussed in #54628. I think this is a good starting point, but I think additional detail is needed so that we can explain why vec! is safer than the alternatives.
-
由 kennytm 提交于
NLL says "borrowed content" instead of more precise "dereference of raw pointer" Part of #52663. Previously, move errors involving the dereference of a raw pointer would say "borrowed content". This commit changes it to say "dereference of raw pointer". r? @nikomatsakis cc @pnkfelix
-
由 kennytm 提交于
Rollup merge of #54811 - pnkfelix:issue-24840-separate-bootstrap-default-for-optimize-from-debug-setting, r=nikomatsakis During rustc bootstrap, make default for `optimize` independent of `debug` It may have taken me three and a half years, but I'm following through on my ["threat"](https://github.com/rust-lang/rust/issues/24840#issuecomment-97911700) Fix #24840
-
由 kennytm 提交于
Documents reference equality by address (#54197) Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion, regarding issue #54197 . The same example as in `ptr::eq` docs is shown here to clarify that `PartialEq` compares values pointed-to instead of via address (which can be desired in some cases)
-
由 bors 提交于
Improve error display for codeblocks in rustdoc Part of #53919. r? @QuietMisdreavus
-
由 Oliver Scherer 提交于
-
由 bors 提交于
Simplify implementation of align_offset slightly
-
由 bors 提交于
Use MaybeUninit in liballoc All code by @japaric. This is a re-submission of a part of https://github.com/rust-lang/rust/pull/53508 that hopefully does not regress performance.
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
Support for disabling PLT for better function call performance This PR gives `rustc` the ability to skip the PLT when generating function calls into shared libraries. This can improve performance by reducing branch indirection. AFAIK, the only advantage of using the PLT is to allow for ELF lazy binding. However, since Rust already [enables full relro for security](https://github.com/rust-lang/rust/pull/43170), lazy binding was disabled anyway. This is a little known feature which is supported by [GCC](https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html) and [Clang](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fplt) as `-fno-plt` (some Linux distros [enable it by default](https://git.archlinux.org/svntogit/packages.git/tree/trunk/makepkg.conf?h=packages/pacman#n40) for all builds). Implementation inspired by [this patch](https://reviews.llvm.org/D39079#change-YvkpNDlMs_LT) which adds `-fno-plt` support to Clang. ## Performance I didn't run a lot of benchmarks, but these are the results on my machine for a `clap` [benchmark](https://github.com/clap-rs/clap/blob/master/benches/05_ripgrep.rs): ``` name control ns/iter no-plt ns/iter diff ns/iter diff % speedup build_app_long 11,097 10,733 -364 -3.28% x 1.03 build_app_short 11,089 10,742 -347 -3.13% x 1.03 build_help_long 186,835 182,713 -4,122 -2.21% x 1.02 build_help_short 80,949 78,455 -2,494 -3.08% x 1.03 parse_clean 12,385 12,044 -341 -2.75% x 1.03 parse_complex 19,438 19,017 -421 -2.17% x 1.02 parse_lots 431,493 421,421 -10,072 -2.33% x 1.02 ``` A small performance improvement across the board, with no downsides. It's likely binaries which make a lot of function calls into dynamic libraries could see even more improvements. [This comment](https://patchwork.ozlabs.org/patch/468993/#1028255) suggests that, in some cases, `-fno-plt` could improve PIC/PIE code performance by 10%. ## Security benefits **Bonus**: some of the speculative execution attacks rely on the PLT, by disabling it we reduce a big attack surface and reduce the need for [`retpoline`](https://reviews.llvm.org/D41723). ## Remaining PLT calls The compiled binaries still have plenty of PLT calls, coming from C/C++ libraries. Building dependencies with `CFLAGS=-fno-plt CXXFLAGS=-fno-plt` removes them.
-
由 Guillaume Gomez 提交于
-
由 Gabriel Majeri 提交于
Disable the PLT where possible to improve performance for indirect calls into shared libraries. This optimization is enabled by default where possible. - Add the `NonLazyBind` attribute to `rustllvm`: This attribute informs LLVM to skip PLT calls in codegen. - Disable PLT unconditionally: Apply the `NonLazyBind` attribute on every function. - Only enable no-plt when full relro is enabled: Ensures we only enable it when we have linker support. - Add `-Z plt` as a compiler option
-
由 Philip Munksgaard 提交于
There was an issue (#33025) which caused these tests to not work. The issue has since been fixed in #33133, and so we can now include them.
-
- 11 10月, 2018 13 次提交
-
-
由 Philip Munksgaard 提交于
-
由 bors 提交于
Cleanup top-level codegen_llvm - improve allocations - improve common patterns - remove explicit returns - fix spelling & grammatical errors - whitespace & formatting improvements
-
由 Ralf Jung 提交于
-
由 bors 提交于
Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Previously parsing trait items only handled opening brace token and semicolon, I added a branch to the match statement that will also handle interpolated blocks.
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #54747 (codegen_llvm: verify that inline assembly operands are scalars) - #54848 (Better Diagnostic for Trait Object Capture) - #54850 (Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls) - #54858 (second round of refactorings for universes) - #54862 (Implement RFC 2539: cfg_attr with multiple attributes) - #54869 (Fix mobile docs) - #54870 (Stabilize tool lints) - #54893 (Fix internal compiler error on malformed match arm pattern.) - #54904 (Stabilize the `Option::replace` method) Failed merges: - #54909 ( Add chalk rules related to associated type defs) r? @ghost
-
由 Kazuyoshi Kato 提交于
Fixes #54013.
-
由 bors 提交于
Better Diagnostic for Trait Object Capture Part of #52663. This commit enhances `LaterUseKind` detection to identify when a borrow is captured by a trait object which helps explain why there is a borrow error. r? @nikomatsakis cc @pnkfelix
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-
由 Manish Goregaokar 提交于
Fixes #47311. r? @nrc
-