]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoFallout of std::old_io deprecation
Alex Crichton [Wed, 11 Mar 2015 22:24:14 +0000 (15:24 -0700)]
Fallout of std::old_io deprecation

9 years agostd: Stabilize the `io` module
Alex Crichton [Wed, 11 Mar 2015 21:16:46 +0000 (14:16 -0700)]
std: Stabilize the `io` module

The new `std::io` module has had some time to bake now, and this commit
stabilizes its functionality. There are still portions of the module which
remain unstable, and below contains a summart of the actions taken.

This commit also deprecates the entire contents of the `old_io` module in a
blanket fashion. All APIs should now have a reasonable replacement in the
new I/O modules.

Stable APIs:

* `std::io` (the name)
* `std::io::prelude` (the name)
* `Read`
* `Read::read`
* `Read::{read_to_end, read_to_string}` after being modified to return a `usize`
  for the number of bytes read.
* `Write`
* `Write::write`
* `Write::{write_all, write_fmt}`
* `BufRead`
* `BufRead::{fill_buf, consume}`
* `BufRead::{read_line, read_until}` after being modified to return a `usize`
  for the number of bytes read.
* `BufReader`
* `BufReader::{new, with_capacity}`
* `BufReader::{get_ref, get_mut, into_inner}`
* `{Read,BufRead} for BufReader`
* `BufWriter`
* `BufWriter::{new, with_capacity}`
* `BufWriter::{get_ref, get_mut, into_inner}`
* `Write for BufWriter`
* `IntoInnerError`
* `IntoInnerError::{error, into_inner}`
* `{Error,Display} for IntoInnerError`
* `LineWriter`
* `LineWriter::{new, with_capacity}` - `with_capacity` was added
* `LineWriter::{get_ref, get_mut, into_inner}` - `get_mut` was added)
* `Write for LineWriter`
* `BufStream`
* `BufStream::{new, with_capacities}`
* `BufStream::{get_ref, get_mut, into_inner}`
* `{BufRead,Read,Write} for BufStream`
* `stdin`
* `Stdin`
* `Stdin::lock`
* `Stdin::read_line` - added method
* `StdinLock`
* `Read for Stdin`
* `{Read,BufRead} for StdinLock`
* `stdout`
* `Stdout`
* `Stdout::lock`
* `StdoutLock`
* `Write for Stdout`
* `Write for StdoutLock`
* `stderr`
* `Stderr`
* `Stderr::lock`
* `StderrLock`
* `Write for Stderr`
* `Write for StderrLock`
* `io::Result`
* `io::Error`
* `io::Error::last_os_error`
* `{Display, Error} for Error`

Unstable APIs:

(reasons can be found in the commit itself)

* `Write::flush`
* `Seek`
* `ErrorKind`
* `Error::new`
* `Error::from_os_error`
* `Error::kind`

Deprecated APIs

* `Error::description` - available via the `Error` trait
* `Error::detail` - available via the `Display` implementation
* `thread::Builder::{stdout, stderr}`

Changes in functionality:

* `old_io::stdio::set_stderr` is now a noop as the infrastructure for printing
  backtraces has migrated to `std::io`.
* The `ReadExt`, `WriteExt`, and `BufReadExt` extension traits were all removed
  by folding functionality into the corresponding trait.

[breaking-change]

9 years agoAuto merge of #23229 - aturon:stab-path, r=alexcrichton
bors [Fri, 13 Mar 2015 01:00:02 +0000 (01:00 +0000)]
Auto merge of #23229 - aturon:stab-path, r=alexcrichton

This commit stabilizes essentially all of the new `std::path` API. The
API itself is changed in a couple of ways (which brings it in closer
alignment with the RFC):

* `.` components are now normalized away, unless they appear at the
  start of a path. This in turn effects the semantics of e.g. asking for
  the file name of `foo/` or `foo/.`, both of which yield `Some("foo")`
  now. This semantics is what the original RFC specified, and is also
  desirable given early experience rolling out the new API.

* The `parent` method is now `without_file` and succeeds if, and only
  if, `file_name` is `Some(_)`. That means, in particular, that it fails
  for a path like `foo/../`. This change affects `pop` as well.

In addition, the `old_path` module is now deprecated.

[breaking-change]

r? @alexcrichton

