]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoTRPL: Clean up some Markdown links
Pascal Hertleif [Mon, 25 May 2015 13:10:50 +0000 (15:10 +0200)]
TRPL: Clean up some Markdown links

In all other places the IDs of link references are without spaces (and
explicitly set).

9 years agoAuto merge of #25764 - tshepang:typo, r=steveklabnik
bors [Mon, 25 May 2015 05:19:11 +0000 (05:19 +0000)]
Auto merge of #25764 - tshepang:typo, r=steveklabnik

9 years agoAuto merge of #25761 - ralexstokes:master, r=steveklabnik
bors [Mon, 25 May 2015 03:40:31 +0000 (03:40 +0000)]
Auto merge of #25761 - ralexstokes:master, r=steveklabnik

Typo in explanation of difference between stack and heap values.

`baz` is called at the end of a call to `bar` inside another call to `foo`.  `baz` takes a copy of the value `e` which should have a value of 9 if following the rest of the stack trace.

This PR fixes this typo and should close #25635.

9 years agoAuto merge of #25736 - tshepang:path-nits, r=steveklabnik
bors [Mon, 25 May 2015 01:56:48 +0000 (01:56 +0000)]
Auto merge of #25736 - tshepang:path-nits, r=steveklabnik

9 years agoAuto merge of #25756 - tshepang:needless-cloned, r=steveklabnik
bors [Mon, 25 May 2015 00:15:24 +0000 (00:15 +0000)]
Auto merge of #25756 - tshepang:needless-cloned, r=steveklabnik

9 years agodoc: fix io::Write::write typo
Tshepang Lekhonkhobe [Sun, 24 May 2015 23:53:44 +0000 (01:53 +0200)]
doc: fix io::Write::write typo

9 years agoAuto merge of #25758 - tshepang:add-cloned-example, r=Gankro
bors [Sun, 24 May 2015 22:42:00 +0000 (22:42 +0000)]
Auto merge of #25758 - tshepang:add-cloned-example, r=Gankro

9 years agodoc: add example for Iterator::cloned()
Tshepang Lekhonkhobe [Sun, 24 May 2015 21:38:26 +0000 (23:38 +0200)]
doc: add example for Iterator::cloned()

9 years agoFix typo in diagram demonstrating stack vs. heap values
Alex Stokes [Sun, 24 May 2015 22:18:43 +0000 (15:18 -0700)]
Fix typo in diagram demonstrating stack vs. heap values

9 years agodoc: cloned() and mut not needed
Tshepang Lekhonkhobe [Sun, 24 May 2015 20:55:34 +0000 (22:55 +0200)]
doc: cloned() and mut not needed

9 years agoAuto merge of #25464 - zaeleus:trpl-riol, r=pnkfelix
bors [Sun, 24 May 2015 15:52:17 +0000 (15:52 +0000)]
Auto merge of #25464 - zaeleus:trpl-riol, r=pnkfelix

r? @steveklabnik

9 years agoAuto merge of #25609 - nikomatsakis:const-fn, r=pnkfelix
bors [Sun, 24 May 2015 11:12:34 +0000 (11:12 +0000)]
Auto merge of #25609 - nikomatsakis:const-fn, r=pnkfelix

This is a port of @eddyb's `const-fn` branch. I rebased it, tweaked a few things, and added tests as well as a feature gate. The set of tests is still pretty rudimentary, I'd appreciate suggestions on new tests to write. Also, a double-check that the feature-gate covers all necessary cases.

One question: currently, the feature-gate allows the *use* of const functions from stable code, just not the definition. This seems to fit our usual strategy, and implies that we might (perhaps) allow some constant functions in libstd someday, even before stabilizing const-fn, if we were willing to commit to the existence of const fns but found some details of their impl unsatisfactory.

r? @pnkfelix

9 years agoAuto merge of #25168 - Manishearth:register_attr, r=eddyb
bors [Sun, 24 May 2015 09:38:26 +0000 (09:38 +0000)]
Auto merge of #25168 - Manishearth:register_attr, r=eddyb

This lets plugin authors opt attributes out of the `custom_attribute`
and `unused_attribute` checks.

cc @thepowersgang

