]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMinor grammatical changes to send-and-sync.
Cole Reynolds [Fri, 31 Jul 2015 03:40:04 +0000 (23:40 -0400)]
Minor grammatical changes to send-and-sync.

Corrects formatting of bullet-ed sentences and changes 'pervasive use raw pointers' to 'pervasive use of raw pointers'

8 years agoAuto merge of #26897 - RalfJung:stdin-mut, r=alexcrichton
bors [Fri, 31 Jul 2015 01:21:23 +0000 (01:21 +0000)]
Auto merge of #26897 - RalfJung:stdin-mut, r=alexcrichton

This fixes #26890.

To be honest, the local compile-test is still running. This just takes so long. But this looks trivial enough...

8 years agoAuto merge of #27410 - Gankro:meta, r=alexcrichton
bors [Thu, 30 Jul 2015 23:45:43 +0000 (23:45 +0000)]
Auto merge of #27410 - Gankro:meta, r=alexcrichton

Fixes #27404

8 years agofix rustdoc metadata parsing
Alexis Beingessner [Thu, 30 Jul 2015 22:29:34 +0000 (15:29 -0700)]
fix rustdoc metadata parsing

8 years agoAuto merge of #27406 - alexcrichton:fix-no-run, r=Gankro
bors [Thu, 30 Jul 2015 22:06:27 +0000 (22:06 +0000)]
Auto merge of #27406 - alexcrichton:fix-no-run, r=Gankro

Needs the underscore for rustdoc to not actually run it.

8 years agotarpl: Change norun to no_run
Alex Crichton [Thu, 30 Jul 2015 21:32:02 +0000 (14:32 -0700)]
tarpl: Change norun to no_run

Needs the underscore for rustdoc to not actually run it.

8 years agoAuto merge of #27388 - alexcrichton:remove-curious-inner, r=brson
bors [Thu, 30 Jul 2015 18:42:32 +0000 (18:42 +0000)]
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.

8 years agoAuto merge of #27399 - Gankro:race, r=alexcrichton
bors [Thu, 30 Jul 2015 16:18:32 +0000 (16:18 +0000)]
Auto merge of #27399 - Gankro:race, r=alexcrichton

r? @alexcrichton

8 years agoMaybe ignore the explicit examples of a race condition
Alexis Beingessner [Thu, 30 Jul 2015 15:49:17 +0000 (08:49 -0700)]
Maybe ignore the explicit examples of a race condition

9 years agoAuto merge of #27386 - chris-morgan:ctags-stuff-update, r=alexcrichton
bors [Thu, 30 Jul 2015 13:39:08 +0000 (13:39 +0000)]
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.

9 years agoAuto merge of #27385 - chris-morgan:core-panic-use-$crate, r=alexcrichton
bors [Thu, 30 Jul 2015 12:01:41 +0000 (12:01 +0000)]
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…

9 years agoAuto merge of #27371 - Gankro:str-clone, r=alexcrichton
bors [Thu, 30 Jul 2015 10:25:23 +0000 (10:25 +0000)]
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.

9 years agoAuto merge of #27392 - pnkfelix:rename-xpretty-as-unpretty, r=jroesch
bors [Thu, 30 Jul 2015 07:31:14 +0000 (07:31 +0000)]
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!

9 years agoAuto merge of #27174 - Gankro:rc-sat, r=alexcrichton
bors [Thu, 30 Jul 2015 05:54:55 +0000 (05:54 +0000)]
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.

9 years agoAuto merge of #27052 - wthrowe:atomic_send, r=Gankro
bors [Thu, 30 Jul 2015 04:18:50 +0000 (04:18 +0000)]
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.

9 years agoAuto merge of #26734 - Gankro:deprecate-vecmap, r=alexcrichton
bors [Thu, 30 Jul 2015 02:41:14 +0000 (02:41 +0000)]
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

9 years agoimplement Clone for Box<str>, closes #27323
Alexis Beingessner [Mon, 27 Jul 2015 16:06:00 +0000 (09:06 -0700)]
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.