9 years agoStabilize std::path
Aaron Turon [Mon, 9 Mar 2015 15:49:10 +0000 (08:49 -0700)]
Stabilize std::path

This commit stabilizes essentially all of the new `std::path` API. The
API itself is changed in a couple of ways (which brings it in closer
alignment with the RFC):

* `.` components are now normalized away, unless they appear at the
  start of a path. This in turn effects the semantics of e.g. asking for
  the file name of `foo/` or `foo/.`, both of which yield `Some("foo")`
  now. This semantics is what the original RFC specified, and is also
  desirable given early experience rolling out the new API.

* The `parent` function now succeeds if, and only if, the path has at
  least one non-root/prefix component. This change affects `pop` as
  well.

* The `Prefix` component now involves a separate `PrefixComponent`
  struct, to better allow for keeping both parsed and unparsed prefix data.

In addition, the `old_path` module is now deprecated.

Closes #23264

[breaking-change]

9 years agoAuto merge of #23265 - eddyb:meth-ast-refactor, r=nikomatsakis
bors [Thu, 12 Mar 2015 20:13:23 +0000 (20:13 +0000)]
Auto merge of #23265 - eddyb:meth-ast-refactor, r=nikomatsakis

The end result is that common fields (id, name, attributes, etc.) are stored in now-structures `ImplItem` and `TraitItem`.
The signature of a method is no longer duplicated between methods with a body (default/impl) and those without, they now share `MethodSig`.

This is also a [breaking-change] because of minor bugfixes and changes to syntax extensions:
* `pub fn` methods in a trait no longer parse - remove the `pub`, it has no meaning anymore
* `MacResult::make_methods` is now `make_impl_items` and the return type has changed accordingly
* `quote_method` is gone, because `P<ast::Method>` doesn't exist and it couldn't represent a full method anyways - could be replaced by `quote_impl_item`/`quote_trait_item` in the future, but I do hope we realize how silly that combinatorial macro expansion is and settle on a single `quote` macro + some type hints - or just no types at all (only token-trees)

r? @nikomatsakis This is necessary (hopefully also sufficient) for associated constants.

9 years agoAuto merge of #23245 - alexcrichton:allow-warnings-again, r=aturon
bors [Thu, 12 Mar 2015 17:39:30 +0000 (17:39 +0000)]
Auto merge of #23245 - alexcrichton:allow-warnings-again, r=aturon

These were suppressing lots of interesting warnings! Turns out there was also
quite a bit of dead code.

9 years agostd: Remove #[allow] directives in sys modules
Alex Crichton [Tue, 10 Mar 2015 03:04:35 +0000 (20:04 -0700)]
std: Remove #[allow] directives in sys modules

These were suppressing lots of interesting warnings! Turns out there was also
quite a bit of dead code.

9 years agoAuto merge of #23299 - mdinger:monospace_table, r=steveklabnik
bors [Thu, 12 Mar 2015 13:47:20 +0000 (13:47 +0000)]
Auto merge of #23299 - mdinger:monospace_table, r=steveklabnik