9 years agoAuto merge of #25719 - brson:crosslink, r=eddyb
bors [Sun, 24 May 2015 00:36:56 +0000 (00:36 +0000)]
Auto merge of #25719 - brson:crosslink, r=eddyb

The recent MSVC patch made the build system pass explicit linkers to
rustc, but did not set that up for anything other than MSVC.

This is blocking nightlies.

9 years agoAuto merge of #25666 - tshepang:better-path-docs, r=steveklabnik
bors [Sat, 23 May 2015 22:07:58 +0000 (22:07 +0000)]
Auto merge of #25666 - tshepang:better-path-docs, r=steveklabnik

9 years agodoc: fix Windows test failure
Tshepang Lekhonkhobe [Sat, 23 May 2015 19:42:11 +0000 (21:42 +0200)]
doc: fix Windows test failure

9 years agopath: make this bit follow idiom
Tshepang Lekhonkhobe [Sat, 23 May 2015 17:51:52 +0000 (19:51 +0200)]
path: make this bit follow idiom

9 years agodoc: missing words
Tshepang Lekhonkhobe [Sat, 23 May 2015 17:51:07 +0000 (19:51 +0200)]
doc: missing words

9 years agoAuto merge of #25735 - oli-obk:rollup, r=steveklabnik
bors [Sat, 23 May 2015 17:33:54 +0000 (17:33 +0000)]
Auto merge of #25735 - oli-obk:rollup, r=steveklabnik

- Successful merges: #25681, #25687, #25695, #25697, #25702, #25703, #25709, #25710, #25714, #25715, #25716, #25722
- Failed merges:

9 years agoRollup merge of #25722 - nickdesaulniers:configureClang37, r=brson
Oliver Schneider [Sat, 23 May 2015 17:03:20 +0000 (19:03 +0200)]
Rollup merge of #25722 - nickdesaulniers:configureClang37, r=brson

Was able to successfully configure.  Building and testing now.

9 years agoRollup merge of #25716 - steveklabnik:remove_bad_docs, r=Gankro
Oliver Schneider [Sat, 23 May 2015 17:03:20 +0000 (19:03 +0200)]
Rollup merge of #25716 - steveklabnik:remove_bad_docs, r=Gankro

9 years agoRollup merge of #25715 - nero-luci:patch-1, r=steveklabnik
Oliver Schneider [Sat, 23 May 2015 17:03:19 +0000 (19:03 +0200)]
Rollup merge of #25715 - nero-luci:patch-1, r=steveklabnik

I consider that this version has a better reading fluency, instead of having a period between clauses

9 years agoRollup merge of #25714 - brianquinlan:patch-1, r=huonw
Oliver Schneider [Sat, 23 May 2015 17:03:19 +0000 (19:03 +0200)]
Rollup merge of #25714 - brianquinlan:patch-1, r=huonw

9 years agoRollup merge of #25710 - Manishearth:no_decorator_clone, r=sfackler
Oliver Schneider [Sat, 23 May 2015 17:03:19 +0000 (19:03 +0200)]
Rollup merge of #25710 - Manishearth:no_decorator_clone, r=sfackler

fixes #25683