9 years agoAuto merge of #27032 - Gankro:tarpl, r=aturon,acrichto,arielb,pnkfelix,nrc,nmatsakis...
bors [Thu, 30 Jul 2015 00:56:01 +0000 (00:56 +0000)]
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

9 years agofix example code
Alexis Beingessner [Thu, 30 Jul 2015 00:15:11 +0000 (17:15 -0700)]
fix example code

9 years agomake Arc mem::forget safe
Alexis Beingessner [Tue, 21 Jul 2015 00:09:44 +0000 (17:09 -0700)]
make Arc mem::forget safe

9 years agomake Rc mem::forget safe
Alexis Beingessner [Mon, 20 Jul 2015 23:57:29 +0000 (16:57 -0700)]
make Rc mem::forget safe

9 years agoRename the unstable option `--xpretty` to `--unpretty`
Felix S. Klock II [Wed, 29 Jul 2015 23:33:38 +0000 (01:33 +0200)]
Rename the unstable option `--xpretty` to `--unpretty`

(Inspired by discussion with Gankro.)

9 years agoadd warning about reference section
Alexis Beingessner [Wed, 29 Jul 2015 22:55:19 +0000 (15:55 -0700)]
add warning about reference section

9 years agodeprecate vecmap
Alexis Beingessner [Thu, 2 Jul 2015 06:29:53 +0000 (23:29 -0700)]
deprecate vecmap

9 years agoAuto merge of #27383 - Manishearth:rollup, r=Manishearth
bors [Wed, 29 Jul 2015 21:29:03 +0000 (21:29 +0000)]
Auto merge of #27383 - Manishearth:rollup, r=Manishearth

- Successful merges: #26778, #27232, #27352, #27369, #27373
- Failed merges:

9 years agostd: Remove the curious inner module
Alex Crichton [Wed, 29 Jul 2015 21:14:01 +0000 (14:14 -0700)]
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.

9 years agoUpdate the ctags rules and targets.
Chris Morgan [Wed, 29 Jul 2015 20:35:42 +0000 (06:35 +1000)]
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.

9 years agoUse $crate in core::panic!
Chris Morgan [Wed, 29 Jul 2015 20:29:24 +0000 (06:29 +1000)]
Use $crate in core::panic!

9 years agoRollup merge of #27373 - alexcrichton:fix-wait-timeout-ms, r=brson
Manish Goregaokar [Wed, 29 Jul 2015 20:13:54 +0000 (01:43 +0530)]
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.

9 years agoRollup merge of #27369 - brson:realstd, r=alexcrichton
Manish Goregaokar [Wed, 29 Jul 2015 20:13:53 +0000 (01:43 +0530)]
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.

9 years agoRollup merge of #27352 - nagisa:illegal-to-invalid-docs, r=steveklabnik
Manish Goregaokar [Wed, 29 Jul 2015 20:13:53 +0000 (01:43 +0530)]
Rollup merge of #27352 - nagisa:illegal-to-invalid-docs, r=steveklabnik

r? @steveklabnik

9 years agoRollup merge of #27232 - Dangthrimble:master, r=steveklabnik
Manish Goregaokar [Wed, 29 Jul 2015 20:13:53 +0000 (01:43 +0530)]
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

9 years agoRollup merge of #26778 - jawline:master, r=pnkfelix
Manish Goregaokar [Wed, 29 Jul 2015 20:13:52 +0000 (01:43 +0530)]
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

9 years agoAuto merge of #27368 - alexcrichton:deprecate-net-methods, r=aturon
bors [Wed, 29 Jul 2015 19:50:52 +0000 (19:50 +0000)]
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

9 years agoAuto merge of #27353 - arielb1:parenthetical-error, r=steveklabnik
bors [Wed, 29 Jul 2015 18:10:48 +0000 (18:10 +0000)]
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

9 years agostd: Fix sub-second Condvar::wait_timeout_ms
Alex Crichton [Wed, 29 Jul 2015 04:13:02 +0000 (21:13 -0700)]
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.

