- 06 9月, 2018 9 次提交
-
-
由 Felix S. Klock II 提交于
(I may have accidentally added it to some auxilliary crates as well; my emacs-macro-based methodology was pretty crude.)
-
由 Felix S. Klock II 提交于
-
由 bors 提交于
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @EddyB
-
由 bors 提交于
rustbuild: Tweak LLVM distribution layout This commit tweaks the layout of a few components that we distribute to hopefully fix across all platforms the recent issues with LLD being unable to find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic library, which means that LLVM tools by default link to LLVM dynamically rather than statically. This in turn means that the tools, at runtime, need to find the LLVM shared library. LLVM's shared library is currently distributed as part of the rustc component. This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are in two locations: * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld` * Other LLVM tools are shipped at `$sysroot/bin` Each LLVM tool has an embedded rpath directive indicating where it will search for dynamic libraries. This currently points to `../lib` and is presumably inserted by LLVM's build system. Unfortunately, though, this directive is only correct for the LLVM tools at `$sysroot/bin`, not LLD! This commit is targeted at fixing this situation by making two changes: * LLVM tools other than LLD are moved in the distribution to `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should position them for... * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib` Together this means that all tools should natively be able to find the shared object and the shared object should be installed all the time for the various tools. Overall this should... Closes #53813
-
由 bors 提交于
Add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future Adds the methods: `trim_start`, `trim_end`, `trim_start_matches` and `trim_end_matches`. Deprecates `trim_left`, `trim_right`, `trim_left_matches` and `trim_right_matches` starting from Rust 1.33.0, three versions from when they'll initially be marked as being deprecated, using the future deprecation from https://github.com/rust-lang/rust/issues/30785 and https://github.com/rust-lang/rust/pull/51681. Fixes https://github.com/rust-lang/rust/issues/30459.
-
由 bors 提交于
ThinLTO: Don't keep files open after mmaping them. Fixes #53947. r? @alexcrichton
-
由 Tom Tromey 提交于
-
由 Alex Crichton 提交于
This commit tweaks the layout of a few components that we distribute to hopefully fix across all platforms the recent issues with LLD being unable to find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic library, which means that LLVM tools by default link to LLVM dynamically rather than statically. This in turn means that the tools, at runtime, need to find the LLVM shared library. LLVM's shared library is currently distributed as part of the rustc component. This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are in two locations: * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld` * Other LLVM tools are shipped at `$sysroot/bin` Each LLVM tool has an embedded rpath directive indicating where it will search for dynamic libraries. This currently points to `../lib` and is presumably inserted by LLVM's build system. Unfortunately, though, this directive is only correct for the LLVM tools at `$sysroot/bin`, not LLD! This commit is targeted at fixing this situation by making two changes: * LLVM tools other than LLD are moved in the distribution to `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should position them for... * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib` Together this means that all tools should natively be able to find the shared object and the shared object should be installed all the time for the various tools. Overall this should... Closes #53813
-
- 05 9月, 2018 12 次提交
-
-
由 bors 提交于
rustc: Prepare the `atomics` feature for wasm This commit adds a few changes for atomic instructions on the `wasm32-unknown-unknown` target. Atomic instructions are not yet stable in WebAssembly itself but there are multiple implementations and LLVM has support for the proposed instruction set, so let's work on exposing it! Here there are a few inclusions: * The `atomics` feature was whitelisted for LLVM, allowing code in Rust to enable/disable/gate on this. * The `singlethread` option is turned off for wasm when the `atomics` feature is enabled. This means that by default wasm won't be lowering with atomics, but when atomics are enabled globally we'll turn off single-threaded mode to actually codegen atomics. This probably isn't what we'll want in the long term but for now it should work. * Finally the maximum atomic width is increased to 64 to reflect the current wasm spec.
-
由 Michael Woerister 提交于
-
由 bors 提交于
Make json test output formatter represent "test_count" as num fixes #53866
-
由 bors 提交于
Introduce Custom Test Frameworks Introduces `#[test_case]` and `#[test_runner]` and re-implements `#[test]` and `#[bench]` in terms of them. Details found here: https://blog.jrenner.net/rust/testing/2018/08/06/custom-test-framework-prop.html
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 bors 提交于
Update Cargo.lock This also includes major version bumps for the rand crate used by core, std, and alloc tests, among other crates (regex, etc.) used elsewhere. Since these are all internal there should be no user-visible changes. r? @alexcrichton
-
由 bors 提交于
Allow to check if sync::Once is already initialized Hi! I propose to expose a way to check if a `Once` instance is initialized. I need it in `once_cell`. `OnceCell` is effetively a pair of `(Once, UnsafeCell<Option<T>>)`, which can set the `T` only once. Because I can't check if `Once` is initialized, I am forced to add an indirection and check the value of ptr instead: https://github.com/matklad/once_cell/blob/8127a81976c3f2f4c0860562c3f14647ebc025c0/src/lib.rs#L423-L429 https://github.com/matklad/once_cell/blob/8127a81976c3f2f4c0860562c3f14647ebc025c0/src/lib.rs#L457-L461 The `parking_lot`'s version of `Once` exposes the state as an enum: https://docs.rs/parking_lot/0.6.3/parking_lot/struct.Once.html#method.state. I suggest, for now, just to add a simple `bool` function: this fits my use-case perfectly, exposes less implementation details, and is forward-compatible with more fine-grained state checking.
-
由 Mark Rousskov 提交于
-
由 Tom Tromey 提交于
commit 6c101422 ("Update LLVM submodule") disabled the lldb build. This patch updates the lldb and clang submodules to once again build against the LLVM that is included in the Rust tree, and reverts the .travis.yml changes from that patch.
-
- 04 9月, 2018 11 次提交
-
-
由 bors 提交于
Update RLS and Rustfmt RLS * Allow project model to download crates ([#1020](https://github.com/rust-lang-nursery/rls/pull/1020)) * Support simple external builds ([#988](https://github.com/rust-lang-nursery/rls/pull/988)) * Support using external Rustfmt ([#990](https://github.com/rust-lang-nursery/rls/pull/990)) Rustfmt (0.99.4) * Format chains with comment ([#2899](https://github.com/rust-lang-nursery/rls/pull/2899)) * Do not show wildcard pattern in slice pattern ([#2912](https://github.com/rust-lang-nursery/rls/pull/2912)) * Impl only use ([#2951](https://github.com/rust-lang-nursery/rls/pull/2951)) * ... and [more](https://github.com/rust-lang-nursery/rustfmt/compare/5c9a2b6c13d3b6f8d3f9c02b130bb4b54fd489fb...1c408818c8a752dd584e7858b4afd3ceb011a7da) Bumped in tandem to pull a single version of `rustc-ap-*` libs. r? @nrc
-
由 Igor Matuszewski 提交于
-
由 Igor Matuszewski 提交于
This pulls the same version of rustc-ap-* libs as RLS does.
-
由 Igor Matuszewski 提交于
-
由 bors 提交于
Link to more detailed docs in `slice::from_raw_parts_mut`
-
由 bors 提交于
A few cleanups and minor improvements to save_analysis - calculate the capacity of some `Vec`s - change`to_owned()` to `clone()` for the purposes of `lower_attributes` - remove a superfluous `clone()` - prefer `to_owned()` to `to_string()` - a few other minor improvements
-
由 bors 提交于
miri engine: make sure we do not copy unsized data r? @oli-obk
-
由 bors 提交于
whitelist some ARM features required for rust-lang-nursery/stdsimd#557 r? @gnzlbg or @alexcrichton
-
由 ljedrz 提交于
-
由 bors 提交于
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
-
由 Tobias Bucher 提交于
-
- 03 9月, 2018 8 次提交
-
-
由 Jorge Aparicio 提交于
-
由 bors 提交于
Enable ThinLTO with incremental compilation. This is an updated version of #52309. This PR allows `rustc` to use (local) ThinLTO and incremental compilation at the same time. In theory this should allow for getting compile-time improvements for small changes while keeping the runtime performance of the generated code roughly the same as when compiling non-incrementally. The difference to #52309 is that this version also caches the pre-LTO version of LLVM bitcode. This allows for another layer of caching: 1. if the module itself has changed, we have to re-codegen and re-optimize. 2. if the module itself has not changed, but a module it imported from during ThinLTO has, we don't need to re-codegen and don't need to re-run the first optimization phase. Only the second (i.e. ThinLTO-) optimization phase is re-run. 3. if neither the module itself nor any of its imports have changed then we can re-use the final, post-ThinLTO version of the module. (We might have to load its pre-ThinLTO version though so it's available for other modules to import from)
-
由 Tim Diekmann 提交于
-
由 Cyres 提交于
-
由 Tim Diekmann 提交于
-
由 Tim Diekmann 提交于
-
由 bors 提交于
Added pointer checking to sanity checks r? @oli-obk
-
由 Michael Woerister 提交于
-