]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #23534 - steveklabnik:remove_sched_threads, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:06:15 +0000 (05:36 +0530)]
Rollup merge of  #23534 - steveklabnik:remove_sched_threads, r=alexcrichton

As @alexcrichton says, this was really a libgreen thing, and isn't
relevant now.

As this removes a technically-public function, this is a

[breaking-change]

9 years agoRollup merge of #23532 - steveklabnik:gh22002, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:01:39 +0000 (05:31 +0530)]
Rollup merge of #23532 - steveklabnik:gh22002, r=alexcrichton

 Fixes #22002

9 years agoRollup merge of #23527 - steveklabnik:gh16330, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:01:30 +0000 (05:31 +0530)]
Rollup merge of #23527 - steveklabnik:gh16330, r=alexcrichton

 Fixes #16330

My troff is probably poor, so make sure that all looks okay.

9 years agoRollup merge of #23526 - mbrubeck:uppercase, r=steveklabnik
Manish Goregaokar [Fri, 20 Mar 2015 00:01:24 +0000 (05:31 +0530)]
Rollup merge of #23526 - mbrubeck:uppercase, r=steveklabnik

 `uppercase` and `lowercase` are currently named `to_uppercase` and `to_lowercase`. Also adds a link to the `char` type documentation which has much more detail on these iterators.

9 years agoRollup merge of #23518 - farcaller:fix_quote_method, r=eddyb
Manish Goregaokar [Fri, 20 Mar 2015 00:01:12 +0000 (05:31 +0530)]
Rollup merge of #23518 - farcaller:fix_quote_method, r=eddyb

 This fixes several use cases that were broken after #23265 landed.

9 years agoRollup merge of #23510 - lgvz:makefile, r=Manishearth
Manish Goregaokar [Fri, 20 Mar 2015 00:01:06 +0000 (05:31 +0530)]
Rollup merge of #23510 - lgvz:makefile, r=Manishearth

 The wiki doesn't seem to exist

9 years agoRollup merge of #23499 - mbrubeck:doc-edit, r=huonw
Manish Goregaokar [Fri, 20 Mar 2015 00:01:00 +0000 (05:31 +0530)]
Rollup merge of #23499 - mbrubeck:doc-edit, r=huonw

 Multiple people have been suprised by this aspect of read_line's behavior, which is not obvious from the docs.

9 years agoRollup merge of #23447 - kjpgit:kjp/pointerexample, r=steveklabnik
Manish Goregaokar [Fri, 20 Mar 2015 00:00:49 +0000 (05:30 +0530)]
Rollup merge of #23447 - kjpgit:kjp/pointerexample, r=steveklabnik

 These two borrowing examples were confusing/misleading.  This changes it
to more clearly show how you _can_ borrow a box, and also uses & instead
of &*.

9 years agoRollup merge of #22631 - aepsil0n:issue-22098, r=aturon
Manish Goregaokar [Fri, 20 Mar 2015 00:00:44 +0000 (05:30 +0530)]
Rollup merge of #22631 - aepsil0n:issue-22098, r=aturon

 Fixes #22098.

9 years agoRollup merge of #23531 - steveklabnik:gh21709, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:00:39 +0000 (05:30 +0530)]
Rollup merge of #23531 - steveklabnik:gh21709, r=alexcrichton

 Fixes #21709

9 years agoRollup merge of #23529 - steveklabnik:gh23426, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:00:34 +0000 (05:30 +0530)]
Rollup merge of #23529 - steveklabnik:gh23426, r=alexcrichton

 Fixes #23426

9 years agoRollup merge of #23525 - steveklabnik:test_tasks, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:00:28 +0000 (05:30 +0530)]
Rollup merge of #23525 - steveklabnik:test_tasks, r=alexcrichton

 We don't use 'task' anymore, these are now threads.

Because this changes the name of a compiler option, this is

[breaking-change]

I think this is small enough to not need an RFC, nor a period of accepting both. If we want to take both for a while, I can change the patch.

9 years agoRollup merge of #23504 - alexcrichton:parse-error-not-unit, r=aturon
Manish Goregaokar [Fri, 20 Mar 2015 00:00:23 +0000 (05:30 +0530)]
Rollup merge of #23504 - alexcrichton:parse-error-not-unit, r=aturon

 The IP and socket address types all had `FromStr` implemented but the