9 years agoAuto merge of #27346 - dotdash:closure_dbg, r=michaelwoerister
bors [Wed, 29 Jul 2015 16:28:59 +0000 (16:28 +0000)]
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.

9 years agoAuto merge of #27380 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 29 Jul 2015 14:47:23 +0000 (14:47 +0000)]
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:

9 years agoRollup merge of #27379 - jeehoonkang:master, r=steveklabnik
Steve Klabnik [Wed, 29 Jul 2015 14:30:37 +0000 (10:30 -0400)]
Rollup merge of #27379 - jeehoonkang:master, r=steveklabnik

As described in the module documentation, the memory orderings in Rust
are the same with that of LLVM.  However, the documentation for the
memory orderings enum says the memory orderings are the same of that of
C++.  Note that they differ in that C++'s support the consume reads,
while LLVM's does not.  Hence this commit fixes the bug in the
documentation for the enum.

9 years agoRollup merge of #27375 - niconii:vec-docs, r=Gankro
Steve Klabnik [Wed, 29 Jul 2015 14:30:36 +0000 (10:30 -0400)]
Rollup merge of #27375 - niconii:vec-docs, r=Gankro

Noticed that syntax like `vec![0; 5]` is never mentioned in `Vec<T>`'s docs, nor used in any of its methods' docs, so I figured I should add a mention of it. Also noticed `vec!(1, 2)` being used in one spot while I was at it, so I fixed that as well for consistency's sake.

r? @steveklabnik

9 years agoRollup merge of #27374 - dhuseby:fixing_configure_bsd, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:36 +0000 (10:30 -0400)]
Rollup merge of #27374 - dhuseby:fixing_configure_bsd, r=alexcrichton

FreeBSD uses ash, not bash.  The double bracket operators [[ and ]] are not supported.

9 years agoRollup merge of #27355 - krumelmonster:patch-1, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:36 +0000 (10:30 -0400)]
Rollup merge of #27355 - krumelmonster:patch-1, r=alexcrichton

Minor change in the book

9 years agoRollup merge of #27350 - GuillaumeGomez:patch-1, r=Manishearth
Steve Klabnik [Wed, 29 Jul 2015 14:30:36 +0000 (10:30 -0400)]
Rollup merge of #27350 - GuillaumeGomez:patch-1, r=Manishearth

cc #26970.

r? @Manishearth

9 years agoRollup merge of #27345 - killercup:patch-15, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:35 +0000 (10:30 -0400)]
Rollup merge of #27345 - killercup:patch-15, r=alexcrichton

