]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #24132 - kwantam:master, r=alexcrichton
Manish Goregaokar [Tue, 7 Apr 2015 19:49:37 +0000 (01:19 +0530)]
Rollup merge of #24132 - kwantam:master, r=alexcrichton

@mahkoh points out in #15628 that unicode.py does not use
normative data for Grapheme classes. This pr fixes that issue,
and does some minor cleanup of the unicode.py script.

In addition, GC_RegionalIndicator is renamed GC_Regional_Indicator
in order to stay in line with the Unicode class name definitions.
I have updated refs in u_str.rs, and verified that there are no
refs elsewhere in the codebase. However, in principle someone
using the unicode tables for their own purposes might see breakage
from this.

9 years agoAuto merge of #24156 - Manishearth:rollup, r=Manishearth
bors [Tue, 7 Apr 2015 16:44:11 +0000 (16:44 +0000)]
Auto merge of #24156 - Manishearth:rollup, r=Manishearth

9 years agodoc ignore (fixup #24059)
Manish Goregaokar [Tue, 7 Apr 2015 16:40:55 +0000 (22:10 +0530)]
doc ignore (fixup #24059)

9 years agoRollup merge of #24113 - mbrubeck:doc-edit, r=steveklabnik
Manish Goregaokar [Tue, 7 Apr 2015 12:43:24 +0000 (18:13 +0530)]
Rollup merge of #24113 - mbrubeck:doc-edit, r=steveklabnik

 * Fix broken \"module-level documentation\" link on the [`trait Any` docs](http://doc.rust-lang.org/std/any/trait.Any.html) and related broken markup on the [`std::any` docs](http://doc.rust-lang.org/std/any/index.html).

* Remove an outdated or incorrect notice in the `BufRead::lines` docs. There is no such `read_string` function, and `lines` never returns an error.

r? @steveklabnik

9 years agoRollup merge of #24112 - joshtriplett:patch-1, r=steveklabnik
Manish Goregaokar [Tue, 7 Apr 2015 12:43:12 +0000 (18:13 +0530)]
Rollup merge of #24112 - joshtriplett:patch-1, r=steveklabnik

 traits.md said:

If we add a `use` line right above `main` and make the right things public,
everything is fine:

However, the use line was actually placed at the top of the file instead.  Move
the use line to right above main.  That also makes the example more evocative
of cases where the module is defined in a separate file.

9 years agoRollup merge of #24110 - tbu-:pr_doc_fix_add, r=alexcrichton
Manish Goregaokar [Tue, 7 Apr 2015 12:43:04 +0000 (18:13 +0530)]
Rollup merge of #24110 - tbu-:pr_doc_fix_add, r=alexcrichton

9 years agoRollup merge of #24088 - GuillaumeGomez:patch-1, r=alexcrichton
Manish Goregaokar [Tue, 7 Apr 2015 12:42:55 +0000 (18:12 +0530)]
Rollup merge of #24088 - GuillaumeGomez:patch-1, r=alexcrichton

 Fixes #24060.

9 years agoRollup merge of #24059 - nikomatsakis:issue-22914-phantomdata-docs, r=huon
Manish Goregaokar [Tue, 7 Apr 2015 12:42:47 +0000 (18:12 +0530)]
Rollup merge of #24059 - nikomatsakis:issue-22914-phantomdata-docs, r=huon

 This probably needs a bit more work, but I wanted to try and capture some common use cases and be a bit more helpful.

r? @huonw
cc @steveklabnik

9 years agoRollup merge of #24057 - nikomatsakis:lifetime-shadowing-hard-error, r=huon
Manish Goregaokar [Tue, 7 Apr 2015 12:42:40 +0000 (18:12 +0530)]
Rollup merge of #24057 - nikomatsakis:lifetime-shadowing-hard-error, r=huon

9 years agoRollup merge of #24042 - callahad:bug_24030, r=steveklabnik
Manish Goregaokar [Tue, 7 Apr 2015 12:42:32 +0000 (18:12 +0530)]
Rollup merge of #24042 - callahad:bug_24030, r=steveklabnik

 Fixes #24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.

r? @steveklabnik

9 years agoRollup merge of #23277 - aochagavia:intro, r=steveklabnik
Manish Goregaokar [Tue, 7 Apr 2015 12:42:22 +0000 (18:12 +0530)]
Rollup merge of #23277 - aochagavia:intro, r=steveklabnik

 cc @steveklabnik

9 years agoAuto merge of #23277 - aochagavia:intro, r=steveklabnik
bors [Tue, 7 Apr 2015 11:34:38 +0000 (11:34 +0000)]
Auto merge of #23277 - aochagavia:intro, r=steveklabnik

cc @steveklabnik

9 years agoAuto merge of #24116 - zaeleus:rustdoc-codespan, r=alexcrichton
bors [Tue, 7 Apr 2015 07:41:32 +0000 (07:41 +0000)]
Auto merge of #24116 - zaeleus:rustdoc-codespan, r=alexcrichton

Because the current style for `code` in rustdoc is to prewrap whitespace, code spans that are hard wrapped in the source documentation are prematurely wrapped when rendered in HTML. [For example][2],

```
/// ...
/// type can be borrowed as multiple different types. In particular, `Vec<T>:
/// Borrow<Vec<T>>` and `Vec<T>: Borrow<[T]>`.
```

renders as

![screen shot 2015-04-06 at 12 11 21](https://cloud.githubusercontent.com/assets/191331/7008216/2706b3b0-dc56-11e4-941e-1b0154fcbc5c.png)

because "`Vec<T>: Borrow<Vec<T>>`" wraps to the next line in the source.

CommonMark 0.18 [[1]] specifies "interior spaces and line endings are collapsed into single spaces" for code spans, which would actually prevent this issue, but hoedown does not currently conform to the
CommonMark spec.

The added span-level callback attempts to adhere to how whitespace is handled as described by CommonMark, fixing the issue of early, unintentional wrapping of code spans in rendered HTML.

[1]: http://spec.commonmark.org/0.18/
[2]: https://doc.rust-lang.org/std/borrow/trait.Borrow.html

9 years agoAuto merge of #24101 - remram44:fix-rustdoc-passes-help, r=nikomatsakis
bors [Tue, 7 Apr 2015 04:52:03 +0000 (04:52 +0000)]
Auto merge of #24101 - remram44:fix-rustdoc-passes-help, r=nikomatsakis

The current help string ("space separated list") suggests that `--passes "pass1 pass2"` is expected; the orrect usage is `--passes pass1 --passes pass2`.

9 years agoAuto merge of #23952 - Kimundi:more_string_pattern, r=alexcrichton
bors [Tue, 7 Apr 2015 00:57:08 +0000 (00:57 +0000)]
Auto merge of #23952 - Kimundi:more_string_pattern, r=alexcrichton

This adds the missing methods and turns `str::pattern` in a user facing module, as per RFC.

This also contains some big internal refactorings:
- string iterator pairs are implemented with a central macro to reduce redundancy
- Moved all tests from `coretest::str` into `collectionstest::str` and left a note to prevent the two sets of tests drifting apart further.

See https://github.com/rust-lang/rust/issues/22477

9 years agouse normative source for Grapheme class data
kwantam [Mon, 6 Apr 2015 23:42:18 +0000 (19:42 -0400)]
use normative source for Grapheme class data

@mahkoh points out in #15628 that unicode.py does not use
normative data for Grapheme classes. This pr fixes that issue.

In addition, GC_RegionalIndicator is renamed GC_Regional_Indicator
in order to stay in line with the Unicode class name definitions.
I have updated refs in u_str.rs, and verified that there are no
refs elsewhere in the codebase. However, in principle someone
using the unicode tables for their own purposes might see breakage
from this.

9 years agoAuto merge of #23857 - phildawes:libsyntax_nopanic, r=nikomatsakis
bors [Mon, 6 Apr 2015 22:08:01 +0000 (22:08 +0000)]
Auto merge of #23857 - phildawes:libsyntax_nopanic, r=nikomatsakis

Hello!

I've been working towards a libsyntax without panics. See:
http://internals.rust-lang.org/t/changing-libsyntax-to-use-result-instead-of-panic/1670

This patch changes the internals of parser.rs to use Result<> rather than panicing. It keeps the following old-style panicing functions as a facade:
parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt

I left these functions because I wasn't sure what to do about the quote_* macros or how many syntax-extensions would break if these and quoting macros returned Result.

The gyst of the rest of the patch is:

 - Functions in parse/parser.rs return PResult<> rather than panicing
 - Other functions in libsyntax call panic! explicitly if they rely on panicing behaviour.
 - I added a macro 'panictry!()' to act as scaffolding for callers while converting panicing functions. (This does the same as 'unwrap()' but is easier to grep for and turn into try!()).

Am I on the right track?  I'd quite like to get something merged soon as keeping this rebased in the face of libsyntax changes is a lot of work. Please let me know what changes you'd like to see to make this happen.

Thanks!, Phil

9 years agoAuto merge of #23655 - gereeter:rustc-remove-ident, r=sanxiyn
bors [Mon, 6 Apr 2015 19:20:39 +0000 (19:20 +0000)]
Auto merge of #23655 - gereeter:rustc-remove-ident, r=sanxiyn

...of #6993.

cc @pcwalton

9 years agorustdoc: Use iterators to collapse whitespace
Michael Macias [Mon, 6 Apr 2015 18:56:39 +0000 (13:56 -0500)]
rustdoc: Use iterators to collapse whitespace

Thanks, @alexcrichton!

9 years agorustdoc: Add a custom callback for codespan to collapse whitespace
Michael Macias [Mon, 6 Apr 2015 17:06:39 +0000 (12:06 -0500)]
rustdoc: Add a custom callback for codespan to collapse whitespace

Because the current style for `code` in rustdoc is to prewrap
whitespace, code spans that are hard wrapped in the source
documentation are prematurely wrapped when rendered in HTML.

CommonMark 0.18 [[1]] specifies "interior spaces and line endings are
collapsed into single spaces" for code spans, which would actually
prevent this issue, but hoedown does not currently conform to the
CommonMark spec.

The added span-level callback attempts to adhere to how whitespace is
handled as described by CommonMark, fixing the issue of early,
unintentional wrapping of code spans in rendered HTML.

[1]: http://spec.commonmark.org/0.18/

9 years agoAuto merge of #24056 - nikomatsakis:issue-23853-crates-io, r=aturon
bors [Mon, 6 Apr 2015 16:07:18 +0000 (16:07 +0000)]
Auto merge of #24056 - nikomatsakis:issue-23853-crates-io, r=aturon

If we find a blanket impl for `Trait` but we're matching on an object `Trait`, prefer the object (I think we could perhaps go either way, but this seems safer). Also give a nice error for attempts to manually `impl Trait for Trait`, since they will be ineffectual.

This fixes the problems around ambiguity ICEs relating to `Any` and `MarkerTrait` that were cropping up all over the place. There may still be similar ICEs reported in #21756 that this PR does not address.

Fixes #24015.

Fixes #24051.
Fixes #24037.
Fixes #23853.
Fixes #21942.
cc #21756.

cc @alexcrichton (this fixes crates.io)
r? @aturon

9 years agoRemove outdated notice from BufRead::lines docs.
Matt Brubeck [Mon, 6 Apr 2015 15:40:11 +0000 (08:40 -0700)]
Remove outdated notice from BufRead::lines docs.

There is no `read_string` function, and `lines` never returns an error.

9 years agoFix broken link and markup in `trait Any` docs.
Matt Brubeck [Mon, 6 Apr 2015 15:36:37 +0000 (08:36 -0700)]
Fix broken link and markup in `trait Any` docs.

9 years agotraits.md: Fix example of using traits to match description
Josh Triplett [Mon, 6 Apr 2015 15:14:11 +0000 (08:14 -0700)]
traits.md: Fix example of using traits to match description

traits.md said:

If we add a `use` line right above `main` and make the right things public,
everything is fine:

However, the use line was actually placed at the top of the file instead.  Move
the use line to right above main.  That also makes the example more evocative
of cases where the module is defined in a separate file.

9 years agoFix code formatting in `core::ops::Add` example
Tobias Bucher [Mon, 6 Apr 2015 14:01:01 +0000 (16:01 +0200)]
Fix code formatting in `core::ops::Add` example

9 years agoTry to improve PhantomData docs with more examples
Niko Matsakis [Sat, 4 Apr 2015 10:30:35 +0000 (06:30 -0400)]
Try to improve PhantomData docs with more examples

9 years agoFix tests
Niko Matsakis [Mon, 6 Apr 2015 13:35:12 +0000 (09:35 -0400)]
Fix tests

9 years agoAuto merge of #24104 - frewsxcv:patch-12, r=sanxiyn
bors [Mon, 6 Apr 2015 12:23:21 +0000 (12:23 +0000)]
Auto merge of #24104 - frewsxcv:patch-12, r=sanxiyn

9 years agoIf we find a blanket impl for `Trait` but we're matching on an object
Niko Matsakis [Sat, 4 Apr 2015 09:42:24 +0000 (05:42 -0400)]
If we find a blanket impl for `Trait` but we're matching on an object
`Trait`, prefer the object. Also give a nice error for attempts to
manually `impl Trait for Trait`, since they will be ineffectual.

Fixes #24015.

Fixes #24051.
Fixes #24037.
Fixes #23853.
Fixes #21942.
cc #21756.

9 years agoReplace alpha state by pre-1.0
Guillaume Gomez [Mon, 6 Apr 2015 09:14:21 +0000 (11:14 +0200)]
Replace alpha state by pre-1.0

9 years agoRemove unnecessary returns in API examples
Corey Farwell [Mon, 6 Apr 2015 07:06:24 +0000 (00:06 -0700)]
Remove unnecessary returns in API examples

9 years agoChanges rustdoc --passes help message
Remi Rampin [Mon, 6 Apr 2015 02:32:09 +0000 (22:32 -0400)]
Changes rustdoc --passes help message

The current help string ("space separated list") suggests that
`--passes "pass1 pass2"` is expected; the correct usage is
`--passes pass1 --passes pass2`.

9 years agoAuto merge of #24087 - mossberg:docs-comma, r=steveklabnik
bors [Mon, 6 Apr 2015 02:00:21 +0000 (02:00 +0000)]
Auto merge of #24087 - mossberg:docs-comma, r=steveklabnik

Correct mistyped comma, and slightly improve sentence.

r? @steveklabnik

9 years agoAuto merge of #24093 - GuillaumeGomez:typo, r=steveklabnik
bors [Sun, 5 Apr 2015 22:18:29 +0000 (22:18 +0000)]
Auto merge of #24093 - GuillaumeGomez:typo, r=steveklabnik

Fixes #24080.

9 years agoRemove external iterator in CharIndices comment and the reference to the std::iter...
Guillaume Gomez [Sun, 5 Apr 2015 16:54:07 +0000 (18:54 +0200)]
Remove external iterator in CharIndices comment and the reference to the std::iter module

9 years agoAdded smoke tests for new methods.
Marvin Löbel [Wed, 1 Apr 2015 23:12:58 +0000 (01:12 +0200)]
Added smoke tests for new methods.
Fixed bug in existing StrSearcher impl

9 years agoMoved coretest::str tests into collectiontest::str
Marvin Löbel [Wed, 1 Apr 2015 20:45:00 +0000 (22:45 +0200)]
Moved coretest::str tests into collectiontest::str

9 years agoRefactored core::str::pattern to become a user-facing module and hide away
Marvin Löbel [Mon, 23 Mar 2015 13:21:42 +0000 (14:21 +0100)]
Refactored core::str::pattern to become a user-facing module and hide away
CharEq.

9 years agoFormat all str docs to 80 char line breaks
Marvin Löbel [Sat, 4 Apr 2015 10:03:59 +0000 (12:03 +0200)]
Format all str docs to 80 char line breaks

9 years agoRe-added Clone impls to all str iterators
Marvin Löbel [Sun, 5 Apr 2015 16:52:14 +0000 (18:52 +0200)]
Re-added Clone impls to all str iterators

9 years agoImplemented remaining string pattern iterators.
Marvin Löbel [Sun, 15 Mar 2015 00:48:34 +0000 (01:48 +0100)]
Implemented remaining string pattern iterators.

- Added missing reverse versions of methods
- Added [r]matches()
- Generated the string pattern iterators with a macro
- Added where bounds to the methods returning reverse iterators
  for better error messages.

9 years agoAuto merge of #24053 - kvark:get_mut, r=alexcrichton
bors [Sun, 5 Apr 2015 16:14:11 +0000 (16:14 +0000)]
Auto merge of #24053 - kvark:get_mut, r=alexcrichton

As requested by @kballard in #23844

9 years agoAuto merge of #24084 - mdinger:align_nit, r=steveklabnik
bors [Sun, 5 Apr 2015 13:29:48 +0000 (13:29 +0000)]
Auto merge of #24084 - mdinger:align_nit, r=steveklabnik

Really minor nitpick but if you're gonna align them, they should be aligned properly.

r? @steveklabnik

9 years agoAuto merge of #24071 - github-monoculture:patch-1, r=steveklabnik
bors [Sun, 5 Apr 2015 10:46:38 +0000 (10:46 +0000)]
Auto merge of #24071 - github-monoculture:patch-1, r=steveklabnik

doc copy error
r? @steveklabnik

9 years agoAdd comments suggested by Niko
Phil Dawes [Sat, 4 Apr 2015 20:47:40 +0000 (21:47 +0100)]
Add comments suggested by Niko

9 years agoWork towards a non-panicing parser (libsyntax)
Phil Dawes [Sat, 28 Mar 2015 21:58:51 +0000 (21:58 +0000)]
Work towards a non-panicing parser (libsyntax)

- Functions in parser.rs return PResult<> rather than panicing
- Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour.
- 'panictry!' macro added as scaffolding while converting panicing functions.
  (This does the same as 'unwrap()' but is easier to grep for and turn into try!())
- Leaves panicing wrappers for the following functions so that the
  quote_* macros behave the same:
  - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt

9 years agoDocumentation fix
Mark Mossberg [Sun, 5 Apr 2015 06:56:16 +0000 (02:56 -0400)]
Documentation fix

Correct mistyped comma, and slightly improve sentence.

9 years agoAuto merge of #23976 - dhuseby:bitrig_fixing_tests, r=alexcrichton
bors [Sun, 5 Apr 2015 06:28:08 +0000 (06:28 +0000)]
Auto merge of #23976 - dhuseby:bitrig_fixing_tests, r=alexcrichton

This fixes up the "make check" part of the rust build os that the Bitrig buildbot will succeed.

9 years agoAuto merge of #24067 - apasel422:patch-1, r=Gankro
bors [Sun, 5 Apr 2015 02:47:13 +0000 (02:47 +0000)]
Auto merge of #24067 - apasel422:patch-1, r=Gankro

Per [RFC #0505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#formatting).

9 years agoAlignment nitpick
mdinger [Sun, 5 Apr 2015 00:34:59 +0000 (20:34 -0400)]
Alignment nitpick

9 years agoAuto merge of #24055 - estsauver:24044, r=alexcrichton
bors [Sun, 5 Apr 2015 00:03:21 +0000 (00:03 +0000)]
Auto merge of #24055 - estsauver:24044, r=alexcrichton

If a result is highlighted, when the search changes that state should no
longer be highlighted. Fixes #24044

cc @steveklabnik

9 years agoRemoved explicit lifetimes for `get_mut`. Fixed the doc test.
Dzmitry Malyshau [Sat, 4 Apr 2015 22:54:23 +0000 (18:54 -0400)]
Removed explicit lifetimes for `get_mut`. Fixed the doc test.

9 years agoRenamed Arc::try_unique to get_mut
Dzmitry Malyshau [Sat, 4 Apr 2015 06:54:49 +0000 (02:54 -0400)]
Renamed Arc::try_unique to get_mut

9 years agoAuto merge of #24016 - aquach:master, r=Manishearth
bors [Sat, 4 Apr 2015 21:19:31 +0000 (21:19 +0000)]
Auto merge of #24016 - aquach:master, r=Manishearth

Ran across this one while learning from the Book.

9 years agofixing some tests and temporarily disabling others to get Bitrig build working 100%
Dave Huseby [Mon, 23 Mar 2015 19:48:42 +0000 (12:48 -0700)]
fixing some tests and temporarily disabling others to get Bitrig build working 100%

9 years agoAuto merge of #24045 - frewsxcv:cleanup, r=alexcrichton
bors [Sat, 4 Apr 2015 18:35:39 +0000 (18:35 +0000)]
Auto merge of #24045 - frewsxcv:cleanup, r=alexcrichton

9 years agoUpdate method-syntax.md
github-monoculture [Sat, 4 Apr 2015 17:49:16 +0000 (17:49 +0000)]
Update method-syntax.md

doc copy error
r? @steveklabnik

9 years agoAuto merge of #23987 - liammonahan:master, r=Manishearth
bors [Sat, 4 Apr 2015 15:51:03 +0000 (15:51 +0000)]
Auto merge of #23987 - liammonahan:master, r=Manishearth

I ran across a comma splice.

I didn't set the "note:" off inside parenthesis.  I looked around in other places and saw it both ways, but without surrounding parenthesis seemed to be the more common convention followed elsewhere in the docs.  Let me know if you have an overriding preference about that and I'll change it.

r? @steveklabnik

9 years agos/Perform/Performs/
Andrew Paseltiner [Sat, 4 Apr 2015 14:26:14 +0000 (10:26 -0400)]
s/Perform/Performs/

Per [RFC #0505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#formatting).

9 years agoAuto merge of #23981 - chastell:book_crates-and-modules_io_sync, r=Manishearth
bors [Sat, 4 Apr 2015 13:07:34 +0000 (13:07 +0000)]
Auto merge of #23981 - chastell:book_crates-and-modules_io_sync, r=Manishearth

This syncs the _Crates and Modules_ chapter of the book with current output:

* the runs are supposed to be in the project’s directory,
* `rustc` has slightly different error messages (and things like macro line:col numbers),
* Cargo now compiles things into `target/debug`.

9 years agoConvert lifetime shadowing into a hard error, as promised.
Niko Matsakis [Sat, 4 Apr 2015 09:54:28 +0000 (05:54 -0400)]
Convert lifetime shadowing into a hard error, as promised.

9 years agoMake changing doc search unhighlight current result
Earl St Sauver [Sat, 4 Apr 2015 08:21:18 +0000 (15:21 +0700)]
Make changing doc search unhighlight current result

If a result is highlighted, when the search changes that state should no
longer be highlighted. Fixes #24044

cc @steveklabnik

9 years agoAuto merge of #24009 - Manishearth:rollup, r=Manishearth
bors [Sat, 4 Apr 2015 07:20:04 +0000 (07:20 +0000)]
Auto merge of #24009 - Manishearth:rollup, r=Manishearth

9 years agoFix doc (fixup #24031)
Manish Goregaokar [Sat, 4 Apr 2015 07:20:43 +0000 (12:50 +0530)]
Fix doc (fixup #24031)

9 years agoRollup merge of #24040 - hackaugusto:patch-1, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:28:07 +0000 (10:58 +0530)]
Rollup merge of #24040 - hackaugusto:patch-1, r=steveklabnik

9 years agoRollup merge of #24039 - frewsxcv:patch-10, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:27:48 +0000 (10:57 +0530)]
Rollup merge of #24039 - frewsxcv:patch-10, r=steveklabnik

9 years agoRollup merge of #24038 - frewsxcv:patch-9, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:27:26 +0000 (10:57 +0530)]
Rollup merge of #24038 - frewsxcv:patch-9, r=steveklabnik

9 years agoRollup merge of #24032 - steveklabnik:beta_install, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:26:56 +0000 (10:56 +0530)]
Rollup merge of #24032 - steveklabnik:beta_install, r=alexcrichton

 Default is now beta, add nightly in the unstable section

9 years agoRollup merge of #24031 - callahad:trpl_old_io_removal, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:26:40 +0000 (10:56 +0530)]
Rollup merge of #24031 - callahad:trpl_old_io_removal, r=steveklabnik

 Also: the std_misc feature flag is removed; it's not needed in Beta.

Hat tip to @tshepang in #23871

Fixes #24023

This PR replaces #24024

9 years agoRollup merge of #24022 - steveklabnik:hn_fix, r=nikomatsakis
Manish Goregaokar [Sat, 4 Apr 2015 05:26:23 +0000 (10:56 +0530)]
Rollup merge of #24022 - steveklabnik:hn_fix, r=nikomatsakis

 from https://news.ycombinator.com/item?id=9317822

9 years agoRollup merge of #24012 - tsion:patch-1, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:26:06 +0000 (10:56 +0530)]
Rollup merge of #24012 - tsion:patch-1, r=steveklabnik

 This was brought up in IRC by a confused reader.

r? steveklabnik

9 years agoRollup merge of #23997 - richo:typos, r=huonw
Manish Goregaokar [Sat, 4 Apr 2015 05:25:44 +0000 (10:55 +0530)]
Rollup merge of #23997 - richo:typos, r=huonw

 Kinda hoped I'd spot something else for this PR, but then didn't.

9 years agoRollup merge of #23996 - frewsxcv:patch-8, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:25:30 +0000 (10:55 +0530)]
Rollup merge of #23996 - frewsxcv:patch-8, r=alexcrichton

9 years agoRollup merge of #23993 - aturon:beta-update-authors, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:25:13 +0000 (10:55 +0530)]
Rollup merge of #23993 - aturon:beta-update-authors, r=alexcrichton

 r? @alexcrichton @brson

9 years agoRollup merge of #23990 - dhuseby:bitrig_fixing_jemalloc_config, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:24:58 +0000 (10:54 +0530)]
Rollup merge of #23990 - dhuseby:bitrig_fixing_jemalloc_config, r=alexcrichton

 Until I can figure out the correct way to configure jemalloc for Bitrig, this patch will correctly disable it.  All other build targets remain unchanged.

9 years agoRollup merge of #23978 - brson:installer, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:24:40 +0000 (10:54 +0530)]
Rollup merge of #23978 - brson:installer, r=alexcrichton

 Won't make it for beta, but it's rust-packaging that matters.

r? @alexcrichton

9 years agoRollup merge of #23941 - carloslfu:patch-1, r=steveklabnik
Manish Goregaokar [Sat, 4 Apr 2015 05:24:24 +0000 (10:54 +0530)]
Rollup merge of #23941 - carloslfu:patch-1, r=steveklabnik

 Validate if the description is available in the rawSearchIndex

9 years agoRollup merge of #24033 - petrochenkov:pattest, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:24:10 +0000 (10:54 +0530)]
Rollup merge of #24033 - petrochenkov:pattest, r=alexcrichton

 This was supposed to be a part of #23930

9 years agoRollup merge of #24005 - ranma42:macosx-no-javac-popup, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:23:52 +0000 (10:53 +0530)]
Rollup merge of #24005 - ranma42:macosx-no-javac-popup, r=alexcrichton

 MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes #23138.

9 years agoRollup merge of #23995 - aturon:cow-as-ref, r=huonw
Manish Goregaokar [Sat, 4 Apr 2015 05:23:37 +0000 (10:53 +0530)]
Rollup merge of #23995 - aturon:cow-as-ref, r=huonw

 The existing impl had the too-strong requirement of `Clone`, when only
`ToOwned` was needed.

9 years agoRollup merge of #23979 - Ryman:error_from_string, r=alexcrichton
Manish Goregaokar [Sat, 4 Apr 2015 05:23:22 +0000 (10:53 +0530)]
Rollup merge of #23979 - Ryman:error_from_string, r=alexcrichton

9 years agoCleanup and modernize some things in libcore::iter
Corey Farwell [Sat, 4 Apr 2015 03:45:43 +0000 (20:45 -0700)]
Cleanup and modernize some things in libcore::iter

9 years agobook: use `mod test` consistently
Dan Callahan [Sat, 4 Apr 2015 03:38:30 +0000 (22:38 -0500)]
book: use `mod test` consistently

Fixes #24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.

9 years agoAuto merge of #23979 - Ryman:error_from_string, r=alexcrichton
bors [Sat, 4 Apr 2015 02:45:41 +0000 (02:45 +0000)]
Auto merge of #23979 - Ryman:error_from_string, r=alexcrichton

9 years agoRemoved repeated sentence.
Augusto Hack [Sat, 4 Apr 2015 01:56:34 +0000 (22:56 -0300)]
Removed repeated sentence.

9 years agoMake example function in comment more idiomatic
Corey Farwell [Sat, 4 Apr 2015 01:32:29 +0000 (18:32 -0700)]
Make example function in comment more idiomatic

9 years agoSimplify `match` branches in documentation comment
Corey Farwell [Sat, 4 Apr 2015 01:09:11 +0000 (18:09 -0700)]
Simplify `match` branches in documentation comment

9 years agoUpdate Rust install instructions in TRPL
Steve Klabnik [Fri, 3 Apr 2015 23:09:41 +0000 (19:09 -0400)]
Update Rust install instructions in TRPL

Default is now beta, add nightly in the unstable section

9 years agoIn librustc*, convert many uses of ast::Ident to ast::Name, fixing much of #6993.
Jonathan S [Tue, 24 Mar 2015 00:41:35 +0000 (19:41 -0500)]
In librustc*, convert many uses of ast::Ident to ast::Name, fixing much of #6993.

9 years agoAuto merge of #23972 - gkoz:partial_eq_str_string, r=alexcrichton
bors [Fri, 3 Apr 2015 22:37:07 +0000 (22:37 +0000)]
Auto merge of #23972 - gkoz:partial_eq_str_string, r=alexcrichton

Right now comparing a `&String` (or a `&Cow`) to a `&str` requires redundant borrowing of the latter. Implementing `PartialEq<str>` tries to avoid this limitation.

```rust
struct Foo (String);

fn main () {
    let s = Foo("foo".to_string());
    match s {
        Foo(ref x) if x == &"foo" => println!("foo!"),
        // avoid this -----^
        _ => {}
    }
}
```

I was hoping that #23521 would solve this but it didn't work out.

9 years agoRemove old_io from trpl/concurrency.md
Dan Callahan [Fri, 3 Apr 2015 19:29:33 +0000 (14:29 -0500)]
Remove old_io from trpl/concurrency.md

Also: the std_misc feature flag is removed; it's not needed in Beta.

Hat tip to @tshepang in #23871

Fixes #24023

9 years agoDelete duplicated sentence.
Alex Quach [Fri, 3 Apr 2015 19:56:28 +0000 (12:56 -0700)]
Delete duplicated sentence.

9 years agoAuto merge of #24018 - nikomatsakis:marker-trait-stability, r=alexcrichton
bors [Fri, 3 Apr 2015 19:53:27 +0000 (19:53 +0000)]
Auto merge of #24018 - nikomatsakis:marker-trait-stability, r=alexcrichton

r? @alexcrichton

9 years agoDon't speak of old_io
Steve Klabnik [Fri, 3 Apr 2015 19:24:47 +0000 (15:24 -0400)]
Don't speak of old_io

from https://news.ycombinator.com/item?id=9317822

9 years agoRevert accidental change from stable -> unstable; just meant to
Niko Matsakis [Fri, 3 Apr 2015 18:30:13 +0000 (14:30 -0400)]
Revert accidental change from stable -> unstable; just meant to
deprecate (though these will likely be purged for 1.0).

9 years agoFixing copy/paste typo.
Alex Quach [Fri, 3 Apr 2015 18:17:15 +0000 (11:17 -0700)]
Fixing copy/paste typo.

9 years agoRemove unnecessary `Vec<_>` annotation from docs
Scott Olson [Fri, 3 Apr 2015 17:23:58 +0000 (13:23 -0400)]
Remove unnecessary `Vec<_>` annotation from docs

This was brought up in IRC by a confused reader.

9 years agothis correctly disables jemalloc on Bitrig
Dave Huseby [Fri, 3 Apr 2015 00:27:19 +0000 (17:27 -0700)]
this correctly disables jemalloc on Bitrig

9 years agoAuto merge of #23930 - petrochenkov:issue23656, r=nrc
bors [Fri, 3 Apr 2015 15:44:24 +0000 (15:44 +0000)]
Auto merge of #23930 - petrochenkov:issue23656, r=nrc

Fixes #22757
Fixes #22972
Fixes #23044
Fixes #23151
Fixes #23597
Fixes #23656
Fixes #23929
It also fixes some other corner cases in range patterns, like incorrect spans or not accepting global paths after `...`.

It passes `make check` but needs some additional tests (then it will fix #22546 as well), I'll write them today or tomorrow.

9 years agoWorkaround `javac` popup on MacOS X
Andrea Canciani [Fri, 3 Apr 2015 13:05:54 +0000 (15:05 +0200)]
Workaround `javac` popup on MacOS X

MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes #23138.