]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agomin_stack_size: update non-Linux implementation comment
Anders Kaseorg [Mon, 23 Mar 2015 07:48:06 +0000 (03:48 -0400)]
min_stack_size: update non-Linux implementation comment

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoGet __pthread_get_minstack at runtime with dlsym
Anders Kaseorg [Mon, 23 Mar 2015 04:58:19 +0000 (00:58 -0400)]
Get __pthread_get_minstack at runtime with dlsym

Linking __pthread_get_minstack, even weakly, was causing Debian’s
dpkg-shlibdeps to detect an unnecessarily strict versioned dependency
on libc6.

Closes #23628.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoAuto merge of #23361 - petrochenkov:refdst, r=jakub-
bors [Sun, 22 Mar 2015 15:52:30 +0000 (15:52 +0000)]
Auto merge of #23361 - petrochenkov:refdst, r=jakub-

After this patch code like `let ref a = *"abcdef"` doesn't cause ICE anymore.
Required for #23121

There are still places in rustc_trans where pointers are always assumed to be thin. In particular, #19064 is not resolved by this patch.

9 years agoAuto merge of #23470 - alexcrichton:less-prelude, r=aturon
bors [Sat, 21 Mar 2015 05:25:21 +0000 (05:25 +0000)]
Auto merge of #23470 - alexcrichton:less-prelude, r=aturon

This commit removes the reexports of `old_io` traits as well as `old_path` types
and traits from the prelude. This functionality is now all deprecated and needs
to be removed to make way for other functionality like `Seek` in the `std::io`
module (currently reexported as `NewSeek` in the io prelude).

Closes #23377
Closes #23378

9 years agostd: Remove old_io/old_path from the prelude
Alex Crichton [Tue, 17 Mar 2015 20:33:26 +0000 (13:33 -0700)]
std: Remove old_io/old_path from the prelude

This commit removes the reexports of `old_io` traits as well as `old_path` types
and traits from the prelude. This functionality is now all deprecated and needs
to be removed to make way for other functionality like `Seek` in the `std::io`
module (currently reexported as `NewSeek` in the io prelude).

Closes #23377
Closes #23378

9 years agoAuto merge of #23512 - oli-obk:result_ok_unwrap, r=alexcrichton
bors [Fri, 20 Mar 2015 23:16:47 +0000 (23:16 +0000)]
Auto merge of #23512 - oli-obk:result_ok_unwrap, r=alexcrichton

because then the call to `unwrap()` will not print the error object.

9 years agoAuto merge of #23267 - alexcrichton:issue-20012, r=aturon
bors [Fri, 20 Mar 2015 20:19:42 +0000 (20:19 +0000)]
Auto merge of #23267 - alexcrichton:issue-20012, r=aturon

This reverts commit aec67c2.

Closes #20012

This is temporarily rebased on #23245 as it would otherwise conflict, the last commit is the only one relevant to this PR though.

9 years agoRevert "Revert "std: Re-enable at_exit()""
Alex Crichton [Thu, 1 Jan 2015 18:19:42 +0000 (10:19 -0800)]
Revert "Revert "std: Re-enable at_exit()""

This reverts commit aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.

9 years agoAuto merge of #23471 - sae-bom:aarch64-linux-android, r=alexcrichton
bors [Fri, 20 Mar 2015 17:45:15 +0000 (17:45 +0000)]
Auto merge of #23471 - sae-bom:aarch64-linux-android, r=alexcrichton

Resolved #21773. (Aarch64 test has been broken again)
r? @alexcrichton

9 years agoAuto merge of #23537 - steveklabnik:gh22551, r=alexcrichton
bors [Fri, 20 Mar 2015 15:02:55 +0000 (15:02 +0000)]
Auto merge of #23537 - steveklabnik:gh22551, r=alexcrichton

Fixes #22551

('grammar' wasn't really used in the chapter at all)

9 years agoAdd AST to the glossary
Steve Klabnik [Thu, 19 Mar 2015 23:42:35 +0000 (19:42 -0400)]
Add AST to the glossary

Fixes #22551

9 years agoAuto merge of #23522 - steveklabnik:gh22518, r=Manishearth
bors [Fri, 20 Mar 2015 11:29:12 +0000 (11:29 +0000)]
Auto merge of #23522 - steveklabnik:gh22518, r=Manishearth

When investigating #22518, this chapter is really the only part that has `rand`, and the rest still works without it. We should have some examples like this, but for now, it's more important to be right than perfect.

9 years agodon't use Result::ok just to be able to use unwrap/unwrap_or
Oliver Schneider [Fri, 20 Mar 2015 07:19:13 +0000 (08:19 +0100)]
don't use Result::ok just to be able to use unwrap/unwrap_or

9 years agoAuto merge of #23548 - Manishearth:rollup, r=Manishearth
bors [Fri, 20 Mar 2015 07:12:39 +0000 (07:12 +0000)]
Auto merge of #23548 - Manishearth:rollup, r=Manishearth

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 agoAuto merge of #23504 - alexcrichton:parse-error-not-unit, r=aturon
bors [Fri, 20 Mar 2015 04:30:04 +0000 (04:30 +0000)]
Auto 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 agoAuto merge of #23254 - jbcrail:saturating-math-docs, r=steveklabnik
bors [Fri, 20 Mar 2015 01:35:54 +0000 (01:35 +0000)]
Auto merge of #23254 - jbcrail:saturating-math-docs, r=steveklabnik

This was added for #23241.

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 agoAuto merge of #23489 - michaelwoerister:span-artihmetic-overflow-bug, r=alexcrichton
bors [Thu, 19 Mar 2015 22:37:02 +0000 (22:37 +0000)]
Auto 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 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 agoRemove the Guessing Game from the book
Steve Klabnik [Thu, 19 Mar 2015 19:19:20 +0000 (15:19 -0400)]
Remove the Guessing Game from the book

Fixes #22518

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 agoIgnore some tests on aarch64 to pass the run-pass test on aarch64-linux-android
Sae-bom Kim [Wed, 18 Mar 2015 07:57:29 +0000 (16:57 +0900)]
Ignore some tests on aarch64 to pass the run-pass test on aarch64-linux-android

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