The [literals table](http://doc.rust-lang.org/reference.html#characters-and-strings) now looks ugly but compact. Add back the monospace text.

9 years agoAuto merge of #23162 - sfackler:debug-builders, r=alexcrichton
bors [Thu, 12 Mar 2015 07:30:44 +0000 (07:30 +0000)]
Auto merge of #23162 - sfackler:debug-builders, r=alexcrichton

I've made some minor changes from the implementation attached to the RFC to try to minimize codegen. The methods now take `&Debug` trait objects rather than being parameterized and there are inlined stub methods that call to non-inlined methods to do the work.

r? @alexcrichton

cc @huonw for the `derive(Debug)` changes.

9 years agoAuto merge of #23298 - Manishearth:rollup, r=Manishearth
bors [Thu, 12 Mar 2015 04:53:31 +0000 (04:53 +0000)]
Auto merge of #23298 - Manishearth:rollup, r=Manishearth

None

9 years agoAdd monospace font back to literals table
mdinger [Thu, 12 Mar 2015 04:24:48 +0000 (00:24 -0400)]
Add monospace font back to literals table

9 years agoRm unused feature
Manish Goregaokar [Wed, 11 Mar 2015 09:13:37 +0000 (14:43 +0530)]
Rm unused feature

9 years agoRollup merge of #23296 - shepmaster:explain-why-joinguard-is-must-use, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:45:06 +0000 (09:15 +0530)]
Rollup merge of #23296 - shepmaster:explain-why-joinguard-is-must-use, r=alexcrichton

9 years agoRollup merge of #23295 - johnz133:patch-1, r=steveklabnik
Manish Goregaokar [Thu, 12 Mar 2015 03:44:59 +0000 (09:14 +0530)]
Rollup merge of #23295 - johnz133:patch-1, r=steveklabnik

 Changed the docs to reflect that

9 years agoRollup merge of #23279 - steveklabnik:gh23244, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:44:51 +0000 (09:14 +0530)]
Rollup merge of #23279 - steveklabnik:gh23244, r=alexcrichton

 Fixes #23244

9 years agoRollup merge of #23275 - aochagavia:constants, r=eddyb
Manish Goregaokar [Thu, 12 Mar 2015 03:44:44 +0000 (09:14 +0530)]
Rollup merge of #23275 - aochagavia:constants, r=eddyb

 Fixes #23260

r? @eddyb

9 years agoRollup merge of #23274 - rprichard:fix-21715, r=pnkfelix
Manish Goregaokar [Thu, 12 Mar 2015 03:44:38 +0000 (09:14 +0530)]
Rollup merge of #23274 - rprichard:fix-21715, r=pnkfelix

  * 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

9 years agoRollup merge of #23270 - frewsxcv:patch-5, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:44:31 +0000 (09:14 +0530)]
Rollup merge of #23270 - frewsxcv:patch-5, r=alexcrichton

 Markdown requires a newline before bullet points, and since there's not one here, they'll get rendered incorrectly

9 years agoRollup merge of #23263 - alexcrichton:stabilize-from-raw-parts, r=brson
Manish Goregaokar [Thu, 12 Mar 2015 03:44:26 +0000 (09:14 +0530)]
Rollup merge of #23263 - alexcrichton:stabilize-from-raw-parts, r=brson

 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`

9 years agoRollup merge of #23257 - jmesmon:fix-debug, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:44:21 +0000 (09:14 +0530)]
Rollup merge of #23257 - jmesmon:fix-debug, r=alexcrichton

 configure: have --enable-debug set -C debug-assertions=on so `debug!()` works again

9 years agoRollup merge of #23255 - dhuseby:master, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:44:16 +0000 (09:14 +0530)]
Rollup merge of #23255 - dhuseby:master, r=alexcrichton

 it turns out that jemalloc doesn't behave well on bitrig.  with jemalloc enabled i get some kernel errors related to sbrk failures.  with jemalloc disabled, the errors go away.  i am investigating, but in the mean time, we should just disable jemalloc by default on bitrig.

9 years agoRollup merge of #23247 - tbu-:pr_core_iter_rm_isize, r=huonw
Manish Goregaokar [Thu, 12 Mar 2015 03:44:08 +0000 (09:14 +0530)]
Rollup merge of #23247 - tbu-:pr_core_iter_rm_isize, r=huonw

9 years agoRollup merge of #23238 - mahkoh:nativecpu, r=dotdash
Manish Goregaokar [Thu, 12 Mar 2015 03:44:03 +0000 (09:14 +0530)]
Rollup merge of #23238 - mahkoh:nativecpu, r=dotdash

9 years agoRollup merge of #23234 - Ms2ger:doc-dynamic-dispatch, r=steveklabnik
Manish Goregaokar [Thu, 12 Mar 2015 03:43:58 +0000 (09:13 +0530)]
Rollup merge of #23234 - Ms2ger:doc-dynamic-dispatch, r=steveklabnik

9 years agoRollup merge of #22769 - :rustdocfix, r=brson
Manish Goregaokar [Thu, 12 Mar 2015 03:43:53 +0000 (09:13 +0530)]
Rollup merge of #22769 - :rustdocfix, r=brson

 Fixes #22325

9 years agoRollup merge of #23297 - steveklabnik:examples, r=huonw
Manish Goregaokar [Thu, 12 Mar 2015 03:43:47 +0000 (09:13 +0530)]
Rollup merge of #23297 - steveklabnik:examples, r=huonw

 This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown

9 years agoRollup merge of #23294 - dotdash:coob, r=alexcrichton
Manish Goregaokar [Thu, 12 Mar 2015 03:43:42 +0000 (09:13 +0530)]
Rollup merge of #23294 - dotdash:coob, r=alexcrichton

 Fixes #23291

9 years agoCargo build now builds to /target/debug/, changed the docs to reflect that.
John Zhang [Wed, 11 Mar 2015 23:48:32 +0000 (16:48 -0700)]
Cargo build now builds to /target/debug/, changed the docs to reflect that.

Deleted trailing space in hello-cargo.md

Added note about build --release in hello-cargo

thanks to steven klabnik for pointing it out for me

edited out redundant wording

9 years agoExample -> Examples
Steve Klabnik [Thu, 12 Mar 2015 01:11:40 +0000 (21:11 -0400)]
Example -> Examples

This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown

9 years agoExplain why immediately dropping a JoinGuard is not what you want to do
Jake Goulding [Thu, 12 Mar 2015 00:10:52 +0000 (20:10 -0400)]
Explain why immediately dropping a JoinGuard is not what you want to do

9 years agoAuto merge of #23156 - GuillaumeGomez:remove-proc, r=alexcrichton
bors [Wed, 11 Mar 2015 23:51:30 +0000 (23:51 +0000)]
Auto merge of #23156 - GuillaumeGomez:remove-proc, r=alexcrichton

This is the implementation of the [RFC 584](https://github.com/rust-lang/rfcs/pull/584).

9 years agoFix LLVM assertion when out-of-bounds indexing in a constant
Björn Steinbrink [Wed, 11 Mar 2015 23:19:37 +0000 (00:19 +0100)]
Fix LLVM assertion when out-of-bounds indexing in a constant

Fixes #23291

9 years agosyntax: move MethMac to MacImplItem and combine {Provided,Required}Method into Method...
Eduard Burtescu [Wed, 11 Mar 2015 21:38:58 +0000 (23:38 +0200)]
syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem.

9 years agosyntax: rename TypeMethod to MethodSig and use it in MethDecl.
Eduard Burtescu [Wed, 11 Mar 2015 06:38:27 +0000 (08:38 +0200)]
syntax: rename TypeMethod to MethodSig and use it in MethDecl.

9 years agosyntax: gather common fields of impl & trait items into their respective types.
Eduard Burtescu [Tue, 10 Mar 2015 10:28:44 +0000 (12:28 +0200)]
syntax: gather common fields of impl & trait items into their respective types.

9 years agosyntax: move indirection around {Trait,Impl}Item, from within.
Eduard Burtescu [Thu, 5 Mar 2015 02:48:54 +0000 (04:48 +0200)]
syntax: move indirection around {Trait,Impl}Item, from within.

9 years agoRewrite the dynamic dispatch section to focus on usage rather than implementation.
Ms2ger [Mon, 9 Mar 2015 23:17:01 +0000 (00:17 +0100)]
Rewrite the dynamic dispatch section to focus on usage rather than implementation.

9 years agoUpdate tests
Adolfo Ochagavía [Wed, 11 Mar 2015 09:57:12 +0000 (10:57 +0100)]
Update tests

9 years agoFirst-class struct and tuple constants
Adolfo Ochagavía [Sun, 8 Mar 2015 15:41:28 +0000 (16:41 +0100)]
First-class struct and tuple constants

Fixes #23260

9 years agoSwitch to a specific feature
Steven Fackler [Wed, 11 Mar 2015 19:58:01 +0000 (12:58 -0700)]
Switch to a specific feature

9 years agomk/tests: filter more possible debug-assertions
Cody P Schafer [Wed, 11 Mar 2015 19:03:25 +0000 (15:03 -0400)]
mk/tests: filter more possible debug-assertions

9 years agoChange comment in parse-fail test
Guillaume Gomez [Wed, 11 Mar 2015 18:46:19 +0000 (19:46 +0100)]
Change comment in parse-fail test

9 years agoAdd note about local documentation installation
Steve Klabnik [Wed, 11 Mar 2015 17:45:55 +0000 (13:45 -0400)]
Add note about local documentation installation

Fixes #23244

9 years agoImprove -Z unstable-options diagnostics and avoid an ICE
Ryan Prichard [Wed, 11 Mar 2015 08:42:00 +0000 (01:42 -0700)]
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

9 years agoadding latest bitrig snapshot manually
Dave Huseby [Tue, 10 Mar 2015 17:59:46 +0000 (10:59 -0700)]
adding latest bitrig snapshot manually

9 years agodisabling jemalloc on bitrig
Dave Huseby [Tue, 10 Mar 2015 17:20:05 +0000 (10:20 -0700)]
disabling jemalloc on bitrig

9 years agoRemove inline silliness from debug builders
Steven Fackler [Wed, 11 Mar 2015 04:33:04 +0000 (21:33 -0700)]
Remove inline silliness from debug builders

Turns out it's basically a wash, codegen wise.

9 years agoAuto merge of #23256 - apasel422:bound, r=alexcrichton
bors [Wed, 11 Mar 2015 04:07:16 +0000 (04:07 +0000)]
Auto merge of #23256 - apasel422:bound, r=alexcrichton

9 years agoFix unstable span checks
Steven Fackler [Wed, 11 Mar 2015 02:47:57 +0000 (19:47 -0700)]
Fix unstable span checks

9 years agoFix markdown bullet points in function docs
Corey Farwell [Wed, 11 Mar 2015 02:47:08 +0000 (22:47 -0400)]
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

9 years agoAuto merge of #23251 - tbu-:pr_rm_core_str_checked_add, r=alexcrichton
bors [Wed, 11 Mar 2015 01:39:49 +0000 (01:39 +0000)]
Auto merge of #23251 - tbu-:pr_rm_core_str_checked_add, r=alexcrichton

9 years agoRemove ProcType and ProcExp
Guillaume Gomez [Tue, 10 Mar 2015 23:09:42 +0000 (00:09 +0100)]
Remove ProcType and ProcExp

9 years agoAuto merge of #23126 - alexcrichton:char-third-pass, r=aturon
bors [Tue, 10 Mar 2015 22:45:10 +0000 (22:45 +0000)]
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

9 years agostd: Stabilize more of the `char` module
Alex Crichton [Fri, 6 Mar 2015 02:23:57 +0000 (18:23 -0800)]
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]

9 years agoRemove proc keyword
Guillaume Gomez [Sat, 7 Mar 2015 23:58:45 +0000 (00:58 +0100)]
Remove proc keyword

9 years agostd: Stabilize slice::from_raw_parts
Alex Crichton [Tue, 10 Mar 2015 20:45:08 +0000 (13:45 -0700)]
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`

9 years agoAuto merge of #23249 - tbu-:pr_rm_core_str_macros, r=alexcrichton
bors [Tue, 10 Mar 2015 20:20:15 +0000 (20:20 +0000)]
Auto merge of #23249 - tbu-:pr_rm_core_str_macros, r=alexcrichton

9 years agoconfigure: have --enable-debug set -C debug-assertions=on so `debug!()` works again
Cody P Schafer [Mon, 9 Mar 2015 20:33:48 +0000 (16:33 -0400)]
configure: have --enable-debug set -C debug-assertions=on so `debug!()` works again

9 years agoderive common traits for `collections::Bound`
Andrew Paseltiner [Tue, 10 Mar 2015 17:50:35 +0000 (13:50 -0400)]
derive common traits for `collections::Bound`

9 years agoAuto merge of #23250 - liigo:plain-summary-line, r=alexcrichton
bors [Tue, 10 Mar 2015 17:20:43 +0000 (17:20 +0000)]
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

9 years agoAuto merge of #23028 - Munksgaard:get_attrs_opt, r=eddyb
bors [Tue, 10 Mar 2015 14:50:40 +0000 (14:50 +0000)]
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.

9 years agoget_attrs: use tcx.map.attrs
Philip Munksgaard [Wed, 4 Mar 2015 14:47:28 +0000 (15:47 +0100)]
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.

9 years agowith_attrs -> attrs
Philip Munksgaard [Fri, 6 Mar 2015 17:06:05 +0000 (18:06 +0100)]
with_attrs -> attrs

We don't need to take a closure, instead just return the list of attributes.

9 years agoRemove unneeded `saturating_add`
Tobias Bucher [Tue, 10 Mar 2015 13:18:24 +0000 (14:18 +0100)]
Remove unneeded `saturating_add`

9 years agorustdoc: get back 'plain summary line' in sidebar
Liigo Zhuang [Tue, 10 Mar 2015 12:55:09 +0000 (20:55 +0800)]
rustdoc: get back 'plain summary line' in sidebar

this feature was broken by mistake some days ago: @2b11a80

9 years agoRemove unneeded macro witchery
Tobias Bucher [Tue, 10 Mar 2015 11:06:44 +0000 (12:06 +0100)]
Remove unneeded macro witchery

9 years agoAuto merge of #23248 - Manishearth:rollup, r=Manishearth
bors [Tue, 10 Mar 2015 11:53:54 +0000 (11:53 +0000)]
Auto merge of #23248 - Manishearth:rollup, r=Manishearth

9 years agoPurge `isize` from `core::iter`
Tobias Bucher [Tue, 10 Mar 2015 10:36:11 +0000 (11:36 +0100)]
Purge `isize` from `core::iter`

9 years agoRollup merge of #23231 - killercup:patch-7, r=Manishearth
Manish Goregaokar [Tue, 10 Mar 2015 10:34:23 +0000 (16:04 +0530)]
Rollup merge of #23231 - killercup:patch-7, r=Manishearth

 Fixes #23230.

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

r? @steveklabnik

9 years agoRollup merge of #23236 - dhuseby:master, r=alexcrichton
Manish Goregaokar [Tue, 10 Mar 2015 09:30:00 +0000 (15:00 +0530)]
Rollup merge of #23236 - dhuseby:master, r=alexcrichton

 this fixes the issue the bitrig autobuilder is running into.

9 years agoRollup merge of #23226 - pnkfelix:add-tests-for-some-feature-gates, r=alexcrichton
Manish Goregaokar [Tue, 10 Mar 2015 09:29:53 +0000 (14:59 +0530)]
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.)

