]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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 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 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.

9 years agoAuto merge of #23209 - richo:normalize-test-names, r=alexcrichton
bors [Mon, 9 Mar 2015 13:36:13 +0000 (13:36 +0000)]
Auto merge of #23209 - richo:normalize-test-names, r=alexcrichton

Motivated by the test output not lining up when it could, I normalized all of the issue-* tests.

While doing it, I found some lexer tests that could be unignored and fixed an int -> isize.

9 years agoRollup merge of #23203 - eLobato:patch-1, r=Manishearth
Manish Goregaokar [Mon, 9 Mar 2015 11:00:58 +0000 (16:30 +0530)]
Rollup merge of #23203 - eLobato:patch-1, r=Manishearth

 A minor change to avoid making the reader think 'where is this'.

9 years agoRollup merge of #23202 - shepmaster:intro-threads-not-concurrent, r=steveklabnik
Manish Goregaokar [Mon, 9 Mar 2015 11:00:51 +0000 (16:30 +0530)]
Rollup merge of #23202 - shepmaster:intro-threads-not-concurrent, r=steveklabnik

 If we end the `scoped` call with a semicolon, the `JoinGuard` will be
dropped and not returned from the `map`. The thread will start up and
we immediately block, making for a very expensive sequential loop.

9 years agoRollup merge of #23187 - steveklabnik:gh17481, r=Manishearth
Manish Goregaokar [Mon, 9 Mar 2015 11:00:44 +0000 (16:30 +0530)]
Rollup merge of #23187 - steveklabnik:gh17481, r=Manishearth

 Fixes #17481

9 years agoRollup merge of #23183 - steveklabnik:gh22572, r=Manishearth
Manish Goregaokar [Mon, 9 Mar 2015 11:00:37 +0000 (16:30 +0530)]
Rollup merge of #23183 - steveklabnik:gh22572, r=Manishearth

 They're opt-in now.

Fixes #22572