implementations were not marked stable, nor was the error type returned ready to
be properly stabilized.

This commit marks the implementations of `FromStr` as stable and also renamed
the `ParseError` structure to `AddrParseError`. The error is now also an opaque
structure that cannot be constructed outside the standard library.

cc #22949
[breaking-change]

9 years agoRemove rt::default_sched_threads and RUST_THREADS.
Steve Klabnik [Thu, 19 Mar 2015 22:38:16 +0000 (18:38 -0400)]
Remove rt::default_sched_threads and RUST_THREADS.

As @alexcrichton says, this was really a libgreen thing, and isn't
relevant now.

As this removes a technically-public function, this is a

[breaking-change]

Conflicts:
src/libtest/lib.rs

9 years agoRollup merge of #23254 - jbcrail:saturating-math-docs, r=steveklabnik
Manish Goregaokar [Fri, 20 Mar 2015 00:00:12 +0000 (05:30 +0530)]
Rollup merge of #23254 - jbcrail:saturating-math-docs, r=steveklabnik

 This was added for #23241.

9 years agoRollup merge of #23489 - michaelwoerister:span-artihmetic-overflow-bug, r=alexcrichton
Manish Goregaokar [Fri, 20 Mar 2015 00:00:06 +0000 (05:30 +0530)]
Rollup merge of #23489 - michaelwoerister:span-artihmetic-overflow-bug, r=alexcrichton

 This should solve issues #23115, #23469, and #23407.

As the title says, this is just a workaround. The underlying problem is that macro expansion can produce invalid spans. I've opened issue #23480 so we don't forget about that.

9 years agoDocument environment variables
Steve Klabnik [Thu, 19 Mar 2015 20:38:06 +0000 (16:38 -0400)]
Document environment variables

Fixes #16330

9 years agoComment on when ReadDir is Err
Steve Klabnik [Thu, 19 Mar 2015 20:53:06 +0000 (16:53 -0400)]
Comment on when ReadDir is Err

Fixes #23426

9 years agoReference Drop in FFI chapter
Steve Klabnik [Thu, 19 Mar 2015 22:11:35 +0000 (18:11 -0400)]
Reference Drop in FFI chapter

Fixes #22002

9 years agoRemove incorrect statement about raw pointers.
Steve Klabnik [Thu, 19 Mar 2015 22:06:54 +0000 (18:06 -0400)]
Remove incorrect statement about raw pointers.

Fixes #21709

9 years agoUpdate docs for ToUppercase/ToLowercase structs
Matt Brubeck [Thu, 19 Mar 2015 20:34:18 +0000 (13:34 -0700)]
Update docs for ToUppercase/ToLowercase structs

`uppercase` and `lowercase` are currently named `to_uppercase` and `to_lowercase`.
Also adds a link to the `char` type documentation which has much more detail
on these iterators.

9 years agoRUST_TEST_TASKS -> RUST_TEST_THREADS
Steve Klabnik [Thu, 19 Mar 2015 19:42:53 +0000 (15:42 -0400)]
RUST_TEST_TASKS -> RUST_TEST_THREADS

We don't use 'task' anymore, these are now threads.

Because this changes the name of a compiler option, this is

[breaking-change]

9 years agoAuto merge of #23430 - alexcrichton:io-error, r=aturon
bors [Thu, 19 Mar 2015 19:15:22 +0000 (19:15 +0000)]
Auto merge of #23430 - alexcrichton:io-error, r=aturon

This commit stabilizes the `ErrorKind` enumeration which is consumed by and
generated by the `io::Error` type. The purpose of this type is to serve as a
cross-platform namespace to categorize errors into. Two specific issues are
addressed as part of this stablization:

* The naming of each variant was scrutinized and some were tweaked. An example
  is how `FileNotFound` was renamed to simply `NotFound`. These names should not
  show either a Unix or Windows bias and the set of names is intended to grow
  over time. For now the names will likely largely consist of those errors
  generated by the I/O APIs in the standard library.

* The mapping of OS error codes onto kinds has been altered. Coalescing no
  longer occurs (multiple error codes become one kind). It is intended that each
  OS error code, if bound, corresponds to only one `ErrorKind`. The current set
  of error kinds was expanded slightly to include some networking errors.

This commit also adds a `raw_os_error` function which returns an `Option<i32>`
to extract the underlying raw error code from the `Error`.

