Commit Graph

39809 Commits

Author SHA1 Message Date
Adolfo Ochagavía
47f1d6747c First-class struct and tuple constants
Fixes #23260
2015-03-11 21:17:25 +01:00
Steven Fackler
905a611b94 Switch to a specific feature 2015-03-11 12:58:01 -07:00
Cody P Schafer
100e1a93dc mk/tests: filter more possible debug-assertions 2015-03-11 15:25:32 -04:00
Guillaume Gomez
db726faf32 Change comment in parse-fail test 2015-03-11 19:46:19 +01:00
Steve Klabnik
8934c9b560 Add note about local documentation installation
Fixes #23244
2015-03-11 13:45:55 -04:00
Ryan Prichard
61004f88d1 Improve -Z unstable-options diagnostics and avoid an ICE
* Consumers of handle_options assume the unstable options are defined in
   the getopts::Matches value if -Z unstable-options is set, but that's not
   the case if there weren't any actual unstable options. Fix this by
   always reparsing options when -Z unstable-options is set.

 * If both argument parsing attempts fail, print the error from the second
   attempt rather than the first. The error from the first is very poor
   whenever unstable options are present. e.g.:

       $ rustc hello.rs -Z unstable-options --show-span
       error: Unrecognized option: 'show-span'.
       $ rustc hello.rs -Z unstable-options --pretty --pretty
       error: Unrecognized option: 'pretty'.
       $ rustc hello.rs -Z unstable-options --pretty --bad-option
       error: Unrecognized option: 'pretty'.

 * On the second parse, add a separate pass to reject unstable options if
   -Z unstable-options wasn't specified.

Fixes #21715.
r? @pnkfelix
2015-03-11 01:42:00 -07:00
Dave Huseby
33751ff8a7 adding latest bitrig snapshot manually 2015-03-10 23:39:50 -07:00
Dave Huseby
8e082f77cf disabling jemalloc on bitrig 2015-03-10 23:39:49 -07:00
Ryan Prichard
9c0057df58 Remove core::panicking::panic's dependence on str's Display::fmt impl
Display::fmt for str calls into Formatter::pad, which is modest in size
and also pulls in string-related functions for its truncation and padding
abilities.  For size-critical programs (e.g. embedded), this call site
may be the only reason Formatter::pad is linked into the output.
2015-03-10 22:21:30 -07:00
Steven Fackler
4181d43c4b Remove inline silliness from debug builders
Turns out it's basically a wash, codegen wise.
2015-03-10 21:33:04 -07:00
bors
ae4812b613 Auto merge of #23256 - apasel422:bound, r=alexcrichton 2015-03-11 04:07:16 +00:00
Steven Fackler
3181213f91 Fix unstable span checks 2015-03-10 19:47:57 -07:00
Corey Farwell
d6492e2469 Fix markdown bullet points in function docs
Markdown requires a newline before bullet points, and since there's not one here, they'll get rendered incorrectly
2015-03-10 22:47:08 -04:00
bors
f899513a30 Auto merge of #23251 - tbu-:pr_rm_core_str_checked_add, r=alexcrichton 2015-03-11 01:39:49 +00:00
Guillaume Gomez
a07945d663 Remove ProcType and ProcExp 2015-03-11 00:09:42 +01:00
bors
cfea8ec416 Auto merge of #23126 - alexcrichton:char-third-pass, r=aturon
This commit performs another pass over the `std::char` module for stabilization.
Some minor cleanup is performed such as migrating documentation from libcore to
libunicode (where the `std`-facing trait resides) as well as a slight
reorganiation in libunicode itself. Otherwise, the stability modifications made
are:

* `char::from_digit` is now stable
* `CharExt::is_digit` is now stable
* `CharExt::to_digit` is now stable
* `CharExt::to_{lower,upper}case` are now stable after being modified to return
  an iterator over characters. While the implementation today has not changed
  this should allow us to implement the full set of case conversions in unicode
  where some characters can map to multiple when doing an upper or lower case
  mapping.
* `StrExt::to_{lower,upper}case` was added as unstable for a convenience of not
  having to worry about characters expanding to more characters when you just
  want the whole string to get into upper or lower case.

This is a breaking change due to the change in the signatures of the
`CharExt::to_{upper,lower}case` methods. Code can be updated to use functions
like `flat_map` or `collect` to handle the difference.

[breaking-change]