9 years agoRollup merge of #23144 - FuGangqiang:doc_err, r=alexcrichton
Manish Goregaokar [Mon, 9 Mar 2015 11:00:31 +0000 (16:30 +0530)]
Rollup merge of #23144 - FuGangqiang:doc_err, r=alexcrichton

 in the [doc page](http://doc.rust-lang.org/std/num/index.html), `FromStrRadix::from_str_radix` is not quoted.

9 years agoRollup merge of #23210 - richo:rust-o, r=alexcrichton
Manish Goregaokar [Mon, 9 Mar 2015 11:00:26 +0000 (16:30 +0530)]
Rollup merge of #23210 - richo:rust-o, r=alexcrichton

 rustc will ICE if you specify an outfile path that is bare without a
directory. As a workaround, before this -o ./foo will work

It wasn't clear to me where I could put a test that actually invokes rustc from a shell, although I think I can add doctests to that machinery in librustc_driver that will arrange for this to be called with arguments that would trigger the ICE

9 years agoRollup merge of #23209 - richo:normalize-test-names, r=alexcrichton
Manish Goregaokar [Mon, 9 Mar 2015 11:00:20 +0000 (16:30 +0530)]
Rollup merge of #23209 - richo:normalize-test-names, r=alexcrichton

 Motivated by the test output not lining up when it could, I normalized all of the issue-* tests.

While doing it, I found some lexer tests that could be unignored and fixed an int -> isize.

9 years agoAuto merge of #23200 - Manishearth:rollup, r=Manishearth
bors [Mon, 9 Mar 2015 07:01:09 +0000 (07:01 +0000)]
Auto merge of #23200 - Manishearth:rollup, r=Manishearth

9 years agonormalize the current directory as Path{""}
Richo Healey [Mon, 9 Mar 2015 05:21:36 +0000 (22:21 -0700)]
normalize the current directory as Path{""}

9 years agoAdd a test for a bare outfile param to rustc
Richo Healey [Mon, 9 Mar 2015 01:54:59 +0000 (18:54 -0700)]
Add a test for a bare outfile param to rustc

9 years agorustc: Fix an ICE when -o bare-path
Richo Healey [Mon, 9 Mar 2015 01:10:33 +0000 (18:10 -0700)]
rustc: Fix an ICE when -o bare-path

rustc will ICE if you specify an outfile path that is bare without a
directory. As a workaround, before this -o ./foo will work

9 years agoFix doctest (fixup #23188)
Manish Goregaokar [Mon, 9 Mar 2015 04:46:34 +0000 (10:16 +0530)]
Fix doctest (fixup #23188)

9 years agoAuto merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis
bors [Mon, 9 Mar 2015 04:35:44 +0000 (04:35 +0000)]
Auto merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis

9 years agoAuto merge of #23153 - Manishearth:snap, r=alexcrichton
bors [Mon, 9 Mar 2015 00:17:49 +0000 (00:17 +0000)]
Auto merge of #23153 - Manishearth:snap, r=alexcrichton

Needed so that #21824 can land

9 years agotest: Fix depcrecated alias for int
Richo Healey [Sun, 8 Mar 2015 23:25:01 +0000 (16:25 -0700)]
test: Fix depcrecated alias for int

9 years agotest: Test the lexer now that #15879 is closed
Richo Healey [Sun, 8 Mar 2015 23:23:55 +0000 (16:23 -0700)]
test: Test the lexer now that #15879 is closed

9 years agoAuto merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik
bors [Sun, 8 Mar 2015 21:51:59 +0000 (21:51 +0000)]
Auto merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik

I had to fix up some PRs:

* https://github.com/rust-lang/rust/pull/22976
* https://github.com/rust-lang/rust/pull/22945
* https://github.com/rust-lang/rust/pull/22845

9 years agoLink README to license & copyright files
Daniel Lobato García [Sun, 8 Mar 2015 21:37:23 +0000 (23:37 +0200)]
Link README to license & copyright files

A minor change to avoid making the reader think 'where is this'.

9 years agoMake concurrent examples actually run concurrently
Jake Goulding [Sun, 8 Mar 2015 20:10:19 +0000 (16:10 -0400)]
Make concurrent examples actually run concurrently

If we end the `scoped` call with a semicolon, the `JoinGuard` will be
dropped and not returned from the `map`. The thread will start up and
we immediately block, making for a very expensive sequential loop.

9 years agoUpdate example that uses deprecated Thread::scoped
Jake Goulding [Sun, 8 Mar 2015 20:09:09 +0000 (16:09 -0400)]
Update example that uses deprecated Thread::scoped

9 years agoRollup merge of #23182 - steveklabnik:gh22610, r=Manishearth
Manish Goregaokar [Sun, 8 Mar 2015 19:05:38 +0000 (00:35 +0530)]
Rollup merge of #23182 - steveklabnik:gh22610, r=Manishearth

 Fixes #22610

9 years agoRollup merge of #23190 - steveklabnik:fix_as_slice, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:43:33 +0000 (00:13 +0530)]
Rollup merge of #23190 - steveklabnik:fix_as_slice, r=alexcrichton

9 years agoRollup merge of #23188 - steveklabnik:gh18787, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:41:48 +0000 (00:11 +0530)]
Rollup merge of #23188 - steveklabnik:gh18787, r=alexcrichton

 Fixes #18787

9 years agoRollup merge of #23184 - steveklabnik:gh22553, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:40:06 +0000 (00:10 +0530)]
Rollup merge of #23184 - steveklabnik:gh22553, r=alexcrichton

 Fixes #22553

9 years agoRollup merge of #23181 - steveklabnik:gh22637, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:39:56 +0000 (00:09 +0530)]
Rollup merge of #23181 - steveklabnik:gh22637, r=alexcrichton

 Fixes #22637

9 years agoRollup merge of #23180 - steveklabnik:gh23052, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:38:03 +0000 (00:08 +0530)]
Rollup merge of #23180 - steveklabnik:gh23052, r=alexcrichton

 Fixes #23052

9 years agoRollup merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis
Manish Goregaokar [Sun, 8 Mar 2015 18:36:20 +0000 (00:06 +0530)]
Rollup merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis

9 years agoRollup merge of #22917 - randfur:master, r=steveklabnik
Manish Goregaokar [Sun, 8 Mar 2015 18:36:03 +0000 (00:06 +0530)]
Rollup merge of #22917 - randfur:master, r=steveklabnik

 The docs currently define `array_expr`s as:

    array_expr : '[' \"mut\" ? vec_elems? ']' ;
    array_elems : [expr [',' expr]*] | [expr ',' \"..\" expr] ;

`vec_elems` is not defined anywhere else so it is probably a typo for `array_elems`.

9 years agoRollup merge of #23153 - Manishearth:snap, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:34:20 +0000 (00:04 +0530)]
Rollup merge of #23153 - Manishearth:snap, r=alexcrichton

 Needed so that #21824 can land

9 years agoRollup merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik
Manish Goregaokar [Sun, 8 Mar 2015 18:32:37 +0000 (00:02 +0530)]
Rollup merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik

 I had to fix up some PRs:

* https://github.com/rust-lang/rust/pull/22976
* https://github.com/rust-lang/rust/pull/22945
* https://github.com/rust-lang/rust/pull/22845

9 years agoRollup merge of #22984 - carols10cents:tests-for-float, r=huonw
Manish Goregaokar [Sun, 8 Mar 2015 18:32:28 +0000 (00:02 +0530)]
Rollup merge of #22984 - carols10cents:tests-for-float, r=huonw

 Building on #22076, I've added some tests for stable methods in f32 and f64 that didn't have any before.

Please let me know if there are any improvements I can make, and I am happy to make them! :mailbox_with_mail:

9 years agoAuto merge of #22984 - carols10cents:tests-for-float, r=huonw
bors [Sun, 8 Mar 2015 17:59:20 +0000 (17:59 +0000)]
Auto merge of #22984 - carols10cents:tests-for-float, r=huonw

Building on #22076, I've added some tests for stable methods in f32 and f64 that didn't have any before.

Please let me know if there are any improvements I can make, and I am happy to make them! :mailbox_with_mail:

9 years agoSmall fixes to example to be more idiomatic
Steve Klabnik [Sun, 8 Mar 2015 16:07:58 +0000 (12:07 -0400)]
Small fixes to example to be more idiomatic

9 years agoAdd examples of all three syntaxes in method syntax chapter of trpl
Steve Klabnik [Sun, 8 Mar 2015 14:49:13 +0000 (10:49 -0400)]
Add examples of all three syntaxes in method syntax chapter of trpl

Fixes #18787

9 years agoremove confusing language about casting types
Steve Klabnik [Sun, 8 Mar 2015 14:35:58 +0000 (10:35 -0400)]
remove confusing language about casting types

Fixes #17481

9 years agoMove 'more strings' after ownership
Steve Klabnik [Sun, 8 Mar 2015 13:34:03 +0000 (09:34 -0400)]
Move 'more strings' after ownership

Fixes #22553

9 years agoClean up references to opt-out traits
Steve Klabnik [Sun, 8 Mar 2015 13:32:18 +0000 (09:32 -0400)]
Clean up references to opt-out traits

They're opt-in now.

Fixes #22572

9 years agoremove 'generally' to reduce confusion
Steve Klabnik [Sun, 8 Mar 2015 13:29:47 +0000 (09:29 -0400)]
remove 'generally' to reduce confusion

Fixes #22610

9 years agoMention deref coercions in the String guide.
Steve Klabnik [Sun, 8 Mar 2015 13:23:44 +0000 (09:23 -0400)]
Mention deref coercions in the String guide.

Fixes #22637

9 years agoRemove reference to NoSend in concurrency chapter of the book
Steve Klabnik [Sun, 8 Mar 2015 13:15:06 +0000 (09:15 -0400)]
Remove reference to NoSend in concurrency chapter of the book

Fixes #23052

9 years agoAdd default methods to trait documentation
Steve Klabnik [Wed, 4 Mar 2015 22:13:49 +0000 (17:13 -0500)]
Add default methods to trait documentation

9 years agoFix array syntax in comment.
Amol Mundayoor [Mon, 23 Feb 2015 21:06:20 +0000 (13:06 -0800)]
Fix array syntax in comment.

Fixes #22721.

9 years agoAdd description of fold function arguments.
Łukasz Niemier [Mon, 2 Mar 2015 21:31:01 +0000 (22:31 +0100)]
Add description of fold function arguments.

9 years agoAdds an example for PhantomData<T>.
Pyry Kontio [Mon, 2 Mar 2015 04:14:45 +0000 (06:14 +0200)]
Adds an example for PhantomData<T>.

9 years agoAuto merge of #23167 - rprichard:fix-plugin-rustbook, r=steveklabnik
bors [Sun, 8 Mar 2015 12:10:42 +0000 (12:10 +0000)]
Auto merge of #23167 - rprichard:fix-plugin-rustbook, r=steveklabnik

 * "let mut text" was previously of &String type.  Now it is of &str type.

 * Update the slicing syntax.  Both &text[] and text.slice_from() evaluate
   to a &str.

 * We were passing a u32 to expr_usize.  Call expr_u32 instead.

r? @steveklabnik
Fixes #23166

9 years agoAuto merge of #23127 - alexcrichton:bench-wrapping, r=brson
bors [Sun, 8 Mar 2015 08:34:56 +0000 (08:34 +0000)]
Auto merge of #23127 - alexcrichton:bench-wrapping, r=brson

Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.

9 years agoFix #23166. Get the Compiler Plugins example compiling again.
Ryan Prichard [Sun, 8 Mar 2015 06:57:51 +0000 (22:57 -0800)]
Fix #23166. Get the Compiler Plugins example compiling again.

 * "let met text" was previously of &String type.  Now it is of &str type.

 * Update the slicing syntax.  Both &text[] and text.slice_from() evaluate
   to a &str.

 * We were passing a u32 to expr_usize.  Call expr_u32 instead.

9 years agoAuto merge of #23160 - rprichard:fix-numtest-assert, r=brson
bors [Sun, 8 Mar 2015 05:20:17 +0000 (05:20 +0000)]
Auto merge of #23160 - rprichard:fix-numtest-assert, r=brson

The previous code was passing "true" as the panic! error value.

9 years agoAuto merge of #23145 - semarie:openbsd-5806, r=alexcrichton
bors [Sun, 8 Mar 2015 01:43:22 +0000 (01:43 +0000)]
Auto merge of #23145 - semarie:openbsd-5806, r=alexcrichton

follow freebsd due to last deprecation of `std::old_io::fs`

9 years agoUse assert_eq! rather than assert!
Ryan Prichard [Sun, 8 Mar 2015 00:53:01 +0000 (16:53 -0800)]
Use assert_eq! rather than assert!

The previous code was passing "true" as the panic! error value.

9 years agoAuto merge of #23143 - 5paceToast:cygwin-6.3, r=alexcrichton
bors [Sat, 7 Mar 2015 21:52:20 +0000 (21:52 +0000)]
Auto merge of #23143 - 5paceToast:cygwin-6.3, r=alexcrichton

Not checking for 32/64 bit, since `uname -s` no longer contains an indicator (and `uname -m` returns correct results)

9 years agoRegister new snapshots (270a677)
Manish Goregaokar [Sat, 7 Mar 2015 18:59:15 +0000 (00:29 +0530)]
Register new snapshots (270a677)

9 years agoAuto merge of #23137 - kmcallister:derive-sugar, r=sfackler
bors [Sat, 7 Mar 2015 18:39:17 +0000 (18:39 +0000)]
Auto merge of #23137 - kmcallister:derive-sugar, r=sfackler

This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase.

If the `custom_derive` feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. `#[derive_Clone]` directly, so this does not change the stable language.

To make this effective, we now check gated attributes both before and after macro expansion. This uncovered a number of tests that were missing feature gates.

This PR also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a

    [breaking-change]

r? @sfackler

9 years agoAuto merge of #23146 - lifthrasiir:oh-noes-i-broke-rustdoc-sidebars-what-to-do-now...
bors [Sat, 7 Mar 2015 14:08:29 +0000 (14:08 +0000)]
Auto merge of #23146 - lifthrasiir:oh-noes-i-broke-rustdoc-sidebars-what-to-do-now, r=Manishearth

We require the *deferred* loading, not just an opportunistic asynchronous loading. (Yes, that was my oversight, as I only checked it locally...) I think `<script defer>` is safe to use, according to <http://caniuse.com/#feat=script-defer>.

9 years agorustdoc: Fixed an asynchronous loading of rustdoc sidebars.
Kang Seonghoon [Sat, 7 Mar 2015 14:01:31 +0000 (23:01 +0900)]
rustdoc: Fixed an asynchronous loading of rustdoc sidebars.

We require the *deferred* loading, not just an opportunistic
asynchronous loading. I think `<script defer>` is safe to use,
according to <http://caniuse.com/#feat=script-defer>.

9 years agodisable test for issue-5806 on openbsd
Sébastien Marie [Sat, 7 Mar 2015 12:40:35 +0000 (13:40 +0100)]
disable test for issue-5806 on openbsd

follow freebsd due to last deprecation of std::old_io::fs

9 years agoindicate from_str_radix is code
FuGangqiang [Sat, 7 Mar 2015 10:03:38 +0000 (18:03 +0800)]
indicate from_str_radix is code

9 years agoAuto merge of #22549 - steveklabnik:doc_documentation, r=huonw
bors [Sat, 7 Mar 2015 10:01:13 +0000 (10:01 +0000)]
Auto merge of #22549 - steveklabnik:doc_documentation, r=huonw

This chapter covers writing documentation in depth.

Fixes #4361
Fixes #12862
Fixes #14070
Fixes #14967

9 years agoadded support for CYGWIN 6.3 into configure script
Chloe [Sat, 7 Mar 2015 08:44:02 +0000 (03:44 -0500)]
added support for CYGWIN 6.3 into configure script

Not checking for 32/64 bit, since `uname -s` no longer contains an indicator (and `uname -m` returns correct results)