Commit Graph

39982 Commits

Author SHA1 Message Date
bors
91bdf23f50 Auto merge of #23153 - Manishearth:snap, r=alexcrichton
Needed so that #21824 can land
2015-03-09 00:17:49 +00:00
Richo Healey
58a288d323 test: Fix depcrecated alias for int 2015-03-08 17:10:32 -07:00
Richo Healey
5b7bfc88c6 test: Test the lexer now that #15879 is closed 2015-03-08 17:10:32 -07:00
bors
d71239f628 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
2015-03-08 21:51:59 +00:00
Daniel Lobato García
13d5e5712a Link README to license & copyright files
A minor change to avoid making the reader think 'where is this'.
2015-03-08 23:37:23 +02:00
Jake Goulding
b426a242e3 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.
2015-03-08 16:12:07 -04:00
Jake Goulding
a6ebd26208 Update example that uses deprecated Thread::scoped 2015-03-08 16:12:07 -04:00
Manish Goregaokar
684cd77222 Rollup merge of #23182 - steveklabnik:gh22610, r=Manishearth
Fixes #22610
2015-03-09 00:35:38 +05:30
Manish Goregaokar
9f851a734b Rollup merge of #23190 - steveklabnik:fix_as_slice, r=alexcrichton 2015-03-09 00:13:33 +05:30
Manish Goregaokar
10960d3043 Rollup merge of #23188 - steveklabnik:gh18787, r=alexcrichton
Fixes #18787
2015-03-09 00:11:48 +05:30
Manish Goregaokar
b515b4e28a Rollup merge of #23184 - steveklabnik:gh22553, r=alexcrichton
Fixes #22553
2015-03-09 00:10:06 +05:30
Manish Goregaokar
c7d5354567 Rollup merge of #23181 - steveklabnik:gh22637, r=alexcrichton
Fixes #22637
2015-03-09 00:09:56 +05:30
Manish Goregaokar
d1ac69ce72 Rollup merge of #23180 - steveklabnik:gh23052, r=alexcrichton
Fixes #23052
2015-03-09 00:08:03 +05:30
Manish Goregaokar
ea8434f7ee Rollup merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis 2015-03-09 00:06:20 +05:30
Manish Goregaokar
1149b4d08d 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`.
2015-03-09 00:06:03 +05:30
Manish Goregaokar
f7c1fce144 Rollup merge of #23153 - Manishearth:snap, r=alexcrichton
Needed so that #21824 can land
2015-03-09 00:04:20 +05:30
Manish Goregaokar
0e0bb8a128 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
2015-03-09 00:02:37 +05:30
Manish Goregaokar
509c6fc9c1 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! 📬
2015-03-09 00:02:28 +05:30
bors
b775541aaf 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! 📬
2015-03-08 17:59:20 +00:00
Steve Klabnik
6c6c23f9df Small fixes to example to be more idiomatic 2015-03-08 12:07:58 -04:00
Steve Klabnik
044b3bf2d7 Add examples of all three syntaxes in method syntax chapter of trpl
Fixes #18787
2015-03-08 10:49:13 -04:00
Steve Klabnik
1014b22b31 remove confusing language about casting types
Fixes #17481
2015-03-08 10:35:58 -04:00
Steve Klabnik
d65064da34 Move 'more strings' after ownership
Fixes #22553
2015-03-08 09:34:03 -04:00
Steve Klabnik
9653a521b5 Clean up references to opt-out traits
They're opt-in now.

Fixes #22572
2015-03-08 09:32:18 -04:00
Steve Klabnik
5b0acb5846 remove 'generally' to reduce confusion
Fixes #22610
2015-03-08 09:29:47 -04:00
Steve Klabnik
ce223a62f1 Mention deref coercions in the String guide.
Fixes #22637
2015-03-08 09:25:50 -04:00
Steve Klabnik
e56fcbcd99 Remove reference to NoSend in concurrency chapter of the book
Fixes #23052
2015-03-08 09:15:06 -04:00
Steve Klabnik
de44baac8b Add default methods to trait documentation 2015-03-08 08:55:17 -04:00
Amol Mundayoor
45c397d738 Fix array syntax in comment.
Fixes #22721.
2015-03-08 08:39:47 -04:00
Łukasz Niemier
3ad1c83540 Add description of fold function arguments. 2015-03-08 08:38:27 -04:00
Pyry Kontio
6dcc0e5631 Adds an example for PhantomData<T>. 2015-03-08 08:38:10 -04:00
bors
ead9ab84b8 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
2015-03-08 12:10:42 +00:00
bors
b2f09c1165 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.
2015-03-08 08:34:56 +00:00
Ryan Prichard
52124d7c80 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.
2015-03-07 22:58:28 -08:00
bors
d30609ffd7 Auto merge of #23160 - rprichard:fix-numtest-assert, r=brson
The previous code was passing "true" as the panic! error value.
2015-03-08 05:20:17 +00:00
bors
97ca2a1ee9 Auto merge of #23145 - semarie:openbsd-5806, r=alexcrichton
follow freebsd due to last deprecation of `std::old_io::fs`
2015-03-08 01:43:22 +00:00
Ryan Prichard
4a0c7ebc87 Use assert_eq! rather than assert!
The previous code was passing "true" as the panic! error value.
2015-03-07 16:53:01 -08:00
bors
2fc8b1e7c4 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)
2015-03-07 21:52:20 +00:00
Manish Goregaokar
f81f8d81d3 Register new snapshots (270a677) 2015-03-08 00:36:56 +05:30
bors
668c647408 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
2015-03-07 18:39:17 +00:00
bors
b8c6eb179e 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>.
2015-03-07 14:08:29 +00:00
Kang Seonghoon
a3e4a1617b 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>.
2015-03-07 23:01:31 +09:00
Sébastien Marie
17d5acc4a0 disable test for issue-5806 on openbsd
follow freebsd due to last deprecation of std::old_io::fs
2015-03-07 13:40:35 +01:00
FuGangqiang
ae7dce674e indicate from_str_radix is code 2015-03-07 18:03:38 +08:00
bors
36cd65f786 Auto merge of #22549 - steveklabnik:doc_documentation, r=huonw
This chapter covers writing documentation in depth.

Fixes #4361
Fixes #12862
Fixes #14070
Fixes #14967
2015-03-07 10:01:13 +00:00
Chloe
9f28f7249f 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)
2015-03-07 03:44:02 -05:00
bors
098daa1d7f Auto merge of #23132 - alexcrichton:remove-deprecated-unicode-escapes, r=huonw
These have been deprecated for quite some time, so we should be good to remove
them now.
2015-03-07 06:48:45 +00:00
bors
270a677d4d Auto merge of #23107 - Manishearth:rollup, r=alexcrichton 2015-03-07 03:28:03 +00:00
Alex Crichton
aed31ee08e Test fixes and rebase conflicts 2015-03-06 19:27:36 -08:00
Keegan McAllister
491054f08e Make #[derive(Anything)] into sugar for #[derive_Anything]
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.

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

    [breaking-change]
2015-03-06 18:20:16 -08:00