Commit Graph

45279 Commits

Author SHA1 Message Date
Brian Anderson
4aaf1beffb Fix tests 2015-07-30 15:18:34 -07:00
bors
66109d2c38 Auto merge of #27406 - alexcrichton:fix-no-run, r=Gankro
Needs the underscore for rustdoc to not actually run it.
2015-07-30 22:06:27 +00:00
Brian Anderson
4d218d924f More 1.2 relnotes 2015-07-30 14:32:08 -07:00
Alex Crichton
127e63c63b tarpl: Change norun to no_run
Needs the underscore for rustdoc to not actually run it.
2015-07-30 14:32:02 -07:00
Leif Arne Storset
427736931b Copyedit generics.md and traits.md
Squashed at reviewer's request:

Add heading at the end of the introductory material
Spice up introductory paragraphs a bit
Use quotes instead of <code> for phrase
Remove "other" in "other restrictions" (it's not obvious that any other
restrictions have been mentioned)
"Default methods" is a second-level heading, but is not a subsection of
"Where clause"
Reword "Default methods" introduction: it's not the "last feature" on
this page
2015-07-30 21:49:14 +02:00
Leif Arne Storset
556b0815d7 Using operator traits in generic structs 2015-07-30 21:49:13 +02:00
Leif Arne Storset
0e92165eaf Show impl<T>
This includes a new example with Rectangle, instead of reusing HasArea,
because fn area would require the Mul trait, and the added complexity of
that would be better left for the Operators and Overloading chapter.

Squashed at reviewer's request: Move teaser for trait bounds to bottom
2015-07-30 21:48:25 +02:00
bors
6edc994021 Auto merge of #27388 - alexcrichton:remove-curious-inner, r=brson
This isn't actually necessary any more with the advent of `$crate` and changes
in the compiler to expand macros to `::core::$foo` in the context of a
`#![no_std]` crate.

The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-30 18:42:32 +00:00
Vadim Chugunov
6112b22078 Implement Win64 eh_personality natively. 2015-07-30 11:35:16 -07:00
bors
28869d45dd Auto merge of #27399 - Gankro:race, r=alexcrichton
r? @alexcrichton
2015-07-30 16:18:32 +00:00
Alexis Beingessner
d1cf449034 Maybe ignore the explicit examples of a race condition 2015-07-30 08:53:46 -07:00
bors
dbf3a63dd7 Auto merge of #27386 - chris-morgan:ctags-stuff-update, r=alexcrichton
As there’s no C++ runtime any more there’s really no point in having anything but Rust tags being made.

I’ve also taken the liberty of excluding the compiler parts of this in the `librust%,,` pattern substitution. Whether or not this is “correct” will depend on whether you want tags for the compiler or for general use. For myself, I want it for general use.

I’m not sure how much people use the tags files anyway. I definitely do, but with Racer existing the tags files aren’t quite so necessary.
2015-07-30 13:39:08 +00:00
bors
5fcaf95676 Auto merge of #27385 - chris-morgan:core-panic-use-$crate, r=alexcrichton
I’ve been sitting on this one for ages now. Silly me, if only I had got on and submitted it earlier it’d be into the stable release by now…
2015-07-30 12:01:41 +00:00
Jonathan Hansford
c2b564557d By default
Guessing Game states that "Rust only imports a few things into every
program, the ‘prelude’". That isn't strictly true.  That is all it
imports by default and the change clarifies that point.
2015-07-30 11:58:13 +01:00
bors
87055a68c3 Auto merge of #27371 - Gankro:str-clone, r=alexcrichton
This is a minor [breaking-change], as it changes what
`boxed_str.to_owned()` does (previously it would deref to `&str` and
call `to_owned` on that to get a `String`). However `Box<str>` is such an
exceptionally rare type that this is not expected to be a serious
concern. Also a `Box<str>` can be freely converted to a `String` to
obtain the previous result anyway.
2015-07-30 10:25:23 +00:00
Tshepang Lekhonkhobe
1d3818ab7c doc: prelude nits 2015-07-30 10:45:00 +02:00
Jonathan Hansford
a4aae4552e Merge branch 'master' of https://github.com/Dangthrimble/rust 2015-07-30 09:20:24 +01:00
Jonathan Hansford
bc3c41be9f Clarifications for Hello, Cargo!
Just a few minor changes to clarify a few things for someone new to Rust
and Cargo.
2015-07-30 09:20:13 +01:00
bors
f97a82fd43 Auto merge of #27392 - pnkfelix:rename-xpretty-as-unpretty, r=jroesch
Rename the unstable option `--xpretty` to `--unpretty`

(Inspired by discussion with Gankro.)

