rust/src
bors 25fb12b8a5 auto merge of #19765 : luqmana/rust/nonzero-lang-item, r=nikomatsakis
This extends the nullable enum opt to traverse beyond just the first level to find possible fields to use as the discriminant. So now, it'll work through structs, tuples, and fixed sized arrays. This also introduces a new lang item, NonZero, that you can use to wrap raw pointers or integral types to indicate to rustc that the underlying value is known to never be 0/NULL. We then use this in Vec, Rc and Arc to have them also benefit from the nullable enum opt.

As per https://github.com/rust-lang/rfcs/pull/499 NonZero is not exposed via the `libstd` facade.

```
x86_64 Linux:
                        T       Option<T> (Before)      Option<T> (After)
----------------------------------------------------------------------------------
Vec<int>                24          32                      24
String                  24          32                      24
Rc<int>                 8           16                      8
Arc<int>                8           16                      8
[Box<int>, ..2]         16          24                      16
(String, uint)          32          40                      32
```

Fixes #19419.
Fixes #13194.
Fixes #9378.
Fixes #7576.
2014-12-29 08:06:20 +00:00
..
compiler-rt@62a4ca6055
compiletest Fix up remaining usage of to_ascii. 2014-12-25 15:26:16 +01:00
doc auto merge of #20117 : lfairy/rust/rename-include-bin, r=alexcrichton 2014-12-24 20:47:12 +00:00
driver Separate the driver into its own crate that uses trans, typeck. 2014-12-04 10:04:52 -05:00
etc auto merge of #19227 : johshoff/rust/master, r=brson 2014-12-29 05:22:26 +00:00
grammar Modify regex::Captures::{at,name} to return Option 2014-12-14 08:56:51 -05:00
jemalloc@b001609960 update jemalloc 2014-10-05 22:17:25 -04:00
liballoc Don't expose NonZero through libstd. 2014-12-28 19:40:48 -05:00
libarena libarena: use unboxed closures 2014-12-13 17:03:46 -05:00
libbacktrace
libcollections auto merge of #19765 : luqmana/rust/nonzero-lang-item, r=nikomatsakis 2014-12-29 08:06:20 +00:00
libcore libcoretest: Add tests for NonZero. 2014-12-28 19:40:48 -05:00
libcoretest libcoretest: Add tests for NonZero. 2014-12-28 19:40:48 -05:00
libflate Rename UniquePtr to Unique 2014-12-26 17:26:33 +01:00
libfmt_macros Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libgetopts Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libgraphviz Fix fallout 2014-12-27 09:55:25 +13:00
liblibc Several fixes for DragonFly (rebase) 2014-12-19 13:05:06 +01:00
liblog Fallout of changing format_args!(f, args) to f(format_args!(args)). 2014-12-27 23:57:43 +02:00
librand librand: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
librbml librbml: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
libregex Prevent Regex::new() from panicking when a non-AST item is repeated 2014-12-26 14:02:51 +09:00
libregex_macros rollup merge of #19820: alexcrichton/deprecate-some-more-libs 2014-12-17 11:50:24 -08:00
librustc librustc: Add NonZero lang item and use it if possible for nullable pointer enum opt. 2014-12-28 19:40:47 -05:00
librustc_back auto merge of #20024 : mneumann/rust/dragonfly-fixes3, r=alexcrichton 2014-12-25 05:11:36 +00:00
librustc_borrowck auto merge of #20119 : FlaPer87/rust/oibit-send-and-friends, r=nikomatsakis 2014-12-27 13:11:48 +00:00
librustc_driver Rebasing changes 2014-12-27 12:30:36 +13:00
librustc_llvm librustc_llvm: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
librustc_resolve Rebasing changes 2014-12-27 12:30:36 +13:00
librustc_trans librustc_trans: Get rid of unnecessary allocation in finding discriminant field. 2014-12-28 19:40:48 -05:00
librustc_typeck auto merge of #20244 : japaric/rust/bc-no-move, r=nikomatsakis 2014-12-27 15:28:36 +00:00
librustdoc auto merge of #19916 : SimonSapin/rust/ascii-reform, r=sfackler 2014-12-27 21:51:43 +00:00
libserialize Rename and namespace FPCategory 2014-12-23 13:42:09 +01:00
libstd auto merge of #20136 : eddyb/rust/format-args, r=alexcrichton 2014-12-28 03:11:48 +00:00
libsyntax auto merge of #20136 : eddyb/rust/format-args, r=alexcrichton 2014-12-28 03:11:48 +00:00
libterm Remove Ascii, AsciiCast, OwnedAsciiCast, AsciiStr, IntoBytes, IntoString. 2014-12-25 12:19:37 +01:00
libtest Make Send and Sync traits unsafe 2014-12-26 17:26:33 +01:00
libtime serialize: Fully deprecate the library 2014-12-22 00:14:56 -08:00
libunicode Test fixes and rebase conflicts 2014-12-22 15:17:26 -08:00
llvm@ec1fdb3b9d Update LLVM to get slightly better memcpy elision 2014-10-17 17:16:18 +02:00
rt Removed unused context-switching assembly code. 2014-12-22 19:12:35 +02:00
rust-installer@aed7347241 Use rust-installer for installation 2014-12-11 17:14:17 -08:00
rustllvm Add LLVM ExecutionEngine API 2014-12-11 15:33:27 -07:00
test Don't expose NonZero through libstd. 2014-12-28 19:40:48 -05:00
snapshots.txt Test fixes and rebase conflicts 2014-12-21 13:49:04 -08:00