9 years agoRollup merge of #23195 - steveklabnik:gh19808, r=alexcrichton
Manish Goregaokar [Tue, 10 Mar 2015 09:29:46 +0000 (14:59 +0530)]
Rollup merge of #23195 - steveklabnik:gh19808, r=alexcrichton

 Fixes #19808

9 years agoRollup merge of #23185 - steveklabnik:gh20051, r=alexcrichton
Manish Goregaokar [Tue, 10 Mar 2015 09:29:39 +0000 (14:59 +0530)]
Rollup merge of #23185 - steveklabnik:gh20051, r=alexcrichton

 Fixes #20051

9 years agoRollup merge of #23125 - danburkert:master, r=brson
Manish Goregaokar [Tue, 10 Mar 2015 09:29:31 +0000 (14:59 +0530)]
Rollup merge of #23125 - danburkert:master, r=brson

9 years agoRollup merge of #22832 - anguslees:manpage-pedantry, r=brson
Manish Goregaokar [Tue, 10 Mar 2015 09:29:20 +0000 (14:59 +0530)]
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.

9 years agoRollup merge of #23105 - alexcrichton:rand-wrapping, r=brson
Manish Goregaokar [Tue, 10 Mar 2015 09:29:13 +0000 (14:59 +0530)]
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!

