- 11 2月, 2017 15 次提交
-
-
由 Simonas Kazlauskas 提交于
Constructs a TerminatorKind::SwitchInt for an equivalent conditional true-false branch.
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
This ends up not really mattering because we generate a plain conditional branch in LLVM either way.
-
由 Simonas Kazlauskas 提交于
Previously it used to build a switch in a way that didn’t preserve the invariat of SwitchInt. Now it builds it in an optimal way too, where otherwise branch becomes all the branches which did not have partial variant drops.
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
First example of optimisation that applies to many more cases than originally.
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
Also use a Cow to avoid full Vec for all SwitchInts
-
由 Simonas Kazlauskas 提交于
This removes another special case of Switch by replacing it with the more general SwitchInt. While this is more clunky currently, there’s no reason we can’t make it nice (and efficient) to use.
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
Previously AdtDef variants contained ConstInt for each discriminant, which did not really reflect the actual type of the discriminants. Moving the type into AdtDef allows to easily put the type into metadata and also saves bytes from ConstVal overhead for each discriminant. Also arguably the code is cleaner now :)
-
由 Simonas Kazlauskas 提交于
-
由 Simonas Kazlauskas 提交于
-
- 10 2月, 2017 21 次提交
-
-
由 bors 提交于
Update set operations documentation Reminding people of set terminology.
-
由 bors 提交于
Rollup of 6 pull requests - Successful merges: #39587, #39674, #39693, #39700, #39705, #39707 - Failed merges:
-
由 Corey Farwell 提交于
change span_notes to notes in E0368/E0369 Fixes #39650. All the uses of `span_note` in these errors were reusing the same span as the original error, which causes unnecessary repetition. For an example, see the changes to [src/test/ui/span/issue-39018.stderr](https://github.com/rust-lang/rust/pull/39707/files?diff=unified#diff-46336f62958fdb34233db414cb9914a1R4). r? @jonathandturner
-
由 Corey Farwell 提交于
name anonymous fn parameters in libcore traits This follows the discussion in rust-lang/rfcs#1685. The patch gives names to anonymous parameters in libcore traits. It would have two benefits I can think of: firstly it would provide names to tools that can use the names from the traits, and secondly core/std can serve as an example when writing traits; this change helps by not encouraging the use of anonymous parameters.
-
由 Corey Farwell 提交于
Adding compile fail test for const_indexing feature First attempt at contributing to rust. Picked up an easy feature to test. Issue #39059 r? @est31
-
由 Corey Farwell 提交于
driver: restore partially deleted comment Fixes #39689. Comment was lost in commit 811b8747 (#31916 @nagisa).
-
由 Corey Farwell 提交于
parser: fix ICE when parsing token trees after an error Fixes #39388, fixes #39616. r? @nrc
-
由 Corey Farwell 提交于
rustbuild: support setting verbosity in config.toml Most if not all the configuration is settable trhough config.toml but the verbosity isn't yet. This avoids having to pass -v to x.py on each command if you want verbosity to be always on.
-
由 Alex Burka 提交于
-
由 Jethro Beekman 提交于
Reminding people of set terminology.
-
由 bors 提交于
Rollup of 6 pull requests - Successful merges: #39604, #39619, #39670, #39678, #39682, #39683 - Failed merges:
-
由 Trevor Spiteri 提交于
-
由 Mario 提交于
-
由 Corey Farwell 提交于
Fix unaligned load in librustc_metadata::index. The derived `Clone` impl contains UB and will be unsafe when we fix https://github.com/rust-lang/rust/issues/27060. See [this comment](https://github.com/rust-lang/rust/issues/27060#issuecomment-278617096) for more context. r? @bluss
-
由 Corey Farwell 提交于
Fix unsafe unaligned loads in test. r? @EddyB cc @Aatch @nikomatsakis The `#[derive(PartialEq, Debug)]` impls on a packed struct contain undefined behaviour. Both generated impls take references to unaligned fields, which will fail to compile once we correctly treat that as unsafe (see https://github.com/rust-lang/rust/issues/27060). This UB was found by running the test under [Miri](https://github.com/solson/miri/) which rejects these unsafe unaligned loads.
😄 Here's a simpler example: ```rust struct Packed { a: u8, b: u64, } ``` It expands to: ```rust fn fmt(&self, __arg_0: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { match *self { Packed { a: ref __self_0_0, b: ref __self_0_1 } => { // BAD: these patterns are unsafe let mut builder = __arg_0.debug_struct("Packed"); let _ = builder.field("a", &&(*__self_0_0)); let _ = builder.field("b", &&(*__self_0_1)); builder.finish() } } } ``` and ```rust fn eq(&self, __arg_0: &Packed) -> bool { match *__arg_0 { Packed { a: ref __self_1_0, b: ref __self_1_1 } => // BAD: these patterns are unsafe match *self { Packed { a: ref __self_0_0, b: ref __self_0_1 } => // BAD: these patterns are unsafe true && (*__self_0_0) == (*__self_1_0) && (*__self_0_1) == (*__self_1_1), }, } } ``` -
由 Corey Farwell 提交于
Exclude top-level macro expansions from source location override. It occurred to me that a simple heuristic can address the issue #36382: any macros that expand into items (including `include!()`) don't need to be stepped over because there's not code to step through above a function scope level. r? @michaelwoerister
-
由 Corey Farwell 提交于
Fix mailmap for @gifnksm cc rust-lang-nursery/thanks#71
-
由 Corey Farwell 提交于
Choose different name for metadata obj-file to avoid clashes with user-chosen names. Fixes #39585 and probably https://github.com/rust-lang/rust/issues/39508. Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier. r? @alexcrichton cc @nikomatsakis
-
由 Corey Farwell 提交于
Unignore u128 test for stage 0,1 Even more SNAP cleanup. Follow-up of #39519. Sorry, I didn't check twice.
-
由 bors 提交于
Emit DW_AT_main_subprogram This changes rustc to emit DW_AT_main_subprogram on the "main" program. This lets gdb suitably stop at the user's main in response to "start" (rather than the library's main, which is what happens currently). Fixes #32620 r? michaelwoerister
-
由 Alex Burka 提交于
-
- 09 2月, 2017 4 次提交
-
-
由 bors 提交于
Rollup of 5 pull requests - Successful merges: #39595, #39601, #39602, #39615, #39647 - Failed merges:
-
由 Corey Farwell 提交于
build std for sparc64-unknown-linux-gnu r? @alexcrichton panicking / unwinding is broken (#39646) but with std available at least people will be able to debug that issue on real hardware
-
由 Corey Farwell 提交于
Improve format float * Move float into mod float like in test * Add more tests for f64 f32, lower exp, upper exp, which can come if handy in the future if we want refactor further * Use `assert_eq` for clearer error messages
-
由 Corey Farwell 提交于
Fix ICE when accessing mutably an immutable enum Fix #39544.
-