Make sure this gets a low priority if it gets r-plussed!
2015-07-30 07:31:14 +00:00
bors
db2af71d59 Auto merge of #27174 - Gankro:rc-sat, r=alexcrichton
See https://internals.rust-lang.org/t/rc-is-unsafe-mostly-on-32-bit-targets-due-to-overflow/2120 for detailed discussion of this problem.
2015-07-30 05:54:55 +00:00
Kieran Hunt
4a5194a6d5 Removing infinite loops file 2015-07-30 07:22:21 +02:00
bors
8b9ada5997 Auto merge of #27052 - wthrowe:atomic_send, r=Gankro
I think this was just missed when `Send` and `Sync` were redone, since it seems odd to not be able to use things like `Arc<AtomicPtr>`.  If it was intentional feel free to just close this.

I used another test as a template for writing mine, so I hope I got all the headers and stuff right.
2015-07-30 04:18:50 +00:00
bors
0bc993c75b Auto merge of #26734 - Gankro:deprecate-vecmap, r=alexcrichton
VecMap doesn't really fit with the current standard library's strategy (small!).

I've mirrored the code to https://github.com/contain-rs/vec-map

but @GBGamer has already claimed the name on crates.io a couple months ago for the same purpose. It hasn't been updated since, though.

CC @rust-lang/libs
2015-07-30 02:41:14 +00:00
Alexis Beingessner
3e954a8cb2 implement Clone for Box<str>, closes #27323
This is a minor [breaking-change], as it changes what
`boxed_str.to_owned()` does (previously it would deref to `&str` and
call `to_owned` on that to get a `String`). However `Box<str>` is such an
exceptionally rare type that this is not expected to be a serious
concern. Also a `Box<str>` can be freely converted to a `String` to
obtain the previous behaviour anyway.
2015-07-29 18:43:01 -07:00
bors
4d52d7c857 Auto merge of #27032 - Gankro:tarpl, r=aturon,acrichto,arielb,pnkfelix,nrc,nmatsakis,huonw
I've been baking this out of tree for long enough. This is currently about ~2/5ths the size of TRPL. Time to get it in tree so it can be more widely maintained and scrutinized. I've preserved the whole gruesome history including various rewrites. I can definitely squash these a fair amount if desired. Some random people submitted minor fixes though, so they're mixed in.

Edit: forgot to link to rendered http://cglab.ca/~abeinges/blah/turpl/_book/

Edit2:

To streamline the review process, I'm going to break this into sections that need official "domain expert" approval:

# Summary

* [ ] references.md -- very important, needs work

* [x] Meet Safe and Unsafe: reviewed by @aturon
* [x] Data Layout: reviewed by @arielb1 
* [x] Ownership: reviewed by @aturon ( and sorta @nikomatsakis ) -- significantly updated, may need re-r
* [x] Coversions:  reviewed by @nrc 
* [x] Uninitialized Memory: reviewed by @pnkfelix 
* [x] Ownership-Oriented Resource Management: reviewed by @aturon
* [x] Unwinding: reviewed by @alexcrichton 
* [x] Concurrency: reviewed by @aturon
* [x] Implementing Vec:  r? @huonw
2015-07-30 00:56:01 +00:00
Alexis Beingessner
ddb029034b fix example code 2015-07-29 17:19:42 -07:00
Alexis Beingessner
22e2100458 make Arc mem::forget safe 2015-07-29 17:05:40 -07:00
Alexis Beingessner
1ffe3453cb make Rc mem::forget safe 2015-07-29 17:05:40 -07:00
Felix S. Klock II
e050fc21b9 Rename the unstable option --xpretty to --unpretty
(Inspired by discussion with Gankro.)
2015-07-30 01:33:38 +02:00
Alexis Beingessner
4c48ffa53e add warning about reference section 2015-07-29 15:55:19 -07:00
Alexis Beingessner
2907611025 deprecate vecmap 2015-07-29 15:50:38 -07:00
Brian Anderson
a09bce1047 Feature gate associated type defaults
There are multiple issues with them as designed and implemented.

cc #27364
2015-07-29 15:11:07 -07:00
bors
186707893b Auto merge of #27383 - Manishearth:rollup, r=Manishearth
- Successful merges: #26778, #27232, #27352, #27369, #27373
- Failed merges:
2015-07-29 21:29:03 +00:00
Alex Crichton
5af6cf9fa4 std: Remove the curious inner module
This isn't actually necessary any more with the advent of `$crate` and changes
in the compiler to expand macros to `::core::$foo` in the context of a
`#![no_std]` crate.

