- 13 10月, 2018 18 次提交
-
-
由 bors 提交于
std: Implement TLS for wasm32-unknown-unknown This adds an implementation of thread local storage for the `wasm32-unknown-unknown` target when the `atomics` feature is implemented. This, however, comes with a notable caveat of that it requires a new feature of the standard library, `wasm-bindgen-threads`, to be enabled. Thread local storage for wasm (when `atomics` are enabled and there's actually more than one thread) is powered by the assumption that an external entity can fill in some information for us. It's not currently clear who will fill in this information nor whose responsibility it should be long-term. In the meantime there's a strategy being gamed out in the `wasm-bindgen` project specifically, and the hope is that we can continue to test and iterate on the standard library without committing to a particular strategy yet. As to the details of `wasm-bindgen`'s strategy, LLVM doesn't currently have the ability to emit custom `global` values (thread locals in a `WebAssembly.Module`) so we leverage the `wasm-bindgen` CLI tool to do it for us. To that end we have a few intrinsics, assuming two global values: * `__wbindgen_current_id` - gets the current thread id as a 32-bit integer. It's `wasm-bindgen`'s responsibility to initialize this per-thread and then inform libstd of the id. Currently `wasm-bindgen` performs this initialization as part of the `start` function. * `__wbindgen_tcb_{get,set}` - in addition to a thread id it's assumed that there's a global available for simply storing a pointer's worth of information (a thread control block, which currently only contains thread local storage). This would ideally be a native `global` injected by LLVM, but we don't have a great way to support that right now. To reiterate, this is all intended to be unstable and purely intended for testing out Rust on the web with threads. The story is very likely to change in the future and we want to make sure that we're able to do that!
-
由 bors 提交于
The #[panic_handler] attribute can be applied to non-functions Fixes #54896. This commit extends the existing lang items functionality to assert that the `#[lang_item]` attribute is only found on the appropriate item for any given lang item. That is, language items representing traits must only ever have their corresponding attribute placed on a trait, for example. r? @nagisa
-
由 bors 提交于
miri engine: Fix run-time validation This fixes all false positives that came up when actually enabling this in miri. r? @oli-obk
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
miri needs this extra flexibility
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
structured suggestion for E0223 ambiguous associated type (routine (and when are we going to be done finding these, anyway?) but something that stuck out to me while glancing at #54970) r? @estebank
-
由 bors 提交于
Point to variable in `asm!` macro when failing borrowck Fix #34940.
-
由 bors 提交于
[NLL] Check user types are well-formed Also contains a change of span for AscribeUserType. I'm not quite sure if this was what @nikomatsakis was thinking. Closes #54620 r? @nikomatsakis
-
- 12 10月, 2018 22 次提交
-
-
由 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
-
由 Zack M. Davis 提交于
It looks like we tend to use angle-brackets around the placeholder in the few other places we use `Applicability::HasPlaceholders`, but that would be confusing here, so ...
-