Closes #16666

[breaking-change]

9 years agoAdd test case for stable import of invalid span information.
Michael Woerister [Wed, 18 Mar 2015 21:05:24 +0000 (22:05 +0100)]
Add test case for stable import of invalid span information.

9 years agoAdded missing impl_to_source! and impl_to_tokens! for TraitItem.
Vladimir Pouzanov [Thu, 19 Mar 2015 17:01:46 +0000 (17:01 +0000)]
Added missing impl_to_source! and impl_to_tokens! for TraitItem.

9 years agoAdded missing impl_to_source! and impl_to_tokens! for ImplItem.
Vladimir Pouzanov [Thu, 19 Mar 2015 17:01:15 +0000 (17:01 +0000)]
Added missing impl_to_source! and impl_to_tokens! for ImplItem.

This fixes several use cases that were broken after #23265 landed.

9 years agostd: Stablize io::ErrorKind
Alex Crichton [Tue, 17 Mar 2015 01:08:57 +0000 (18:08 -0700)]
std: Stablize io::ErrorKind

This commit stabilizes the `ErrorKind` enumeration which is consumed by and
generated by the `io::Error` type. The purpose of this type is to serve as a
cross-platform namespace to categorize errors into. Two specific issues are
addressed as part of this stablization:

* The naming of each variant was scrutinized and some were tweaked. An example
  is how `FileNotFound` was renamed to simply `NotFound`. These names should not
  show either a Unix or Windows bias and the set of names is intended to grow
  over time. For now the names will likely largely consist of those errors
  generated by the I/O APIs in the standard library.

* The mapping of OS error codes onto kinds has been altered. Coalescing no
  longer occurs (multiple error codes become one kind). It is intended that each
  OS error code, if bound, corresponds to only one `ErrorKind`. The current set
  of error kinds was expanded slightly to include some networking errors.

This commit also adds a `raw_os_error` function which returns an `Option<i32>`
to extract the underlying raw error code from the `Error`.

9 years agoAuto merge of #23213 - ipetkov:rustdoc-src-fix, r=huonw
bors [Thu, 19 Mar 2015 16:42:16 +0000 (16:42 +0000)]
Auto merge of #23213 - ipetkov:rustdoc-src-fix, r=huonw

* rustdoc was doubly appending the file name to the path of where to
  generate the source files, meanwhile, the [src] hyperlinks were not
* Added a flag to rustdoc::html::render::clean_srcpath to ignore the
  last path component, i.e. the file name itself to prevent the issue
* This also avoids creating directories with the same name as source
  files, and it makes sure the link to `main.css` is correct as well.

Fixes #23192

9 years agoAuto merge of #23498 - pcwalton:inline-police, r=cmr
bors [Thu, 19 Mar 2015 13:10:37 +0000 (13:10 +0000)]
Auto merge of #23498 - pcwalton:inline-police, r=cmr

r? @cmr

9 years agoAllow Float::ldexp to be called as a method
Eduard Bopp [Sat, 21 Feb 2015 14:05:34 +0000 (15:05 +0100)]
Allow Float::ldexp to be called as a method

Fixes #22098.

9 years agoAuto merge of #23507 - jbcrail:fix-comment-spelling, r=alexcrichton
bors [Thu, 19 Mar 2015 09:50:13 +0000 (09:50 +0000)]
Auto merge of #23507 - jbcrail:fix-comment-spelling, r=alexcrichton

I corrected misspelled comments in several crates.

9 years agoRemove dead link to wiki in Makefile comments
Tero Hänninen [Thu, 19 Mar 2015 06:51:52 +0000 (08:51 +0200)]
Remove dead link to wiki in Makefile comments

9 years agolibunicode: Partially inline the fast paths in character class checking.
Patrick Walton [Thu, 19 Mar 2015 00:36:34 +0000 (17:36 -0700)]
libunicode: Partially inline the fast paths in character class checking.

9 years agoliballoc: Partially inline the refcount manipulation in the Arc
Patrick Walton [Thu, 19 Mar 2015 00:35:11 +0000 (17:35 -0700)]
liballoc: Partially inline the refcount manipulation in the Arc
destructor.

9 years agoFix spelling errors in comments.
Joseph Crail [Thu, 19 Mar 2015 04:48:08 +0000 (00:48 -0400)]
Fix spelling errors in comments.