9 years agoRollup merge of #23201 - pnkfelix:fsk-struct-ooe-23112, r=nikomatsakis
Manish Goregaokar [Tue, 10 Mar 2015 09:29:07 +0000 (14:59 +0530)]
Rollup merge of #23201 - pnkfelix:fsk-struct-ooe-23112, r=nikomatsakis

 For FRU, eval field exprs (into scratch temps) before base expr

Fix #23112.

9 years agoSwitch derive(Debug) to use the debug builders
Steven Fackler [Sun, 8 Mar 2015 03:36:36 +0000 (19:36 -0800)]
Switch derive(Debug) to use the debug builders

9 years agoRestructure debug builders to minimize codegen
Steven Fackler [Sat, 7 Mar 2015 05:46:30 +0000 (21:46 -0800)]
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.

9 years agoImplement RFC 640
Steven Fackler [Sat, 7 Mar 2015 05:16:44 +0000 (21:16 -0800)]
Implement RFC 640

9 years agoAuto merge of #23105 - alexcrichton:rand-wrapping, r=brson
bors [Tue, 10 Mar 2015 05:29:10 +0000 (05:29 +0000)]
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!

9 years agorand: Use wrapping operations everywhere
Alex Crichton [Fri, 6 Mar 2015 06:16:54 +0000 (22:16 -0800)]
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!