The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-29 14:18:24 -07:00
Kieran Hunt
a3872a3685 Consolidating loop information to a single page. Per PR #27305 2015-07-29 22:38:43 +02:00
Chris Morgan
aede1c73bd Update the ctags rules and targets.
As there’s no C++ runtime any more there’s really no point in having
anything but Rust tags being made.

I’ve also taken the liberty of excluding the compiler parts of this in
the `librust%,,` pattern substitution. Whether or not this is “correct”
will depend on whether you want tags for the compiler or for general
use. For myself, I want it for general use.

I’m not sure how much people use the tags files anyway. I definitely do,
but with Racer existing the tags files aren’t quite so necessary.
2015-07-30 06:35:42 +10:00
Chris Morgan
fc5b79ce86 Use $crate in core::panic! 2015-07-30 06:29:24 +10:00
Felix S. Klock II
21be09448b Improve code emitted for inserting padding before unsized field.
Hat-tip to eddyb for the appropriate bit-trickery here.
2015-07-29 22:18:39 +02:00
Manish Goregaokar
b904b452c6 Rollup merge of #27373 - alexcrichton:fix-wait-timeout-ms, r=brson
The API we're calling requires us to pass an absolute point in time as an
argument (`pthread_cond_timedwait`) so we call `gettimeofday` ahead of time to
then add the specified duration to. Unfortuantely the current "add the duration"
logic forgot to take into account the current time's sub-second precision (e.g.
the `tv_usec` field was ignored), causing sub-second duration waits to return
spuriously.
2015-07-30 01:43:54 +05:30
Manish Goregaokar
35d95515f3 Rollup merge of #27369 - brson:realstd, r=alexcrichton
Since most lang items are actually defined in core, these hack reexports don't actually
do anything useful.
2015-07-30 01:43:53 +05:30
Manish Goregaokar
c9a34d2092 Rollup merge of #27352 - nagisa:illegal-to-invalid-docs, r=steveklabnik
r? @steveklabnik
2015-07-30 01:43:53 +05:30
Manish Goregaokar
6b564a663b Rollup merge of #27232 - Dangthrimble:master, r=steveklabnik
Added definitions for 'Expression', 'Expression-Oriented Language' and 'Statement' to glossary.
Sorted the definitions alphabetically.

r? @steveklabnik
2015-07-30 01:43:53 +05:30
Manish Goregaokar
56bb9ed805 Rollup merge of #26778 - jawline:master, r=pnkfelix
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
2015-07-30 01:43:52 +05:30
bors
823f4fcf22 Auto merge of #27368 - alexcrichton:deprecate-net-methods, r=aturon
These methods are all covered by [RFC 1158] and are currently all available on
stable Rust via the [`net2` crate][net2] on crates.io. This commit does not
touch the timeout related functions as they're still waiting on `Duration` which
is unstable anyway, so punting in favor of the `net2` crate wouldn't buy much.

[RFC 1158]: https://github.com/rust-lang/rfcs/pull/1158
[net2]: http://crates.io/crates/net2
2015-07-29 19:50:52 +00:00
bors
523ee8d37c Auto merge of #27353 - arielb1:parenthetical-error, r=steveklabnik
This also calls the right API, which e.g. prevents a suggestion
for #![feature(unboxed_closures)] on stable.

Fixes #26970 

r? @steveklabnik
2015-07-29 18:10:48 +00:00
Felix S. Klock II
26f4ebe7a0 Revise a comment to include reference to issue #26403. 2015-07-29 19:43:26 +02:00
Brian Anderson
1c8194c477 Formatting 2015-07-29 10:31:07 -07:00
Alex Crichton
43b2c4781e std: Fix sub-second Condvar::wait_timeout_ms
The API we're calling requires us to pass an absolute point in time as an
argument (`pthread_cond_timedwait`) so we call `gettimeofday` ahead of time to
then add the specified duration to. Unfortuantely the current "add the duration"
logic forgot to take into account the current time's sub-second precision (e.g.
the `tv_usec` field was ignored), causing sub-second duration waits to return
spuriously.
2015-07-29 10:24:40 -07:00
bors
090ad6fde7 Auto merge of #27346 - dotdash:closure_dbg, r=michaelwoerister
Closure variables represent the closure environment, not the closure
function, so the identifier used to ensure that the debuginfo is unique
for each kind of closure needs to be based on the closure upvars and not
the function signature.
2015-07-29 16:28:59 +00:00
bors
ddbce1107b Auto merge of #27380 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #27102, #27286, #27313, #27325, #27326, #27327, #27341, #27342, #27343, #27345, #27350, #27355, #27374, #27375, #27379
- Failed merges:
2015-07-29 14:47:23 +00:00