I corrected misspelled comments in several crates.

9 years agoAuto merge of #23502 - Manishearth:rollup, r=Manishearth
bors [Thu, 19 Mar 2015 03:19:08 +0000 (03:19 +0000)]
Auto merge of #23502 - Manishearth:rollup, r=Manishearth

9 years agoRm unused feature
Manish Goregaokar [Thu, 19 Mar 2015 01:54:13 +0000 (07:24 +0530)]
Rm unused feature

9 years agoRollup merge of #23428 - Manishearth:ast-doc, r=steveklabnik
Manish Goregaokar [Thu, 19 Mar 2015 01:31:50 +0000 (07:01 +0530)]
Rollup merge of #23428 - Manishearth:ast-doc, r=steveklabnik

 I often have to run `ast-json` or look into the pretty-printer source to figure out what the fields of an AST enum mean. I've tried to document most of what I know (and some semi-obvious stuff).

r? @steveklabnik

f? @eddyb

9 years agoRollup merge of #23497 - steveklabnik:gh21589, r=alexcrichton
Manish Goregaokar [Thu, 19 Mar 2015 00:40:02 +0000 (06:10 +0530)]
Rollup merge of #23497 - steveklabnik:gh21589, r=alexcrichton

 Fixes #21589

9 years agoRollup merge of #23496 - steveklabnik:gh22309, r=nikomatsakis
Manish Goregaokar [Thu, 19 Mar 2015 00:39:56 +0000 (06:09 +0530)]
Rollup merge of #23496 - steveklabnik:gh22309, r=nikomatsakis

 Fixes #22309

I am pretty sure that this is the right way to do this, given the other macros, but I'm not 100% sure.

9 years agoRollup merge of #23495 - pcwalton:inline-cell, r=cmr
Manish Goregaokar [Thu, 19 Mar 2015 00:39:49 +0000 (06:09 +0530)]
Rollup merge of #23495 - pcwalton:inline-cell, r=cmr

 This is a significant performance problem in Servo.

r? @brson

9 years agoRollup merge of #23494 - mdinger:patch-1, r=steveklabnik
Manish Goregaokar [Thu, 19 Mar 2015 00:39:43 +0000 (06:09 +0530)]
Rollup merge of #23494 - mdinger:patch-1, r=steveklabnik

 Typo

9 years agoRollup merge of #23493 - steveklabnik:gh22927, r=alexcrichton
Manish Goregaokar [Thu, 19 Mar 2015 00:39:37 +0000 (06:09 +0530)]
Rollup merge of #23493 - steveklabnik:gh22927, r=alexcrichton

 And do some formatting while I'm here.

9 years agoRollup merge of #23490 - jooert:master, r=steveklabnik
Manish Goregaokar [Thu, 19 Mar 2015 00:39:31 +0000 (06:09 +0530)]
Rollup merge of #23490 - jooert:master, r=steveklabnik

 Update documentation to reflect #21824.

r? @steveklabnik

9 years agoRollup merge of #23483 - semarie:openbsd-threads, r=alexcrichton
Manish Goregaokar [Thu, 19 Mar 2015 00:39:25 +0000 (06:09 +0530)]
Rollup merge of #23483 - semarie:openbsd-threads, r=alexcrichton

 unbreak openbsd/bitrig build
- remove `pub` from `struct` (error: visibility has no effect inside functions)
- move `pthread_main_np` into function

r? @alexcrichton

9 years agoRollup merge of #23474 - nagisa:patch-1, r=steveklabnik
Manish Goregaokar [Thu, 19 Mar 2015 00:39:20 +0000 (06:09 +0530)]
Rollup merge of #23474 - nagisa:patch-1, r=steveklabnik

 r? @steveklabnik

9 years agoRollup merge of #23479 - tamird:fix-ios-build, r=aturon
Manish Goregaokar [Thu, 19 Mar 2015 00:39:02 +0000 (06:09 +0530)]
Rollup merge of #23479 - tamird:fix-ios-build, r=aturon

 r? @aturon

9 years agoRollup merge of #23475 - nikomatsakis:closure-ret-syntax, r=acrichto
Manish Goregaokar [Thu, 19 Mar 2015 00:38:56 +0000 (06:08 +0530)]
Rollup merge of #23475 - nikomatsakis:closure-ret-syntax, r=acrichto

 Require braces when a closure has an explicit return type. This is a [breaking-change]: instead of a closure like `|| -> i32 22`, prefer `|| -> i32 { 22 }`.