I have a very nonscientific measurement of the data via valgrind/massif [here](https://gist.github.com/Manishearth/4c47f15f6835cb3957c4)

I measured the memory usage for both --pretty=expanded and -Z no-trans

It *seems* like there's a 20-25MB decrease during expansion on stage2 librustc; but I'm not quite sure.

r? @eddyb

(have not yet run tests, but it compiles fine, might want to wait before giving r+)

cc @nrc @huon

9 years agoRollup merge of #25709 - MatejLach:stdlib_style, r=steveklabnik
Oliver Schneider [Sat, 23 May 2015 17:03:19 +0000 (19:03 +0200)]
Rollup merge of #25709 - MatejLach:stdlib_style, r=steveklabnik

Sounds better to me this way.
r @steveklabnik ?

9 years agoRollup merge of #25703 - eddyb:lazier-loads, r=pnkfelix
Oliver Schneider [Sat, 23 May 2015 17:03:19 +0000 (19:03 +0200)]
Rollup merge of #25703 - eddyb:lazier-loads, r=pnkfelix

Reduces pre-trans heap baseline (tested on `fn main() {}`) from 1.2MB to 696kB.
Most of the remaining allocations are used by imported macros.
While it might be possible to also load macros lazily, doing so is non-trivial and this PR doesn't tackle that.

9 years agoRollup merge of #25702 - killercup:rustdoc/search-primitives, r=Gankro
Oliver Schneider [Sat, 23 May 2015 17:03:18 +0000 (19:03 +0200)]
Rollup merge of #25702 - killercup:rustdoc/search-primitives, r=Gankro

This minimally changes rustdoc's search as described in #25167.

Additionally, I also cleaned up some parts of the JS code.

There is one more change I made: After each result for a primitive type, I added "(Overview of primitive type)". This further differentiates the result from the module (previously, the only difference was that the module's link was blue). I'm not this is the way to go (this seems to be the only place where we do this) and it's no problem for me to remove that commit.

![std__str_-_rust](https://cloud.githubusercontent.com/assets/20063/7770589/67e8cb26-0090-11e5-8f99-c2a3af9fa37f.png)

cc @steveklabnik (it concerns docs) and @alexcrichton (who made changes to rustdoc previously)

9 years agoRollup merge of #25697 - geofft:configure-friendliness, r=brson
Oliver Schneider [Sat, 23 May 2015 17:03:18 +0000 (19:03 +0200)]
Rollup merge of #25697 - geofft:configure-friendliness, r=brson

Make the error message about missing dependencies clearer, since "need program file" is pretty confusing, and make full commands get logged, since that seems to have been the intention.

9 years agoRollup merge of #25695 - mbrubeck:reference, r=brson
Oliver Schneider [Sat, 23 May 2015 17:03:18 +0000 (19:03 +0200)]
Rollup merge of #25695 - mbrubeck:reference, r=brson

r? @steveklabnik

9 years agoRollup merge of #25687 - tamird:num-self-cleanup, r=Gankro
Oliver Schneider [Sat, 23 May 2015 17:03:18 +0000 (19:03 +0200)]
Rollup merge of #25687 - tamird:num-self-cleanup, r=Gankro

Cleanup extracted from #25684. r? @alexcrichton

9 years agoRollup merge of #25681 - steveklabnik:gender, r=nmatsakis
Oliver Schneider [Sat, 23 May 2015 17:03:18 +0000 (19:03 +0200)]
Rollup merge of #25681 - steveklabnik:gender, r=nmatsakis

Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well.

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643

9 years agoAuto merge of #25667 - lambda:rename-soft_link-to-symlink-landed-in-1.1, r=aturon
bors [Sat, 23 May 2015 15:57:48 +0000 (15:57 +0000)]
Auto merge of #25667 - lambda:rename-soft_link-to-symlink-landed-in-1.1, r=aturon

The change to split up soft_link to OS-specific symlink, symlink_file,
and symlink_dir didn't actually land in 1.0.0.  Update the stability and
deprecation attributes to correctly indicate that these changes happend
in 1.1.0.

9 years agoAuto merge of #25653 - dotdash:unsize_c, r=luqmana
bors [Sat, 23 May 2015 14:22:35 +0000 (14:22 +0000)]
Auto merge of #25653 - dotdash:unsize_c, r=luqmana

Fixes #25581

9 years agoAuto merge of #25632 - alexcrichton:dt-dir, r=brson
bors [Sat, 23 May 2015 12:47:16 +0000 (12:47 +0000)]
Auto merge of #25632 - alexcrichton:dt-dir, r=brson

This "fast path" in `DirEntry::file_type` on Unix wasn't turning out to be so
much of a fast path as the `DT_DIR` case wasn't handled, so directories fell
back to using `lstat` instead. This commit adds the missing case to return
quickly if a path is a directory and `DirEntry::file_type` is used.

9 years agoAuto merge of #25416 - kballard:ffi-cstr-to-str-convenience, r=alexcrichton
bors [Sat, 23 May 2015 11:12:02 +0000 (11:12 +0000)]
Auto merge of #25416 - kballard:ffi-cstr-to-str-convenience, r=alexcrichton

This was motivated by http://www.evanmiller.org/a-taste-of-rust.html.

A common problem when working with FFI right now is converting from raw
C strings into `&str` or `String`. Right now you're required to say
something like

    let cstr = unsafe { CStr::from_ptr(ptr) };
    let result = str::from_utf8(cstr.to_bytes());

This is slightly awkward, and is not particularly intuitive for people
who haven't used the ffi module before. We can do a bit better by
providing some convenience methods on CStr:

    fn to_str(&self) -> Result<&str, str::Utf8Error>
    fn to_string_lossy(&self) -> Cow<str>

This will make it immediately apparent to new users of CStr how to get a
string from a raw C string, so they can say:

    let s = unsafe { CStr::from_ptr(ptr).to_string_lossy() };

9 years agoAuto merge of #24847 - sfackler:debug-builders-stability, r=aturon
bors [Sat, 23 May 2015 09:36:56 +0000 (09:36 +0000)]
Auto merge of #24847 - sfackler:debug-builders-stability, r=aturon

The `debug_builders` feature is up for 1.1 stabilization in #24028. This commit stabilizes the API as-is with no changes.

Some nits that @alexcrichton mentioned that may be worth discussing now if anyone cares:

* Should `debug_tuple_struct` and `DebugTupleStruct` be used instead of `debug_tuple` and `DebugTuple`? It's more typing but is a technically more correct name.
* `DebugStruct` and `DebugTuple` have `field` methods while `DebugSet`, `DebugMap` and `DebugList` have `entry` methods. Should we switch those to something else for consistency?

cc @alexcrichton @aturon

9 years agoAuto merge of #25717 - brson:compiler-docs, r=pnkfelix
bors [Sat, 23 May 2015 08:01:08 +0000 (08:01 +0000)]
Auto merge of #25717 - brson:compiler-docs, r=pnkfelix

The install target depends on compiler-docs but 'all' does not.
This means that running 'make && make install' will run additional
doc builds and tests during installation, which hides bugs in
the build.

For now this just unconditionally stops building compiler docs.

9 years agoMerge pull request #25706 from pnkfelix/remove-diagnostics-gen-and-check
Felix S Klock II [Sat, 23 May 2015 05:50:46 +0000 (07:50 +0200)]
Merge pull request #25706 from pnkfelix/remove-diagnostics-gen-and-check

Remove error diagnostics uniqueness check and .json generation.

9 years agoallow clang 3.7 to be used when configuring Fixes #25720
Nick Desaulniers [Fri, 22 May 2015 23:07:25 +0000 (16:07 -0700)]
allow clang 3.7 to be used when configuring Fixes #25720

9 years agoSpecify linkers for cross-compile scenarios
Brian Anderson [Fri, 22 May 2015 21:56:41 +0000 (14:56 -0700)]
Specify linkers for cross-compile scenarios

The recent MSVC patch made the build system pass explicit linkers to
rustc, but did not set that up for anything other than MSVC.

9 years agoRustdoc Search: Add Hint to Primitive Type Result
Pascal Hertleif [Fri, 22 May 2015 12:25:29 +0000 (14:25 +0200)]
Rustdoc Search: Add Hint to Primitive Type Result

Closes #25167

9 years agomk: Don't build compiler-docs before installation. #25699
Brian Anderson [Fri, 22 May 2015 20:02:52 +0000 (13:02 -0700)]
mk: Don't build compiler-docs before installation. #25699

The install target depends on compiler-docs but 'all' does not.
This means that running 'make && make install' will run additional
doc builds and tests during installation, which hides bugs in
the build.

For now this just unconditionally stops building compiler docs.

9 years agoDon't mention outdated methods
Steve Klabnik [Fri, 22 May 2015 19:24:56 +0000 (15:24 -0400)]
Don't mention outdated methods

9 years agoUpdate guessing-game.md
Cornel Punga [Fri, 22 May 2015 18:55:50 +0000 (21:55 +0300)]
Update guessing-game.md

I consider that this version has a better reading fluency, instead of having a period between clauses

9 years agoAdd some convenience methods to go from CStr -> str
Kevin Ballard [Thu, 14 May 2015 21:49:32 +0000 (14:49 -0700)]
Add some convenience methods to go from CStr -> str

A common problem when working with FFI right now is converting from raw
C strings into `&str` or `String`. Right now you're required to say
something like

    let cstr = unsafe { CStr::from_ptr(ptr) };
    let result = str::from_utf8(cstr.to_bytes());

This is slightly awkward, and is not particularly intuitive for people
who haven't used the ffi module before. We can do a bit better by
providing some convenience methods on CStr:

    fn to_str(&self) -> Result<&str, str::Utf8Error>
    fn to_string_lossy(&self) -> Cow<str>

This will make it immediately apparent to new users of CStr how to get a
string from a raw C string, so they can say:

    let s = unsafe { CStr::from_ptr(ptr).to_string_lossy() };

9 years agoMake it clear that push is only amortized O(1)
Brian Quinlan [Fri, 22 May 2015 17:26:18 +0000 (10:26 -0700)]
Make it clear that push is only amortized O(1)

9 years agobetter describe the stdlib
Matej Ľach [Fri, 22 May 2015 15:42:57 +0000 (16:42 +0100)]
better describe the stdlib

9 years agoLet MultiItemDecorator take `&Annotatable` (fixes #25683)
Manish Goregaokar [Fri, 22 May 2015 15:40:14 +0000 (21:10 +0530)]
Let MultiItemDecorator take `&Annotatable` (fixes #25683)

9 years agoRemove error diagnostics uniqueness check and .json generation.
Felix S. Klock II [Tue, 19 May 2015 12:26:39 +0000 (14:26 +0200)]
Remove error diagnostics uniqueness check and .json generation.

This is meant to be a temporary measure to get the builds to be
reliable again; see also Issue #25705.

9 years agoLazy-load filemaps from external crates.
Eduard Burtescu [Fri, 22 May 2015 13:15:21 +0000 (16:15 +0300)]
Lazy-load filemaps from external crates.

9 years agoTwo more small fixes.
Niko Matsakis [Fri, 22 May 2015 12:45:05 +0000 (08:45 -0400)]
Two more small fixes.

9 years agoRustdoc Search: Increase Relevance of Primitives
Pascal Hertleif [Fri, 22 May 2015 12:15:35 +0000 (14:15 +0200)]
Rustdoc Search: Increase Relevance of Primitives

9 years agoRustdoc: Clean Up Some JS
Pascal Hertleif [Fri, 22 May 2015 12:14:28 +0000 (14:14 +0200)]
Rustdoc: Clean Up Some JS

There are more possible optimizations left (cached length in loops) as
well as some possible bugs (shadowed variables) to fix. This is mostly
syntactic.

9 years agoconfigure: Fix printing of commands from `run`
Geoffrey Thomas [Fri, 22 May 2015 04:25:01 +0000 (00:25 -0400)]
configure: Fix printing of commands from `run`

The `run` function passed its argument to `msg` via `"$@"`, but `msg`
only printed its first argument. I think the intention was for `msg` to
print all its arguments. (If not, `run` should only `msg "$1"`.)

9 years agoconfigure: Clarify error message about missing dependencies
Geoffrey Thomas [Fri, 22 May 2015 04:20:04 +0000 (00:20 -0400)]
configure: Clarify error message about missing dependencies

Took me a moment to figure out that the appropriate response to
"need program file" was to install the program named "file", not
to think "If I didn't need the program file, why would I be
compiling things?".

9 years agoDocument the debug_assertions cfg option
Matt Brubeck [Thu, 21 May 2015 23:34:26 +0000 (16:34 -0700)]
Document the debug_assertions cfg option

9 years agoAuto merge of #25669 - GuillaumeGomez:typo-fix, r=Manishearth
bors [Thu, 21 May 2015 19:41:18 +0000 (19:41 +0000)]
Auto merge of #25669 - GuillaumeGomez:typo-fix, r=Manishearth

r? @steveklabnik

9 years agodoc: miscellaneous improvements to std::path::Path examples
Tshepang Lekhonkhobe [Thu, 21 May 2015 01:29:46 +0000 (03:29 +0200)]
doc: miscellaneous improvements to std::path::Path examples

9 years agoReplace "more later" by "later"
Guillaume Gomez [Thu, 21 May 2015 18:30:15 +0000 (20:30 +0200)]
Replace "more later" by "later"

9 years agoStandardize on `$t:ty`
Tamir Duberstein [Thu, 21 May 2015 18:04:13 +0000 (14:04 -0400)]
Standardize on `$t:ty`

9 years agoUse `Self` to simplify
Tamir Duberstein [Thu, 21 May 2015 18:01:44 +0000 (14:01 -0400)]
Use `Self` to simplify

9 years agoAuto merge of #25601 - ericye16:master, r=steveklabnik
bors [Thu, 21 May 2015 17:01:51 +0000 (17:01 +0000)]
Auto merge of #25601 - ericye16:master, r=steveklabnik

9 years agoshe -> they in Dining Philosophers
Steve Klabnik [Thu, 21 May 2015 15:12:51 +0000 (11:12 -0400)]
she -> they in Dining Philosophers

Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well.

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643

9 years agoMake various fixes:
Niko Matsakis [Tue, 5 May 2015 12:47:04 +0000 (08:47 -0400)]
Make various fixes:
- add feature gate
- add basic tests
- adjust parser to eliminate conflict between `const fn` and associated
constants
- allow `const fn` in traits/trait-impls, but forbid later in type check
- correct some merge conflicts

9 years agorustc_trans: evaluate `const fn` function and method calls.
Eduard Burtescu [Wed, 25 Feb 2015 20:06:57 +0000 (22:06 +0200)]
rustc_trans: evaluate `const fn` function and method calls.

9 years agorustc: const-qualify `const fn` function and method calls.
Eduard Burtescu [Wed, 25 Feb 2015 20:06:08 +0000 (22:06 +0200)]
rustc: const-qualify `const fn` function and method calls.

9 years agosyntax: parse `const fn` for free functions and inherent methods.
Eduard Burtescu [Wed, 25 Feb 2015 20:05:07 +0000 (22:05 +0200)]
syntax: parse `const fn` for free functions and inherent methods.

9 years agoAuto merge of #25473 - doomrobo:patch-3, r=steveklabnik
bors [Thu, 21 May 2015 15:24:16 +0000 (15:24 +0000)]
Auto merge of #25473 - doomrobo:patch-3, r=steveklabnik

Added `Deref` to the "Special Traits" section

9 years agoAuto merge of #25676 - dmgawel:patch-1, r=huonw
bors [Thu, 21 May 2015 13:00:04 +0000 (13:00 +0000)]
Auto merge of #25676 - dmgawel:patch-1, r=huonw

Earlier created vector `["Hello", "world"]` has two elements and we try to add a third element.

9 years agoIntroduction vector example elements counting fix
dmgawel [Thu, 21 May 2015 12:30:32 +0000 (14:30 +0200)]
Introduction vector example elements counting fix

Earlier created vector `["Hello", "world"]` has two elements and we try to add a third element.

9 years agoAuto merge of #25552 - GuillaumeGomez:left-hand-error, r=pnkfelix
bors [Thu, 21 May 2015 10:00:04 +0000 (10:00 +0000)]
Auto merge of #25552 - GuillaumeGomez:left-hand-error, r=pnkfelix

Part of #24407.

9 years agoFix ICE trying to pass DST to C functions
Björn Steinbrink [Wed, 20 May 2015 18:26:53 +0000 (20:26 +0200)]
Fix ICE trying to pass DST to C functions

Fixes #25581

9 years agoAuto merge of #25671 - Manishearth:rollup, r=Manishearth
bors [Thu, 21 May 2015 08:19:17 +0000 (08:19 +0000)]
Auto merge of #25671 - Manishearth:rollup, r=Manishearth

- Successful merges: #25648, #25659, #25661, #25665
- Failed merges:

9 years agoRollup merge of #25665 - OlegTsyba:fix_documentation, r=Gankro
Manish Goregaokar [Thu, 21 May 2015 08:08:26 +0000 (13:38 +0530)]
Rollup merge of #25665 - OlegTsyba:fix_documentation, r=Gankro

fix a small typo in the official tutorial. "coerce" instead of "coerece"
r? @steveklabnik

9 years agoRollup merge of #25661 - Stebalien:macro, r=Gankro
Manish Goregaokar [Thu, 21 May 2015 08:08:26 +0000 (13:38 +0530)]
Rollup merge of #25661 - Stebalien:macro, r=Gankro

They don't have to be followed by anything.

9 years agoRollup merge of #25659 - tshepang:improve-rendering, r=steveklabnik
Manish Goregaokar [Thu, 21 May 2015 08:08:26 +0000 (13:38 +0530)]
Rollup merge of #25659 - tshepang:improve-rendering, r=steveklabnik

9 years agoRollup merge of #25648 - semarie:head-cut, r=luqmana
Manish Goregaokar [Thu, 21 May 2015 08:08:26 +0000 (13:38 +0530)]
Rollup merge of #25648 - semarie:head-cut, r=luqmana

the "-c" option of head isn't a posix option, and it isn't supported
under openbsd.

prefer the use of cut -c 1-8 (which is posix) to extract the first 8
chars.

r? @alexcrichton

9 years agoAuto merge of #25656 - tshepang:spell-em-out, r=brson
bors [Thu, 21 May 2015 05:37:01 +0000 (05:37 +0000)]
Auto merge of #25656 - tshepang:spell-em-out, r=brson

9 years agoAuto merge of #25644 - iven:fix_doc_warning, r=steveklabnik
bors [Thu, 21 May 2015 04:02:10 +0000 (04:02 +0000)]
Auto merge of #25644 - iven:fix_doc_warning, r=steveklabnik

The syntax with tailing semicolon is deprecated and the compiler will
complain about it.

r? @steveklabnik

9 years agoAuto merge of #25631 - taiyaeisforks:master, r=steveklabnik
bors [Thu, 21 May 2015 02:26:46 +0000 (02:26 +0000)]
Auto merge of #25631 - taiyaeisforks:master, r=steveklabnik

Saw one, decided to fix a few more :) Had to Google supercede because it looked funny, turns out it's a really common misspelling!

9 years agoFix stability and deprecation markers on soft_link and symlink
Brian Campbell [Thu, 21 May 2015 01:50:18 +0000 (21:50 -0400)]
Fix stability and deprecation markers on soft_link and symlink

The change to split up soft_link to OS-specific symlink, symlink_file,
and symlink_dir didn't actually land in 1.0.0.  Update the stability and
deprecation attributes to correctly indicate that these changes happend
in 1.1.0.

9 years agoAuto merge of #25612 - petrochenkov:lintabs, r=@alexcrichton
bors [Thu, 21 May 2015 00:52:27 +0000 (00:52 +0000)]
Auto merge of #25612 - petrochenkov:lintabs, r=@alexcrichton

Reported here https://github.com/rust-lang/rust/pull/25441#issuecomment-103513930

9 years agoFix the typo in The Rust Programming Language book, 5.18. Strings
OlegTsyba [Wed, 20 May 2015 22:40:23 +0000 (01:40 +0300)]
Fix the typo in The Rust Programming Language book, 5.18. Strings

9 years agoAuto merge of #25625 - bluss:doc-slice-order, r=Gankro
bors [Wed, 20 May 2015 22:16:54 +0000 (22:16 +0000)]
Auto merge of #25625 - bluss:doc-slice-order, r=Gankro

collections: Reorder slice methods to improve API docs

We have an evolutionary history whose traces are still visible in the
slice docs today.

Some heuristics:

* Group method and method_mut together
* Group method and method_by together
* Group by use case, here we have roughly:

  Basic interrogators (len)
  Mutation (swap)
  Iterators (iter)
  Segmentation (split)
  Searching (contains)
  Permutations (permutations)
  Misc (clone_from_slice)

9 years agoTypo fix on E0067
Guillaume Gomez [Wed, 20 May 2015 16:59:12 +0000 (18:59 +0200)]
Typo fix on E0067

9 years agoChange "must" to "may only" in macro future proofing rules.
Steven Allen [Wed, 20 May 2015 21:19:57 +0000 (17:19 -0400)]
Change "must" to "may only" in macro future proofing rules.

They don't have to be followed by anything.

9 years agodoc: that did not render well, so make it fit in one line
Tshepang Lekhonkhobe [Wed, 20 May 2015 21:09:49 +0000 (23:09 +0200)]
doc: that did not render well, so make it fit in one line

9 years agoAuto merge of #25652 - arielb1:free-self, r=nikomatsakis
bors [Wed, 20 May 2015 20:42:22 +0000 (20:42 +0000)]
Auto merge of #25652 - arielb1:free-self, r=nikomatsakis

This is needed because `Self` can be substituted to a type with
lifetime parameters.

Fixes #24308
Fixes #25071
Fixes #25259
Fixes #25279

9 years agodoc: 'reader' and 'writer' are nicer to read than 'r' and 'w'
Tshepang Lekhonkhobe [Wed, 20 May 2015 20:02:46 +0000 (22:02 +0200)]
doc: 'reader' and 'writer' are nicer to read than 'r' and 'w'

9 years agoSubstitute free lifetimes when `Self` is used within a method body
Ariel Ben-Yehuda [Wed, 20 May 2015 18:22:05 +0000 (21:22 +0300)]
Substitute free lifetimes when `Self` is used within a method body

This is needed because `Self` can be substituted to a type with
lifetime parameters.

Fixes #24308
Fixes #25071
Fixes #25259
Fixes #25279

9 years agoAuto merge of #25571 - hirschenberger:master, r=nrc
bors [Wed, 20 May 2015 18:08:40 +0000 (18:08 +0000)]
Auto merge of #25571 - hirschenberger:master, r=nrc

It is hard to find the actual unstable feature which caused the error when using a list of stable and unstable features as the span marks the whole line

```
src/k8055.rs:22:1: 22:64 error: unstable feature
src/k8055.rs:22 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

This PR spawns an error for each unstable feature in the list:

```
est.rs:1:12: 1:26 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                     ^~~~~~~~~~~~~~
test.rs:1:28: 1:41 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                     ^~~~~~~~~~~~~
test.rs:1:43: 1:47 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                    ^~~~
test.rs:1:49: 1:56 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                          ^~~~~~~
test.rs:1:58: 1:62 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                                   ^~~~
```

9 years agoAdd error explanation for E0070
Guillaume Gomez [Sun, 17 May 2015 21:16:39 +0000 (23:16 +0200)]
Add error explanation for E0070

9 years agoAuto merge of #25390 - eddyb:typeck-pub, r=nrc
bors [Wed, 20 May 2015 15:32:58 +0000 (15:32 +0000)]
Auto merge of #25390 - eddyb:typeck-pub, r=nrc

Needed for driving parts of type-checking manually.

9 years agoAuto merge of #25645 - luqmana:lnr, r=eddyb
bors [Wed, 20 May 2015 13:58:10 +0000 (13:58 +0000)]
Auto merge of #25645 - luqmana:lnr, r=eddyb

This micro-optimization actually led to generating broken IR in certain cases.

Fixes #18845.
Fixes #25497.

9 years agoAuto merge of #25615 - petrochenkov:issue25542, r=alexcrichton
bors [Wed, 20 May 2015 12:22:34 +0000 (12:22 +0000)]
Auto merge of #25615 - petrochenkov:issue25542, r=alexcrichton

Closes https://github.com/rust-lang/rust/issues/25542

r? @alexcrichton

9 years agouse posix command to extract first 8 chars
Sébastien Marie [Wed, 20 May 2015 11:54:14 +0000 (13:54 +0200)]
use posix command to extract first 8 chars

the "-c" option of head isn't a posix option, and it isn't supported
under openbsd.

prefer the use of cut -c 1-8 (which is posix) to extract the first 8
chars.

9 years agoAuto merge of #25610 - mbrubeck:bufread-docs, r=alexcrichton
bors [Wed, 20 May 2015 10:47:44 +0000 (10:47 +0000)]
Auto merge of #25610 - mbrubeck:bufread-docs, r=alexcrichton

r? @steveklabnik

9 years agocollections: Reorder slice methods to improve API docs
Ulrik Sverdrup [Tue, 19 May 2015 22:43:46 +0000 (00:43 +0200)]
collections: Reorder slice methods to improve API docs

We have an evolutionary history whose traces are still visible in the
slice docs today.

Some heuristics:

* Group method and method_mut together
* Group method and method_by together
* Group by use case, here we have roughly:

  Basic interrogators (len)
  Mutation (swap)
  Iterators (iter)
  Segmentation (split)
  Searching (contains)
  Permutations (permutations)
  Misc (clone_from_slice)

9 years agoFix panic in lint for out of range literals
petrochenkov [Tue, 19 May 2015 16:43:33 +0000 (19:43 +0300)]
Fix panic in lint for out of range literals

9 years agoAuto merge of #25596 - Ms2ger:rbml-docs, r=alexcrichton
bors [Wed, 20 May 2015 09:13:28 +0000 (09:13 +0000)]
Auto merge of #25596 - Ms2ger:rbml-docs, r=alexcrichton

This leads to more idiomatic code in the callers.