9 years agoAuto merge of #23186 - steveklabnik:gh14686, r=alexcrichton
bors [Tue, 10 Mar 2015 03:03:17 +0000 (03:03 +0000)]
Auto merge of #23186 - steveklabnik:gh14686, r=alexcrichton

Fixes #14686

9 years agoAdd support for target-cpu=native
Julian Orth [Tue, 10 Mar 2015 00:46:45 +0000 (01:46 +0100)]
Add support for target-cpu=native

9 years agoAuto merge of #23038 - nikomatsakis:issue-22978-defaulted-coherence, r=flaper87
bors [Mon, 9 Mar 2015 23:27:14 +0000 (23:27 +0000)]
Auto merge of #23038 - nikomatsakis:issue-22978-defaulted-coherence, r=flaper87

Fixes #22978.

r? @FlaPer87

9 years agofixing configure so that it works on bitrig/openbsd
Dave Huseby [Mon, 9 Mar 2015 23:25:50 +0000 (16:25 -0700)]
fixing configure so that it works on bitrig/openbsd

9 years agoAuto merge of #22561 - richo:as_slice-as_str, r=Manishearth
bors [Mon, 9 Mar 2015 21:02:50 +0000 (21:02 +0000)]
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.

9 years agoShrink table in the reference
Steve Klabnik [Sun, 8 Mar 2015 14:08:07 +0000 (10:08 -0400)]
Shrink table in the reference

