- 22 6月, 2014 8 次提交
-
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 bors 提交于
We currently compiled bools to i8 values, because there was a bug in LLVM that sometimes caused miscompilations when using i1 in, for example, structs. Using i8 means a lot of unnecessary zero-extend and truncate operations though, since we have to convert the value from and to i1 when using for example icmp or br instructions. Besides the unnecessary overhead caused by this, it also sometimes made LLVM miss some optimizations. First, we have to fix some bugs concerning the handling of attributes in foreign function declarations and calls. These are required because the i1 type needs the ZExt attribute when used as a function parameter or return type. Then we have to update LLVM to get a bugfix without which LLVM sometimes generates broken code when using i1. And then, finally, we can switch bools over to i1.
-
由 Björn Steinbrink 提交于
We currently compiled bools to i8 values, because there was a bug in LLVM that sometimes caused miscompilations when using i1 in, for example, structs. Using i8 means a lot of unnecessary zero-extend and truncate operations though, since we have to convert the value from and to i1 when using for example icmp or br instructions. Besides the unnecessary overhead caused by this, it also sometimes made LLVM miss some optimizations. Fixes #8106.
-
由 Björn Steinbrink 提交于
To fix #8106, we need an LLVM version that contains r211082 aka 0dee6756 which fixes a bug that blocks that issue. There have been some tiny API changes in LLVM, and cmpxchg changed its return type. The i1 part of the new return type is only interesting when using the new weak cmpxchg, which we don't do.
-
由 Björn Steinbrink 提交于
When calling a foreign function, some arguments and/or return value attributes are required to conform to the foreign ABI. Currently those attributes are only added to the declaration of foreign functions. With direct calls, this is no problem, because LLVM can see that those attributes apply to the call. But with an indirect call, LLVM cannot do that and the attribute is missing. To fix that, we have to add those attribute to the calls to foreign functions as well. This also allows to remove the special handling of the SRet attribute, which is ABI-dependent and will be set via the `attr` field of the return type's `ArgType`.
-
由 Björn Steinbrink 提交于
The ArgType type gives us a generic way to specify an attribute for a type to ensure ABI conformance for foreign functions. But the code that actually sets the argument attributes in the function declaration only sets the attribute for the return type when the type is indirect. Since LLVMAddAttribute() doesn't allow to set attributes on the return type, we have to use LLVMAddFunctionAttribute() instead. This didn't cause problems yet, because currently only some indirect types require attributes to be set.
-
由 bors 提交于
Using something like: ```rust box "string" ``` yields ```shell "`~\"string\"` has been removed; use `\"string\".to_string()` instead" ``` Should the error message maybe say `box "string"` instead?
-
- 21 6月, 2014 10 次提交
-
-
由 bors 提交于
This will break code that looks like `Box<Trait+>`. Change that code to `Box<Trait>` instead. Closes #14925. [breaking-change] r? @brson
-
由 Conrad Kleinespel 提交于
-
由 bors 提交于
This commit makes several changes to the stability index infrastructure: * Stability levels are now inherited lexically, i.e., each item's stability level becomes the default for any nested items. * The computed stability level for an item is stored as part of the metadata. When using an item from an external crate, this data is looked up and cached. * The stability lint works from the computed stability level, rather than manual stability attribute annotations. However, the lint still checks only a limited set of item uses (e.g., it does not check every component of a path on import). This will be addressed in a later PR, as part of issue #8962. * The stability lint only applies to items originating from external crates, since the stability index is intended as a promise to downstream crates. * The "experimental" lint is now _allow_ by default. This is because almost all existing crates have been marked "experimental", pending library stabilization. With inheritance in place, this would generate a massive explosion of warnings for every Rust program. The lint should be changed back to deny-by-default after library stabilization is complete. * The "deprecated" lint still warns by default. The net result: we can begin tracking stability index for the standard libraries as we stabilize, without impacting most clients. Closes #13540.
-
由 bors 提交于
This PR is changing the error messages for non-exhaustive pattern matching to include a more accurate witness, i.e. a pattern that is not covered by any of the ones provided by the user. Example: ```rust fn main() { match (true, (Some("foo"), [true, true]), Some(42u)) { (false, _, _) => (), (true, (None, [true, _]), None) => (), (true, (None, [false, _]), Some(1u)) => () } } ``` ```sh /tmp/witness.rs:2:2: 6:3 error: non-exhaustive patterns: (true, (core::option::Some(_), _), _) not covered /tmp/witness.rs:2 match (true, (Some("foo"), [true, true]), Some(42u)) { /tmp/witness.rs:3 (false, _, _) => (), /tmp/witness.rs:4 (true, (None, [true, _]), None) => (), /tmp/witness.rs:5 (true, (None, [false, _]), Some(1u)) => () /tmp/witness.rs:6 } ``` As part of that, I refactored some of the relevant code and carried over the changes to fixed vectors from the previous PR. I'm putting it out there for now but the tests will be red.
-
由 Patrick Walton 提交于
This will break code that looks like `Box<Trait+>`. Change that code to `Box<Trait>` instead. Closes #14925. [breaking-change]
-
由 bors 提交于
Closes #8142. This is not the semantics we want long-term. You can continue to use `#[unsafe_destructor]`, but you'll need to add `#![feature(unsafe_destructor)]` to the crate attributes. [breaking-change] r? @alexcrichton
-
由 Patrick Walton 提交于
Closes #8142. This is not the semantics we want long-term. You can continue to use `#[unsafe_destructor]`, but you'll need to add `#![feature(unsafe_destructor)]` to the crate attributes. [breaking-change]
-
由 Jakub Wieczorek 提交于
-
由 bors 提交于
The parser already has special logic for parsing `>` tokens from `>>`, and this commit extends the logic to the acquiring a `>` from the `>=` and `>>=` tokens as well. Closes #15043
-
由 Alex Crichton 提交于
The parser already has special logic for parsing `>` tokens from `>>`, and this commit extends the logic to the acquiring a `>` from the `>=` and `>>=` tokens as well. Closes #15043
-
- 20 6月, 2014 22 次提交
-
-
由 Jakub Wieczorek 提交于
-
由 Jakub Wieczorek 提交于
String patterns should have a single constructor of arity 0.
-
由 Jakub Wieczorek 提交于
Fixed #13482
-
由 Jakub Wieczorek 提交于
Fixes #7784
-
由 Jakub Wieczorek 提交于
Fixed #4321
-
由 Jakub Wieczorek 提交于
-
由 bors 提交于
-
由 bors 提交于
There is no space between the TOC and the succeeding para. See http://doc.rust-lang.org/guide-pointers.html for example.
-
由 bors 提交于
This corrects some misinformation.
-
由 bors 提交于
TaskPool is the only item in the std::sync doc that doesn't have a summary. This fixes that problem.
-
由 Kasey Carrothers 提交于
-
由 Alexandre Gagnon 提交于
The struct and module doc comments are reformulated. The `execute` method's documentation are put up to date, and failure information is added. A test is also added to address the possible failure.
-
由 bors 提交于
Splits 'extern resources' into 'external documentation and 'community', adds rustforrubyists.com, rustbyexample.com, stackoverflow.com.
-
由 bors 提交于
```test_harness #[test] fn foo() {} ``` will now compile and run the tests, rather than just ignoring & stripping them (i.e. it is as if `--test` was passed). Also, the specific example in https://github.com/rust-lang/rust/issues/12242 was fixed (but that issue is broader than that example).
-
由 Brian Anderson 提交于
This corrects some misinformation.
-
由 Brian Anderson 提交于
There is no space between the TOC and the succeeding para.
-
由 Huon Wilson 提交于
rustdoc now supports compiling things with `--test` so the examples in this guide can be compiled & tested properly (revealing a few issues & out-dated behaviours). Also, reword an example to be clearer, cc #12242.
-
由 Alex Crichton 提交于
This was erroneously disabled as part of 065e121f and it hasn't been turned on since. This was a 3x perf improvement in a test of mine.
-
由 bors 提交于
Continuing from #15012, this makes four changes to the `rustdoc` static files. - Change the placeholder text of the search bar to `Click or press 'S' to search, '?' for more options...` to make keyboard hotkeys more apparent (capitalizing the `S` to match the help text). - Change the `main.js` file to use browser-normalized key codes (`e.which`, from `jQuery`), instead of `e.keyCode`. - Change the key code for `?` to be the correct `191` instead of `188`, so that the hotkey works to bring up search information. - Change the search information to display `tab` and `shift+tab` instead of `up` and `down`, as those do not yet work outside of Firefox (see #15011). Also, adjust the height so it does not cut off the help text. <s>I've also opened up #15038 about the non-functional `up` and `down` functionality, although this does nothing to fix it.</s>
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
Splits 'extern resources' into 'external documentation and 'community', adds rustforrubyists.com and rustbyexample.com, stackoverflow.com.
-