The first paragraph of the docs of the Cursor struct ([src](https://github.com/rust-lang/rust/blob/ff6c6ce917bd6af9c5d9315708ae6be3ba0b7e91/src/libstd/io/cursor.rs#L18-L21)) contains a Markdown link. In listings (like <http://doc.rust-lang.org/nightly/std/io/>), this won't get rendered:

![std__io_-_rust](https://cloud.githubusercontent.com/assets/20063/8925843/5c5281a8-350b-11e5-8c63-09a369d746b0.png)

The hotfix would be to change the link by reference:

```rust
/// A `Cursor` wraps another type and provides it with a [`Seek`][seek]
/// implementation.
///
/// [seek]: trait.Seek.html
```

to a direct link:

```rust
/// A `Cursor` wraps another type and provides it with a
/// [`Seek`](trait.Seek.html) implementation.
```

_I have not tested this as I don't have access to a machine for compiling Rust right now._

(This seems to be a more general issue, but I think I have seen this mentioned before. This PR is just to hotfix on particular occurrence. Rustdoc seems to only read the first paragraph of a doc string for the description in index pages, and _after that_ convert Markdown to HTML.)

r? @steveklabnik

9 years agoRollup merge of #27343 - steveklabnik:fix_module, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:35 +0000 (10:30 -0400)]
Rollup merge of #27343 - steveklabnik:fix_module, r=alexcrichton

9 years agoRollup merge of #27342 - steveklabnik:fix_links, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:35 +0000 (10:30 -0400)]
Rollup merge of #27342 - steveklabnik:fix_links, r=alexcrichton

How embarassing :sob:

r? @alexcrichton

9 years agoRollup merge of #27341 - steveklabnik:remove_warning, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:35 +0000 (10:30 -0400)]
Rollup merge of #27341 - steveklabnik:remove_warning, r=alexcrichton

This isn't a standard header, and the other docs don't use it, so let's remove it.

9 years agoRollup merge of #27327 - steveklabnik:fix_take, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:34 +0000 (10:30 -0400)]
Rollup merge of #27327 - steveklabnik:fix_take, r=alexcrichton

This only reads five bytes, so don't use a ten byte buffer, that's confusing.

r? @alexcrichton

9 years agoRollup merge of #27326 - steveklabnik:doc_show_use, r=Gankro
Steve Klabnik [Wed, 29 Jul 2015 14:30:34 +0000 (10:30 -0400)]
Rollup merge of #27326 - steveklabnik:doc_show_use, r=Gankro

In spirit with https://internals.rust-lang.org/t/should-we-keep-including-obvious-imports-in-code-examples/2217, show the feature flags we're using in examples.

(also one instance of 'use')

9 years agoRollup merge of #27325 - midinastasurazz:patch-2, r=alexcrichton
Steve Klabnik [Wed, 29 Jul 2015 14:30:33 +0000 (10:30 -0400)]
Rollup merge of #27325 - midinastasurazz:patch-2, r=alexcrichton

9 years agoRollup merge of #27313 - nagisa:illegal-to-invalid, r=pnkfelix
Steve Klabnik [Wed, 29 Jul 2015 14:30:33 +0000 (10:30 -0400)]
Rollup merge of #27313 - nagisa:illegal-to-invalid, r=pnkfelix

Improves diagnostics in various locations, namely:

* A few error messages that orignally were a mix of an error message and suggestion how to fix it have been split up into two messages: an error and help/hint.
* Never report “illegal”. Fixes https://github.com/rust-lang/rust/issues/27288

9 years agoRollup merge of #27286 - lastorset:pub, r=steveklabnik
Steve Klabnik [Wed, 29 Jul 2015 14:30:33 +0000 (10:30 -0400)]
Rollup merge of #27286 - lastorset:pub, r=steveklabnik

The reader could probably infer this from the current text, but for C++ programmers it's not obvious that struct fields don't automatically become public.

Apparently I wasn't the only one to be confused:

http://stackoverflow.com/questions/29157300/field-of-struct-is-private-when-importing-module

I don't think an example is necessary, but can add one if desired.

r? @steveklabnik

9 years agoRollup merge of #27102 - tshepang:better-examples, r=aturon
Steve Klabnik [Wed, 29 Jul 2015 14:30:33 +0000 (10:30 -0400)]
Rollup merge of #27102 - tshepang:better-examples, r=aturon

9 years agoFix a documentation bug for memory orderings
Jeehoon Kang [Wed, 29 Jul 2015 13:48:25 +0000 (22:48 +0900)]
Fix a documentation bug for memory orderings

As described in the module documentation, the memory orderings in Rust
are the same with that of LLVM.  However, the documentation for the
memory orderings enum says the memory orderings are the same of that of
C++.  Note that they differ in that C++'s support the consume reads,
while LLVM's does not.  Hence this commit fixes the bug in the
documentation for the enum.

9 years agoAuto merge of #27365 - pcwalton:more-collections, r=aturon
bors [Wed, 29 Jul 2015 13:11:29 +0000 (13:11 +0000)]
Auto merge of #27365 - pcwalton:more-collections, r=aturon

This was showing up in Servo profiles.

r? @aturon

9 years agoAuto merge of #27360 - dhuseby:fixing_freebsd_stat_structs_and_tests, r=alexcrichton
bors [Wed, 29 Jul 2015 11:33:20 +0000 (11:33 +0000)]
Auto merge of #27360 - dhuseby:fixing_freebsd_stat_structs_and_tests, r=alexcrichton

…ebsd 10.1 x86_64 and i686

9 years agoAuto merge of #27358 - bluss:split-at-mut, r=aturon
bors [Wed, 29 Jul 2015 09:57:50 +0000 (09:57 +0000)]
Auto merge of #27358 - bluss:split-at-mut, r=aturon

Use raw pointers to avoid aliasing violation in split_at_mut

Fixes #27357

9 years agoModified to add 'found' to error message closes #26485
Blake Loring [Wed, 29 Jul 2015 09:06:50 +0000 (10:06 +0100)]
Modified to add 'found' to error message closes #26485

9 years agoAuto merge of #27349 - arielb1:constant-at, r=alexcrichton
bors [Wed, 29 Jul 2015 08:23:04 +0000 (08:23 +0000)]
Auto merge of #27349 - arielb1:constant-at, r=alexcrichton

Fixes #27033
Fixes #27077

r? @alexcrichton

9 years agoAuto merge of #27261 - arielb1:drop-sanity-check, r=pnkfelix
bors [Wed, 29 Jul 2015 06:47:55 +0000 (06:47 +0000)]
Auto merge of #27261 - arielb1:drop-sanity-check, r=pnkfelix

This fixes multiple bugs, and as several of these are soundness issue, is a [breaking-change].

r? @pnkfelix

9 years agoAuto merge of #27339 - alexcrichton:remove-old-rt, r=brson
bors [Wed, 29 Jul 2015 05:12:33 +0000 (05:12 +0000)]
Auto merge of #27339 - alexcrichton:remove-old-rt, r=brson

These aren't really used for anything any more, so there doesn't seem to be much
reason to leave them around in the `rt` directory. There was some limiting of
threads spawned or tests when run under valgrind, but very little is run under
valgrind nowadays so there's also no real use keeping these around.

9 years agoMake docs for Vec::push() use vec! with square brackets
Nicolette Verlinden [Wed, 29 Jul 2015 04:55:12 +0000 (23:55 -0500)]
Make docs for Vec::push() use vec! with square brackets

9 years agoMention vec![x; len] syntax in Vec docs
Nicolette Verlinden [Wed, 29 Jul 2015 04:53:25 +0000 (23:53 -0500)]
Mention vec![x; len] syntax in Vec docs

9 years agorecent changes to search for gcc/clang on freebsd and this fixes #14381
Dave Huseby [Wed, 29 Jul 2015 04:23:19 +0000 (21:23 -0700)]
recent changes to search for gcc/clang on freebsd and this fixes #14381

9 years agoAuto merge of #27260 - alexcrichton:cap-lints, r=nrc
bors [Wed, 29 Jul 2015 02:04:38 +0000 (02:04 +0000)]
Auto merge of #27260 - alexcrichton:cap-lints, r=nrc

This commit is an implementation of [RFC 1193][rfc] which adds the ability to
the compiler to cap the lint level for the entire compilation session. This flag
will ensure that no lints will go above this level, and Cargo will primarily use
this flag passing `--cap-lints allow` to all upstream dependencies.

[rfc]: https://github.com/rust-lang/rfcs/pull/1193

Closes #27259

9 years agorustc: Add a --cap-lints flag to the compiler
Alex Crichton [Fri, 24 Jul 2015 05:19:12 +0000 (22:19 -0700)]
rustc: Add a --cap-lints flag to the compiler

This commit is an implementation of [RFC 1193][rfc] which adds the ability to
the compiler to cap the lint level for the entire compilation session. This flag
will ensure that no lints will go above this level, and Cargo will primarily use
this flag passing `--cap-lints allow` to all upstream dependencies.

[rfc]: https://github.com/rust-lang/rfcs/pull/1193

Closes #27259

9 years agoAuto merge of #26846 - P1start:print-maybe-styled-macro, r=pnkfelix
bors [Wed, 29 Jul 2015 00:28:55 +0000 (00:28 +0000)]
Auto merge of #26846 - P1start:print-maybe-styled-macro, r=pnkfelix

`EmitterWriter::print_maybe_styled` was basically always used with `format!`, so this macro makes some code cleaner. It should also remove some unnecessary allocations (most `print_maybe_styled` invocations allocated a `String` previously, whereas the new macro uses `write_fmt` to write the formatted string directly to the terminal).

This probably could have been part of #26838, but it’s too late now. It’s also rebased on #26838’s branch because otherwise pretty much all of the changes in this PR would conflict with the other PR’s changes.

9 years agostd: Remove some old #[cfg(test) hacks
Brian Anderson [Tue, 28 Jul 2015 23:22:05 +0000 (16:22 -0700)]
std: Remove some old #[cfg(test) hacks

Since most lang items are actually defined in core, these hack reexports don't actually
do anything useful.

9 years agostd: Deprecate extra TcpStream/UdpSocket methods
Alex Crichton [Tue, 28 Jul 2015 23:03:29 +0000 (16:03 -0700)]
std: Deprecate extra TcpStream/UdpSocket methods

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

Specifically, this commit deprecates:

* TcpStream::set_nodelay
* TcpStream::set_keepalive
* UdpSocket::set_broadcast
* UdpSocket::set_multicast_loop
* UdpSocket::join_multicast
* UdpSocket::set_multicast_time_to_live
* UdpSocket::set_time_to_live

9 years agoReplace illegal with invalid in most diagnostics
Simonas Kazlauskas [Mon, 27 Jul 2015 00:49:38 +0000 (03:49 +0300)]
Replace illegal with invalid in most diagnostics

9 years agoImprove typeck diagnostic messages
Simonas Kazlauskas [Mon, 27 Jul 2015 00:31:38 +0000 (03:31 +0300)]
Improve typeck diagnostic messages

Mostly by splitting error messages into proper pairs of errors and helps

9 years agoImprove invalid recursive types diagnostic
Simonas Kazlauskas [Sun, 26 Jul 2015 22:10:43 +0000 (01:10 +0300)]
Improve invalid recursive types diagnostic

9 years agoAuto merge of #27318 - soon:E0391_explanation, r=nrc
bors [Tue, 28 Jul 2015 22:51:53 +0000 (22:51 +0000)]
Auto merge of #27318 - soon:E0391_explanation, r=nrc

Part of #24407

9 years agoclarify subtyping
Alexis Beingessner [Tue, 28 Jul 2015 22:41:58 +0000 (15:41 -0700)]
clarify subtyping

9 years agofix borrow-splitting
Alexis Beingessner [Tue, 28 Jul 2015 22:38:39 +0000 (15:38 -0700)]
fix borrow-splitting

9 years agolibcollections: Inline some performance-critical string functions; e.g.
Patrick Walton [Tue, 28 Jul 2015 22:17:27 +0000 (15:17 -0700)]
libcollections: Inline some performance-critical string functions; e.g.
`chars()`.

This was showing up in Servo profiles.

9 years agofix incorrect name
Alexis Beingessner [Tue, 28 Jul 2015 22:16:59 +0000 (15:16 -0700)]
fix incorrect name

9 years agolots more felix fixes
Alexis Beingessner [Tue, 28 Jul 2015 22:13:54 +0000 (15:13 -0700)]
lots more felix fixes

9 years agoAuto merge of #27234 - oli-obk:move_get_name_get_ident_to_impl, r=eddyb
bors [Tue, 28 Jul 2015 21:14:28 +0000 (21:14 +0000)]
Auto merge of #27234 - oli-obk:move_get_name_get_ident_to_impl, r=eddyb

this has quite some fallout. but also made lots of stuff more readable imo

[breaking-change] for plugin authors

9 years agomany many pnkfelix fixes
Alexis Beingessner [Tue, 28 Jul 2015 20:20:36 +0000 (13:20 -0700)]
many many pnkfelix fixes

9 years agoUse raw pointers to avoid aliasing violation in split_at_mut
Ulrik Sverdrup [Tue, 28 Jul 2015 17:54:13 +0000 (19:54 +0200)]
Use raw pointers to avoid aliasing violation in split_at_mut

Fixes #27357

9 years agoAuto merge of #26934 - reem:boxed-slice-clone, r=Gankro
bors [Tue, 28 Jul 2015 19:36:26 +0000 (19:36 +0000)]
Auto merge of #26934 - reem:boxed-slice-clone, r=Gankro

Closes #25097

9 years agoFixes #25155 and fixes #27359 by fixing the stat defines for both freebsd 10.1 x86_64...
Dave Huseby [Tue, 28 Jul 2015 18:09:49 +0000 (11:09 -0700)]
Fixes #25155 and fixes #27359 by fixing the stat defines for both freebsd 10.1 x86_64 and i686

9 years agoAuto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
bors [Tue, 28 Jul 2015 17:58:18 +0000 (17:58 +0000)]
Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton

Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.

9 years agomore precise for inclusive range
krumelmonster [Tue, 28 Jul 2015 17:22:20 +0000 (19:22 +0200)]
more precise for inclusive range

9 years agoprohibit the lhs of an @-pattern being a constant
Ariel Ben-Yehuda [Tue, 28 Jul 2015 13:52:54 +0000 (16:52 +0300)]
prohibit the lhs of an @-pattern being a constant

as this breaks code that worked under some conditions, this is a
[breaking-change]

Fixes #27033
Fixes #27077

9 years agoclarify the parenthetical notation stability error message
Ariel Ben-Yehuda [Tue, 28 Jul 2015 16:21:24 +0000 (19:21 +0300)]
clarify the parenthetical notation stability error message

This also calls the right API, which e.g. prevents a suggestion
for #![feature(unboxed_closures)] on stable.

Fixes #26970

9 years agoremove `get_ident` and `get_name`, make `as_str` sound
Oliver Schneider [Tue, 28 Jul 2015 16:07:20 +0000 (18:07 +0200)]
remove `get_ident` and `get_name`, make `as_str` sound

9 years agoAuto merge of #26173 - pnkfelix:fsk-trans-nzmove-take3, r=nikomatsakis
bors [Tue, 28 Jul 2015 15:15:00 +0000 (15:15 +0000)]
Auto merge of #26173 - pnkfelix:fsk-trans-nzmove-take3, r=nikomatsakis

Add dropflag hints (stack-local booleans) for unfragmented paths in trans.  Part of #5016.

Added code to maintain these hints at runtime, and to conditionalize drop-filling and calls to destructors.

In this early stage of my incremental implementation strategy, we are using hints, so we are always free to leave out a flag for a path -- then we just pass `None` as the dropflag hint in the corresponding schedule cleanup call. But, once a path has a hint, we must at least maintain it: i.e. if the hint exists, we must ensure it is never set to "moved" if the data in question might actually have been initialized. It remains sound to conservatively set the hint to "initialized" as long as the true drop-flag embedded in the value itself is up-to-date.

I hope the commit series has been broken up to be readable; most of the commits in the series should build (though I did not always check this).

----

Oh, I think this technically qualifies as a:
[breaking-change]
because it removes drop-filling in some cases where one could previously observe it. That should only affect `unsafe` code; no safe code should be able to inspect whether the drop-fill was present or not. For an example of code that needed to change to account for this, see commit a81c24ae0216ab47df59acd724f8a33124fb6d97 (a unit test of the `move_val_init` intrinsic).  I have not encountered actual code that needed to be updated to account for the change, since this should only be skipping the drop-filling on *moved* values, not on dropped one, and so even types that use `unsafe_no_drop_flag` should be unchanged by this particular PR. (Their time will come later.)

9 years agoReplace occurences of illegal in user facing docs
Simonas Kazlauskas [Tue, 28 Jul 2015 14:53:50 +0000 (17:53 +0300)]
Replace occurences of illegal in user facing docs

9 years agoImprove E0119 error explanation
Guillaume Gomez [Tue, 28 Jul 2015 14:05:16 +0000 (16:05 +0200)]
Improve E0119 error explanation

9 years agocomments and code-cleanup in response to reviews.
Felix S. Klock II [Tue, 28 Jul 2015 14:07:05 +0000 (16:07 +0200)]
comments and code-cleanup in response to reviews.

9 years agobuild fragmented map earlier to make its dependencies clearer.
Felix S. Klock II [Tue, 30 Jun 2015 12:09:25 +0000 (08:09 -0400)]
build fragmented map earlier to make its dependencies clearer.

9 years agoReduced the Lvalue constructors to a kernel of three constructors.
Felix S. Klock II [Wed, 10 Jun 2015 09:42:48 +0000 (11:42 +0200)]
Reduced the Lvalue constructors to a kernel of three constructors.

Updated all call sites that used the other contructors to uniformly
call `Lvalue::new_with_hint`, passing along the appropriate kind
of hint for each context.

Placated tidy in a few other places in datum.rs.

9 years agoRevise intrinsic-move-val test to not require knowledge of whether filling drop is...
Felix S. Klock II [Mon, 8 Jun 2015 10:30:58 +0000 (12:30 +0200)]
Revise intrinsic-move-val test to not require knowledge of whether filling drop is in use.

9 years agoDuring my own review, I convinced myself this was indeed a bug.
Felix S. Klock II [Wed, 10 Jun 2015 08:40:32 +0000 (10:40 +0200)]
During my own review, I convinced myself this was indeed a bug.

Testing indicates bug would have been caught, albeit later than one
might hope, during `sync::mpsc::tests::smoke_shared_port_gone2` test.

9 years agoAdd dropflag hints (stack-local booleans) for unfragmented paths in trans.
Felix S. Klock II [Sun, 7 Jun 2015 07:25:14 +0000 (09:25 +0200)]
Add dropflag hints (stack-local booleans) for unfragmented paths in trans.

Added code to maintain these hints at runtime, and to conditionalize
drop-filling and calls to destructors.

In this early stage, we are using hints, so we are always free to
leave out a flag for a path -- then we just pass `None` as the
dropflag hint in the corresponding schedule cleanup call. But, once a
path has a hint, we must at least maintain it: i.e. if the hint
exists, we must ensure it is never set to "moved" if the data in
question might actually have been initialized. It remains sound to
conservatively set the hint to "initialized" as long as the true
drop-flag embedded in the value itself is up-to-date.

----

Here are some high-level details I want to point out:

 * We maintain the hint in Lvalue::post_store, marking the lvalue as
   moved. (But also continue drop-filling if necessary.)

 * We update the hint on ExprAssign.

 * We pass along the hint in once closures that capture-by-move.

 * You only call `drop_ty` for state that does not have an associated hint.
   If you have a hint, you must call `drop_ty_core` instead.
   (Originally I passed the hint into `drop_ty` as well, to make the
   connection to a hint more apparent, but the vast majority of
   current calls to `drop_ty` are in contexts where no hint is
   available, so it just seemed like noise in the resulting diff.)

9 years agorustc and rustc::borrowck: pass fragment info down into trans.
Felix S. Klock II [Sun, 7 Jun 2015 07:16:55 +0000 (09:16 +0200)]
rustc and rustc::borrowck: pass fragment info down into trans.

9 years agoExtend `trans::datum::Lvalue` so that it carrys an optional dropflag hint.
Felix S. Klock II [Fri, 5 Jun 2015 19:34:03 +0000 (21:34 +0200)]
Extend `trans::datum::Lvalue` so that it carrys an optional dropflag hint.

Instrumented calls sites that construct Lvalues to ease tracking down
cases that we might need to change whether or not they carry a hint.

Note that this commit does not do anything to actually *construct*
the `lldropflag_hints` map, nor does it change anything about codegen
itself. Those parts are in follow-on commits.

9 years agodebugflag to turn off nonzeroing move hint optimization.
Felix S. Klock II [Fri, 5 Jun 2015 19:29:18 +0000 (21:29 +0200)]
debugflag to turn off nonzeroing move hint optimization.

(already thumbs-upped pre-rebase by nikomatsakis)