Fixes #20051

9 years agoAdd note about pre/post increment to the design FAQ.
Steve Klabnik [Sun, 8 Mar 2015 14:34:00 +0000 (10:34 -0400)]
Add note about pre/post increment to the design FAQ.

Fixes #14686

9 years agoExplain super in the crates guide.
Steve Klabnik [Sun, 8 Mar 2015 17:58:14 +0000 (13:58 -0400)]
Explain super in the crates guide.

Fixes #19808

9 years agoRustdoc: Add Headline Style for `tymethod`
Pascal Hertleif [Mon, 9 Mar 2015 19:28:36 +0000 (20:28 +0100)]
Rustdoc: Add Headline Style for `tymethod`

Fixes #23230

9 years agoAddress nit by @flaper87
Niko Matsakis [Mon, 9 Mar 2015 18:39:31 +0000 (14:39 -0400)]
Address nit by @flaper87

9 years agoAuto merge of #21824 - sfackler:should_panic, r=alexcrichton
bors [Mon, 9 Mar 2015 18:32:16 +0000 (18:32 +0000)]
Auto merge of #21824 - sfackler:should_panic, r=alexcrichton

9 years agoAdd tests checking that a number of feature gates are gating their features.
Felix S. Klock II [Mon, 9 Mar 2015 18:18:43 +0000 (19:18 +0100)]
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.

9 years agoRename #[should_fail] to #[should_panic]
Steven Fackler [Sat, 31 Jan 2015 23:08:25 +0000 (15:08 -0800)]
Rename #[should_fail] to #[should_panic]

9 years agoAuto merge of #23219 - Manishearth:rollup, r=Manishearth
bors [Mon, 9 Mar 2015 16:02:29 +0000 (16:02 +0000)]
Auto merge of #23219 - Manishearth:rollup, r=Manishearth

9 years agofix rmake
Manish Goregaokar [Mon, 9 Mar 2015 15:34:13 +0000 (21:04 +0530)]
fix rmake

9 years agodoc: Fix extraneous as_slice()'s in docstrings
Richo Healey [Sun, 8 Mar 2015 06:30:12 +0000 (22:30 -0800)]
doc: Fix extraneous as_slice()'s in docstrings

9 years agoremove uses of as_slice where deref coercions can be used
Richo Healey [Sun, 8 Mar 2015 02:08:48 +0000 (18:08 -0800)]
remove uses of as_slice where deref coercions can be used

9 years agoFor FRU, evaluate field expressions (into scratch temps) before base expression.
Felix S. Klock II [Sun, 8 Mar 2015 19:46:04 +0000 (20:46 +0100)]
For FRU, evaluate field expressions (into scratch temps) before base expression.

Fix #23112.