Fixes #23420.

9 years agostd: Stabilize FromStr implementations in std::net
Alex Crichton [Thu, 19 Mar 2015 03:08:15 +0000 (20:08 -0700)]
std: Stabilize FromStr implementations in std::net

The IP and socket address types all had `FromStr` implemented but the
implementations were not marked stable, nor was the error type returned ready to
be properly stabilized.

This commit marks the implementations of `FromStr` as stable and also renamed
the `ParseError` structure to `AddrParseError`. The error is now also an opaque
structure that cannot be constructed outside the standard library.

cc #22949
[breaking-change]

9 years agoSpace and punctuation fixes
Manish Goregaokar [Wed, 18 Mar 2015 19:26:37 +0000 (00:56 +0530)]
Space and punctuation fixes

9 years agoNote ::foo::bar() in the crates guide
Steve Klabnik [Thu, 19 Mar 2015 00:24:22 +0000 (20:24 -0400)]
Note ::foo::bar() in the crates guide

Fixes #21589

9 years agoAddress huon's comments
Manish Goregaokar [Wed, 18 Mar 2015 12:36:10 +0000 (18:06 +0530)]
Address huon's comments

9 years agoDocument include!
Steve Klabnik [Wed, 18 Mar 2015 23:49:39 +0000 (19:49 -0400)]
Document include!

Fixes #22309

9 years agocore: Inline most cell methods.
Patrick Walton [Wed, 18 Mar 2015 23:44:37 +0000 (16:44 -0700)]
core: Inline most cell methods.

This is a significant performance problem in Servo.

9 years agoUpdate ast.rs
mdinger [Wed, 18 Mar 2015 23:36:23 +0000 (19:36 -0400)]
Update ast.rs

Typo

9 years agoDocument {:.*}
Steve Klabnik [Wed, 18 Mar 2015 23:15:26 +0000 (19:15 -0400)]
Document {:.*}

Fixes #22927

9 years agoSmall formatting fixes to fmt.rs
Steve Klabnik [Wed, 18 Mar 2015 23:00:51 +0000 (19:00 -0400)]
Small formatting fixes to fmt.rs

9 years agoRename should_fail to should_panic in docs
Johannes Oertel [Wed, 18 Mar 2015 21:34:40 +0000 (22:34 +0100)]
Rename should_fail to should_panic in docs

9 years agoRollup merge of #23468 - sfackler:stdio-panic, r=alexcrichton
Manish Goregaokar [Thu, 19 Mar 2015 00:38:43 +0000 (06:08 +0530)]
Rollup merge of #23468 - sfackler:stdio-panic, r=alexcrichton

 Nothing inside of the read/write interface itself can panic, so any
poison must have been the result of user code which the lock isn't
protecting.

This seems safe to me, but if we don't want to go this route we should update the docs to indicate that these methods can panic.

r? @alexcrichton

9 years agoRollup merge of #23462 - alexcrichton:stabilize-cloned, r=aturon
Manish Goregaokar [Thu, 19 Mar 2015 00:38:37 +0000 (06:08 +0530)]
Rollup merge of #23462 - alexcrichton:stabilize-cloned, r=aturon

 This commit stabilizes the `cloned` iterator after tweaking the signature to
require that the iterator is over `&T` instead of `U: Deref<T>`. This method has
had time to bake for awhile now and it's not clear whether the `Deref` bound is
worth it. Additionally, there aren't clear conventions on when to bound and/or
implement the `Deref` trait, so for now the conservative route is to require
references instead of `U: Deref<T>`.

To change this signature to using `Deref` would technically be a
backwards-incompatible change, but it is doubtful that any code will actually
break in practice.

9 years agoRollup merge of #23457 - nagisa:get-set-resources, r=alexcrichton
Manish Goregaokar [Thu, 19 Mar 2015 00:38:31 +0000 (06:08 +0530)]
Rollup merge of #23457 - nagisa:get-set-resources, r=alexcrichton

 Hopefully didn’t miss or mess up anything.

~~EDIT: ah, as usual, just didn’t bother running build before pushing a submit request button. Build pending.~~