Closes #20333
2015-03-10 22:45:10 +00:00
Alex Crichton
0f6a0b58f9 std: Stabilize more of the char module
This commit performs another pass over the `std::char` module for stabilization.
Some minor cleanup is performed such as migrating documentation from libcore to
libunicode (where the `std`-facing trait resides) as well as a slight
reorganiation in libunicode itself. Otherwise, the stability modifications made
are:

* `char::from_digit` is now stable
* `CharExt::is_digit` is now stable
* `CharExt::to_digit` is now stable
* `CharExt::to_{lower,upper}case` are now stable after being modified to return
  an iterator over characters. While the implementation today has not changed
  this should allow us to implement the full set of case conversions in unicode
  where some characters can map to multiple when doing an upper or lower case
  mapping.
* `StrExt::to_{lower,upper}case` was added as unstable for a convenience of not
  having to worry about characters expanding to more characters when you just
  want the whole string to get into upper or lower case.

This is a breaking change due to the change in the signatures of the
`CharExt::to_{upper,lower}case` methods. Code can be updated to use functions
like `flat_map` or `collect` to handle the difference.

[breaking-change]
2015-03-10 15:08:31 -07:00
Guillaume Gomez
4e877adddf Remove proc keyword 2015-03-10 22:02:47 +01:00
Alex Crichton
0ad874111e std: Stabilize slice::from_raw_parts
These new APIs have had some time to bake now, and no pressing issues have come
up so they should be ok for stabilizing. Specifically, these two APIs were
stabilized:

* `slice::from_raw_parts`
* `slice::from_raw_parts_mut`
2015-03-10 13:45:08 -07:00
bors
6048ba8a55 Auto merge of #23249 - tbu-:pr_rm_core_str_macros, r=alexcrichton 2015-03-10 20:20:15 +00:00
Cody P Schafer
fbc10c3851 configure: have --enable-debug set -C debug-assertions=on so debug!() works again 2015-03-10 14:06:59 -04:00
Andrew Paseltiner
f58a65374b derive common traits for collections::Bound 2015-03-10 13:50:35 -04:00
bors
d193233230 Auto merge of #23250 - liigo:plain-summary-line, r=alexcrichton
this feature was broken by mistake some days ago: @2b11a80
(line 2201: https://github.com/rust-lang/rust/commit/2b11a80#diff-05c3c8b7c08a25764218b8c18d8204b7L2201)

r? @alexcrichton
2015-03-10 17:20:43 +00:00
bors
698c1008d6 Auto merge of #23028 - Munksgaard:get_attrs_opt, r=eddyb
This is more flexible and less error-prone. `get_attrs` and
`get_attrs_opt` can be used on many more items than the old `get_attrs`
could.

This is all courtesy of @huonw, and directly taken from here:
https://github.com/rust-lang/rust/pull/22348/files#diff-0f85fcb07fb739876892e633fa0e2be6R5575

Also thanks to @Manishearth for pointing it out to me.
2015-03-10 14:50:40 +00:00
Philip Munksgaard
caf6f17c0f get_attrs: use tcx.map.attrs
This is more flexible and less error-prone. `get_attrs` can now be used
on many more types of items.
2015-03-10 14:19:49 +01:00
Philip Munksgaard
298d1578f0 with_attrs -> attrs
We don't need to take a closure, instead just return the list of attributes.
2015-03-10 14:18:58 +01:00
Tobias Bucher
5199a7060b Remove unneeded saturating_add 2015-03-10 14:18:24 +01:00
Liigo Zhuang
29ff77f74b rustdoc: get back 'plain summary line' in sidebar
this feature was broken by mistake some days ago: @2b11a80
2015-03-10 20:55:09 +08:00
Tobias Bucher
fb297d1027 Remove unneeded macro witchery 2015-03-10 12:57:05 +01:00
bors
5f47c0613e Auto merge of #23248 - Manishearth:rollup, r=Manishearth 2015-03-10 11:53:54 +00:00
Tobias Bucher
fcae449b39 Purge isize from core::iter 2015-03-10 11:36:11 +01:00
Manish Goregaokar
b0357ac2c2 Rollup merge of #23231 - killercup:patch-7, r=Manishearth
Fixes #23230.

I think these are the only places I need to update.

r? @steveklabnik
2015-03-10 16:04:23 +05:30
Manish Goregaokar
0a90cf9b32 Rollup merge of #23236 - dhuseby:master, r=alexcrichton
this fixes the issue the bitrig autobuilder is running into.
2015-03-10 15:00:00 +05:30
Manish Goregaokar
436a874db2 Rollup merge of #23226 - pnkfelix:add-tests-for-some-feature-gates, r=alexcrichton
Add tests checking that a number of feature gates are gating their features

Namely:

 * `quote`
 * `link_args`
 * `link_llvm_intrinsics`
 * `thread_local`
 * `unsafe_destructor`

Also updates test for `plugin_registrar` to make it clear that
it is only testing the `plugin_registrar` feature gate.

Cc #22820.  (Latter is not fixed, since there are still a bunch more feature-gates that need tests. But I wanted to stop here and move on to something else.)
2015-03-10 14:59:53 +05:30
Manish Goregaokar
3e5f3b2350 Rollup merge of #23195 - steveklabnik:gh19808, r=alexcrichton
Fixes #19808
2015-03-10 14:59:46 +05:30
Manish Goregaokar
fa8c6d94d0 Rollup merge of #23185 - steveklabnik:gh20051, r=alexcrichton
Fixes #20051
2015-03-10 14:59:39 +05:30
Manish Goregaokar
d034bc3e3a Rollup merge of #23125 - danburkert:master, r=brson 2015-03-10 14:59:31 +05:30
Manish Goregaokar
cc45572f78 Rollup merge of #22832 - anguslees:manpage-pedantry, r=brson
Use consistent markup between rust and rustdoc manpages.  Avoid use of
the troublesome unquoted '-' troff character.
2015-03-10 14:59:20 +05:30
Manish Goregaokar
7206fec9c3 Rollup merge of #23105 - alexcrichton:rand-wrapping, r=brson
There was a buildbot failure recently of an arithmetic overflow in the isaac
module of the rand crate, so I've imported the isaac implementation from
out-of-tree which makes somewhat more liberal usage of the wrapping primitives.
Hopefull this quelches any future overflow!
2015-03-10 14:59:13 +05:30
Manish Goregaokar
a49b6f8bd3 Rollup merge of #23201 - pnkfelix:fsk-struct-ooe-23112, r=nikomatsakis
For FRU, eval field exprs (into scratch temps) before base expr

Fix #23112.
2015-03-10 14:59:07 +05:30
Steven Fackler
bd6ed22fdf Switch derive(Debug) to use the debug builders 2015-03-09 23:24:34 -07:00
Steven Fackler
8121cf077c Restructure debug builders to minimize codegen
Switching from generic bounds to trait objects and having un-inlined
inner methods should cut down on the size of Debug impls, since we care
about the speed of a Debug implementation way less than binary bloat.
2015-03-09 23:24:34 -07:00
Steven Fackler
e3656bd81b Implement RFC 640 2015-03-09 23:24:34 -07:00
bors
d3c49d2140 Auto merge of #23105 - alexcrichton:rand-wrapping, r=brson
There was a buildbot failure recently of an arithmetic overflow in the isaac
module of the rand crate, so I've imported the isaac implementation from
out-of-tree which makes somewhat more liberal usage of the wrapping primitives.
Hopefull this quelches any future overflow!
2015-03-10 05:29:10 +00:00
Alex Crichton
ee7a72c608 rand: Use wrapping operations everywhere
There was a buildbot failure recently of an arithmetic overflow in the isaac
module of the rand crate, so I've imported the isaac implementation from
out-of-tree which makes somewhat more liberal usage of the wrapping primitives.
Hopefull this quelches any future overflow!
2015-03-09 22:16:46 -07:00
bors
621ccf58c4 Auto merge of #23186 - steveklabnik:gh14686, r=alexcrichton
Fixes #14686
2015-03-10 03:03:17 +00:00
Julian Orth
660b48fae5 Add support for target-cpu=native 2015-03-10 01:56:51 +01:00
bors
12b846ab80 Auto merge of #23038 - nikomatsakis:issue-22978-defaulted-coherence, r=flaper87
Fixes #22978.

r? @FlaPer87
2015-03-09 23:27:14 +00:00
Dave Huseby
d0ae7caa49 fixing configure so that it works on bitrig/openbsd 2015-03-09 16:25:50 -07:00
bors
b83b26bacb Auto merge of #22561 - richo:as_slice-as_str, r=Manishearth
This may not be quite ready to go out, I fixed some docs but suspect I missed a bunch.

I also wound up fixing a bunch of redundant `[]` suffixes, but on closer inspection I don't believe that can land until after a snapshot.
2015-03-09 21:02:50 +00:00