- 30 6月, 2018 5 次提交
-
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Fix incorrect type mismatch label pointing at return type CC #46302.
-
由 Esteban Küber 提交于
-
由 bors 提交于
Make the public API of the alloc crate a subset of std This only affects **unstable** APIs. I plan to submit an RFC proposing to stabilize the crate. The reason it isn’t stable yet (https://github.com/rust-lang/rust/issues/27783) is in case we end up merging the standard library crates into one. However the `core` crate is already stable, so if that happens we’ll need to keep it working somehow (likely by making replacing its contents by `pub use` items). We can do the same for `alloc`. This PR will hopefully make this easier, but even if that doesn’t happen consistency with `std` seems good.
-
- 29 6月, 2018 29 次提交
-
-
由 bors 提交于
Update LLVM to 1c817c7a0c828b8fc8e8e462afbe5db41c7052d1 https://github.com/rust-lang/llvm/pull/118 https://github.com/rust-lang/llvm/pull/119
-
由 bors 提交于
[NLL] Better move errors Make a number of changes to improve the quality of NLL cannot move errors. * Group errors that occur in the same `match` with the same cause. * Suggest `ref`, `&` or removing `*` to avoid the move. * Show the place being matched on. Differences from AST borrowck: * `&` is suggested over `ref` when matching on a place that can't be moved from. * Removing `*` is suggested instead of adding `&` when applicable. * Sub-pattern spans aren't used, this would probably need Spans on Places. Closes #45699 Closes #46627 Closes #51187 Closes #51189 r? @pnkfelix
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
… since `std` has no corresponding reexports. Use `alloc::vec::Vec` and `alloc::string::String` instead.
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
This matches std::collections
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 bors 提交于
Add a fallback for stacktrace printing for older Windows versions. Some time ago we switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Tested on my Windows 7 - both msvc and gnu versions produce a readable stacktrace. Fixes #50138
-
由 bors 提交于
park/park_timeout: prohibit spurious wakeups in next park <pre><code> // The implementation currently uses the trivial strategy of a Mutex+Condvar // with wakeup flag, which does not actually allow spurious wakeups. </pre></code> Because does not actually allow spurious wakeups. so we have let thread.inner.cvar.wait(m) in the loop to prohibit spurious wakeups. but if notified after we locked, this notification doesn't be consumed, it return, the next park will consume this notification...this is also 'spurious wakeup' case, 'one unpark() wakeups two park()'. We should improve this situation: `thread.inner.state.store(EMPTY, SeqCst);`
-
由 bors 提交于
Arc: remove unused allocation from Weak::new() It seems non-obvious that calling `Weak::new()` actually allocates space for the entire size of `T`, even though you can **never** access that data from such a constructed weak pointer. Besides that, if someone were to create many `Weak:new()`s, they could be unknowingly wasting a bunch of memory. This change makes it so that `Weak::new()` allocates no memory at all. Instead, it is created with a null pointer. The only things done with a `Weak` are trying to upgrade, cloning, and dropping, meaning there are very few places that the code actually needs to check if the pointer is null.
-
由 bors 提交于
Fix macro missing from doc search Fixes #51095. r? @QuietMisdreavus
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #51636 (Refactor error reporting of constants) - #51765 (Use assert_eq! in copy_from_slice) - #51822 (Provide existing ref suggestions for more E0308 errors) - #51839 (Detect overflows of non u32 shifts) - #51868 (Remove process::id from 'Stabilized APIs' in 1.27.0 release notes) - #51875 (Explicitely disable WASM code generation for Emscripten) Failed merges: r? @ghost
-
由 Mark Rousskov 提交于
Explicitely disable WASM code generation for Emscripten Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/ChangeLog.markdown#v1381-05172018 It now defaults to WebAssembly and requires an explicit flag to generate asm.js. WASM=0 is also valid for older emcc and thus doesn't break it.
-
由 Mark Rousskov 提交于
Remove process::id from 'Stabilized APIs' in 1.27.0 release notes process::id was already stabilized in 1.26.0 and is marked as such in the docs.
-
由 Mark Rousskov 提交于
Detect overflows of non u32 shifts
-
由 Mark Rousskov 提交于
Provide existing ref suggestions for more E0308 errors
-
由 Mark Rousskov 提交于
Use assert_eq! in copy_from_slice This will print both lengths when the assertion fails instead of just saying that they're different. Output of current stable and nightly (modulo the exact line number): ``` thread 'main' panicked at 'destination and source slices have different lengths', libcore/slice/mod.rs:1645:9 ``` Output after this PR: ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `123`, right: `456`: destination and source slices have different lengths', libcore/slice/mod.rs:1645:9 ``` Note that I have not run the tests locally.
-
由 Mark Rousskov 提交于
Refactor error reporting of constants cc @EddyB This PR should not change any behaviour. It solely simplifies the internal handling of the errors
-
由 moxian 提交于
-
由 moxian 提交于
-
由 moxian 提交于
-
由 moxian 提交于
.. and pass them around in BacktraceContext.
-
由 moxian 提交于
.. rather than having them be one giant match statement.
-
由 moxian 提交于
PR #47252 switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Fixes #50138
-
由 Sean McArthur 提交于
-
由 Esteban Küber 提交于
-
- 28 6月, 2018 6 次提交
-
-
由 bors 提交于
translate / export weak lang items see #51671 for details fixes #51671 fixes #51342 r? @michaelwoerister or @alexcrichton
-
由 bors 提交于
Optimize RefCell refcount tracking Address the performance concern raised in https://github.com/rust-lang/rust/pull/51466#issuecomment-398255276 cc @dtolnay @nnethercote @rust-lang/wg-compiler-performance cc @RalfJung @jhjourdan for soundness concerns Can somebody kick off a perf run on this? I'm not sure how that's done, but I understand it has to be started manually. The idea of this change is to switch to representing mutable refcount as values below 0 to eliminate some branching that was required with the old algorithm.
-
由 Jan-Erik Rediger 提交于
Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/ChangeLog.markdown#v1381-05172018 It now defaults to WebAssembly and requires an explicit flag to generate asm.js. WASM=0 is also valid for older emcc and thus doesn't break it. Closes #51856
-
由 bors 提交于
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable. This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance. cc @wesleywiser
-
由 Lireer 提交于
-
由 Oliver Schneider 提交于
-