9 years agoClarify in docs that BufRead::read_line appends
Matt Brubeck [Thu, 19 Mar 2015 00:38:11 +0000 (17:38 -0700)]
Clarify in docs that BufRead::read_line appends

Multiple people have been suprised by this aspect of read_line's behavior,
which is not obvious from the docs.

9 years agoAuto merge of #23482 - alexcrichton:snapshots, r=aturon
bors [Thu, 19 Mar 2015 00:17:00 +0000 (00:17 +0000)]
Auto merge of #23482 - alexcrichton:snapshots, r=aturon

9 years agoRequire braces when a closure has an explicit return type. This is a
Niko Matsakis [Wed, 18 Mar 2015 13:22:38 +0000 (09:22 -0400)]
Require braces when a closure has an explicit return type. This is a
[breaking-change]: instead of a closure like `|| -> i32 22`, prefer `||
-> i32 { 22 }`.

Fixes #23420.

9 years agoRegister new snapshots
Alex Crichton [Wed, 18 Mar 2015 16:36:18 +0000 (09:36 -0700)]
Register new snapshots

9 years ago[rustdoc] Fix source hyperlinks in docs
Ivan Petkov [Tue, 17 Mar 2015 02:44:13 +0000 (19:44 -0700)]
[rustdoc] Fix source hyperlinks in docs

* rustdoc was doubly appending the file name to the path of where to
  generate the source files, meanwhile, the [src] hyperlinks were not
* Added a flag to rustdoc::html::render::clean_srcpath to ignore the
  last path component, i.e. the file name itself to prevent the issue
* This also avoids creating directories with the same name as source
  files, and it makes sure the link to `main.css` is correct as well.
* Added regression tests to ensure the rustdoc heirarchy of rendered
  source files remains consistent

Fixes #23192

9 years agoWork around invalid spans in imported FileMaps
Michael Woerister [Wed, 18 Mar 2015 16:02:34 +0000 (17:02 +0100)]
Work around invalid spans in imported FileMaps

9 years agoAuto merge of #23473 - Manishearth:rollup, r=Manishearth
bors [Wed, 18 Mar 2015 17:32:13 +0000 (17:32 +0000)]
Auto merge of #23473 - Manishearth:rollup, r=Manishearth

9 years agoRollup merge of #23428 - Manishearth:ast-doc, r=huon
Manish Goregaokar [Wed, 18 Mar 2015 15:02:54 +0000 (20:32 +0530)]
Rollup merge of #23428 - Manishearth:ast-doc, r=huon

 I often have to run `ast-json` or look into the pretty-printer source to figure out what the fields of an AST enum mean. I've tried to document most of what I know (and some semi-obvious stuff).

r? @steveklabnik

f? @eddyb

9 years agoRollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik
Manish Goregaokar [Wed, 18 Mar 2015 09:09:43 +0000 (14:39 +0530)]
Rollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik

9 years agoRollup merge of #23450 - alexcrichton:fix-sockaddr-storage, r=brson
Manish Goregaokar [Wed, 18 Mar 2015 09:09:34 +0000 (14:39 +0530)]
Rollup merge of #23450 - alexcrichton:fix-sockaddr-storage, r=brson

 The alignment field is actually a \"pointer sized\" type instead of always i64,
requiring that the size of the padding field is also calculated slightly
differently.

Closes #23425

9 years agoRollup merge of #23443 - meqif:ipv6addr-new-documentation-fix, r=steveklabnik
Manish Goregaokar [Wed, 18 Mar 2015 09:09:25 +0000 (14:39 +0530)]
Rollup merge of #23443 - meqif:ipv6addr-new-documentation-fix, r=steveklabnik

 Very minor fix: in `std::net::Ipv6Addr::new`, the documentation had an incomplete representation of the resulting address, missing the last two groups.

9 years agoRollup merge of #23392 - WiSaGaN:bugfix/fix_deprecate_link, r=Manishearth
Manish Goregaokar [Wed, 18 Mar 2015 09:09:16 +0000 (14:39 +0530)]
Rollup merge of #23392 - WiSaGaN:bugfix/fix_deprecate_link, r=Manishearth

 Since module `std::sync::mpsc` is stable now, fix the deprecated link `comm` with `sync::mpsc`.

9 years agoRollup merge of #23467 - andersk:loop-labeled-break-value, r=sanxiyn
Manish Goregaokar [Wed, 18 Mar 2015 09:09:07 +0000 (14:39 +0530)]
Rollup merge of #23467 - andersk:loop-labeled-break-value, r=sanxiyn

 Closes #23451.

9 years agoRollup merge of #23461 - alexcrichton:feat-char-at, r=aturon
Manish Goregaokar [Wed, 18 Mar 2015 09:08:56 +0000 (14:38 +0530)]
Rollup merge of #23461 - alexcrichton:feat-char-at, r=aturon

 This commit clarifies some of the unstable features in the `str` module by
moving them out of the blanket `core` and `collections` features.

The following methods were moved to the `str_char` feature which generally
encompasses decoding specific characters from a `str` and dealing with the
result. It is unclear if any of these methods need to be stabilized for 1.0 and
the most conservative route for now is to continue providing them but to leave
them as unstable under a more specific name.

* `is_char_boundary`
* `char_at`
* `char_range_at`
* `char_at_reverse`
* `char_range_at_reverse`
* `slice_shift_char`

The following methods were moved into the generic `unicode` feature as they are
specifically enabled by the `unicode` crate itself.

* `nfd_chars`
* `nfkd_chars`
* `nfc_chars`
* `graphemes`
* `grapheme_indices`
* `width`

9 years agoAdd a test
Steven Fackler [Wed, 18 Mar 2015 16:03:17 +0000 (09:03 -0700)]
Add a test

9 years agoiOS: fallout from 1d5983a
Tamir Duberstein [Wed, 18 Mar 2015 15:15:53 +0000 (08:15 -0700)]
iOS: fallout from 1d5983a

9 years agoMake it clear which value is discarded
Simonas Kazlauskas [Wed, 18 Mar 2015 12:36:23 +0000 (14:36 +0200)]
Make it clear which value is discarded

9 years agoAddress huon's comments
Manish Goregaokar [Wed, 18 Mar 2015 12:36:10 +0000 (18:06 +0530)]
Address huon's comments

9 years agoClarify Expr
Manish Goregaokar [Tue, 17 Mar 2015 12:12:20 +0000 (17:42 +0530)]
Clarify Expr

9 years agoast: Document Item and ForeignItem
Manish Goregaokar [Mon, 16 Mar 2015 23:36:13 +0000 (05:06 +0530)]
ast: Document Item and ForeignItem

9 years agoast: Document Lit
Manish Goregaokar [Mon, 16 Mar 2015 23:02:58 +0000 (04:32 +0530)]
ast: Document Lit

9 years agoast: Document Pat and Block
Manish Goregaokar [Mon, 16 Mar 2015 22:49:27 +0000 (04:19 +0530)]
ast: Document Pat and Block

9 years agoast: Document paths and `where` clauses
Manish Goregaokar [Mon, 16 Mar 2015 22:32:29 +0000 (04:02 +0530)]
ast: Document paths and `where` clauses

9 years agoast: Document Expr_, UnOp, and BinOp
Manish Goregaokar [Mon, 16 Mar 2015 22:11:23 +0000 (03:41 +0530)]
ast: Document Expr_, UnOp, and BinOp

9 years agoAdd {get,set}rlimit and getrusage to libc
Simonas Kazlauskas [Tue, 17 Mar 2015 21:00:55 +0000 (23:00 +0200)]
Add {get,set}rlimit and getrusage to libc

9 years agoopenbsd/bitrig threads
Sébastien Marie [Wed, 18 Mar 2015 09:59:09 +0000 (10:59 +0100)]
openbsd/bitrig threads

- remove `pub` from `struct` (visibility has no effect inside functions)
- move `pthread_main_np` into function

9 years agoAuto merge of #22838 - petrochenkov:bytelit, r=alexcrichton
bors [Wed, 18 Mar 2015 08:27:22 +0000 (08:27 +0000)]
Auto merge of #22838 - petrochenkov:bytelit, r=alexcrichton

This patch changes the type of byte string literals from `&[u8]` to `&[u8; N]`.
It also implements some necessary traits (`IntoBytes`, `Seek`, `Read`, `BufRead`) for fixed-size arrays (also related to #21725) and adds test for #17233, which seems to be resolved.

Fixes #18465
[breaking-change]

9 years agoRemove the newly introduced trait impls for fixed-size arrays and use &b"..."[.....
Vadim Petrochenkov [Wed, 18 Mar 2015 06:16:08 +0000 (09:16 +0300)]
Remove the newly introduced trait impls for fixed-size arrays and use &b"..."[..] instead.

9 years agoIgnore stdio mutex poison state
Steven Fackler [Wed, 18 Mar 2015 06:05:44 +0000 (23:05 -0700)]
Ignore stdio mutex poison state

Nothing inside of the read/write interface itself can panic, so any
poison must have been the result of user code which the lock isn't
protecting.

9 years agoAuto merge of #23290 - nrc:pub_priv_mod, r=nikomatsakis
bors [Wed, 18 Mar 2015 05:55:19 +0000 (05:55 +0000)]
Auto merge of #23290 - nrc:pub_priv_mod, r=nikomatsakis

Closes #22261

r? @nikomatsakis

(+ a new test coming soon...)

9 years agoInfer type ! for a loop that can only break out of other loops
Anders Kaseorg [Wed, 18 Mar 2015 05:19:53 +0000 (01:19 -0400)]
Infer type ! for a loop that can only break out of other loops

Closes #23451.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFix private module loophole in the 'private type in public item' check
Nick Cameron [Wed, 11 Mar 2015 21:44:56 +0000 (10:44 +1300)]
Fix private module loophole in the 'private type in public item' check

9 years agoAuto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc
bors [Wed, 18 Mar 2015 03:22:12 +0000 (03:22 +0000)]
Auto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc

Safe fns are no longer subtypes of unsafe fns, but you can coerce from one to the other.

This is a [breaking-change] in that impl fns must now be declared `unsafe` if the trait is declared `unsafe`. In some rare cases, the subtyping change may also direct affect you, but no such cases were encountered in practice.

Fixes #23449.

r? @nrc

9 years agostd: Stabilize `IteratorExt::cloned`
Alex Crichton [Tue, 17 Mar 2015 23:45:56 +0000 (16:45 -0700)]
std: Stabilize `IteratorExt::cloned`

This commit stabilizes the `cloned` iterator after tweaking the signature to
require that the iterator is over `&T` instead of `U: Deref<T>`. This method has
had time to bake for awhile now and it's not clear whether the `Deref` bound is
worth it. Additionally, there aren't clear conventions on when to bound and/or
implement the `Deref` trait, so for now the conservative route is to require
references instead of `U: Deref<T>`.

To change this signature to using `Deref` would technically be a
backwards-incompatible change, but it is doubtful that any code will actually
break in practice.

9 years agostd: Tweak some unstable features of `str`
Alex Crichton [Tue, 10 Mar 2015 23:29:02 +0000 (16:29 -0700)]
std: Tweak some unstable features of `str`

This commit clarifies some of the unstable features in the `str` module by
moving them out of the blanket `core` and `collections` features.

The following methods were moved to the `str_char` feature which generally
encompasses decoding specific characters from a `str` and dealing with the
result. It is unclear if any of these methods need to be stabilized for 1.0 and
the most conservative route for now is to continue providing them but to leave
them as unstable under a more specific name.

* `is_char_boundary`
* `char_at`
* `char_range_at`
* `char_at_reverse`
* `char_range_at_reverse`
* `slice_shift_char`

The following methods were moved into the generic `unicode` feature as they are
specifically enabled by the `unicode` crate itself.

* `nfd_chars`
* `nfkd_chars`
* `nfc_chars`
* `graphemes`
* `grapheme_indices`
* `width`

9 years agoAuto merge of #23438 - nikomatsakis:issue-23435-default-methods-with-where-clauses...
bors [Wed, 18 Mar 2015 00:51:03 +0000 (00:51 +0000)]
Auto merge of #23438 - nikomatsakis:issue-23435-default-methods-with-where-clauses, r=nrc

Fixes #23435

9 years agoFix byte string literal patterns in match
Vadim Petrochenkov [Mon, 9 Mar 2015 19:19:11 +0000 (22:19 +0300)]
Fix byte string literal patterns in match

9 years agoAvoid metadata bloat by using trait FixedSizeArray
Vadim Petrochenkov [Fri, 27 Feb 2015 19:48:51 +0000 (22:48 +0300)]
Avoid metadata bloat by using trait FixedSizeArray

9 years agoAdd and fix more tests
Vadim Petrochenkov [Thu, 26 Feb 2015 15:00:41 +0000 (18:00 +0300)]
Add and fix more tests