]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoWarn if the test suite is run on Windows in console with non-UTF-8 code page
petrochenkov [Sat, 30 May 2015 16:22:12 +0000 (19:22 +0300)]
Warn if the test suite is run on Windows in console with non-UTF-8 code page

9 years agoAuto merge of #25741 - richo:backtrace-message, r=alexcrichton
bors [Wed, 27 May 2015 02:15:44 +0000 (02:15 +0000)]
Auto merge of #25741 - richo:backtrace-message, r=alexcrichton

The second commit seems reasonable to me but I can remove if it's contentious. The first is purely cosmetic but has been irking me for ages.

9 years agoAuto merge of #25713 - Stebalien:pattern, r=alexcrichton
bors [Wed, 27 May 2015 00:42:55 +0000 (00:42 +0000)]
Auto merge of #25713 - Stebalien:pattern, r=alexcrichton

Needed to support:

```rust
match X {
  pattern if Y ...
}

for pattern in Y {}
```

IMO, this shouldn't require an RFC because it can't interfere with any future language changes (because `pattern if` and `pattern in` are already legal in rust) and can't cause any ambiguity.

9 years agoAuto merge of #25688 - nham:E0055_E0192, r=alexcrichton
bors [Tue, 26 May 2015 23:10:06 +0000 (23:10 +0000)]
Auto merge of #25688 - nham:E0055_E0192, r=alexcrichton

 - Adds explanations for E0055, E0089, E0192, E0261-E0263, E0318
 - Improves explanations for E0250, E0368, E0372.
 - Converts 15 diagnostics to have error codes (E0380-E0394). Adds an explanation for E0380.
 - The E0087-E0090 messages currently look like "expected {} parameter(s) found {} parameter(s)". This changes them to either use "parameter" or "parameters", based on the number.

This is, in part, more progress towards #24407

9 years agoAuto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichton
bors [Tue, 26 May 2015 21:36:57 +0000 (21:36 +0000)]
Auto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichton

rustdoc: Associated type fixes

The first commit fixes a bug with "dud" items in the search index from
misrepresented `type` items in trait impl blocks.

For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

The second commit fixes a bug that made signatures and where bounds
using associated types (if they were not on `Self`) incorrect.

The third commit fixes so that where clauses in type alias definititons
are shown.

Fixes #22442
Fixes #24417
Fixes #25769

9 years agoConvert 15 diagnostics to have error codes (E0380-E0394).
Nick Hamann [Tue, 19 May 2015 21:53:34 +0000 (16:53 -0500)]
Convert 15 diagnostics to have error codes (E0380-E0394).

Also adds explanations for E0380 and E0381.

9 years agoPluralize E0087-E0090 messages based on number of parameters.
Nick Hamann [Thu, 21 May 2015 18:33:31 +0000 (13:33 -0500)]
Pluralize E0087-E0090 messages based on number of parameters.

9 years agoFix typo.
Nick Hamann [Thu, 21 May 2015 06:17:50 +0000 (01:17 -0500)]
Fix typo.

9 years agoSmall improvements for explanations of E0250, E0368, E0372.
Nick Hamann [Tue, 19 May 2015 21:51:28 +0000 (16:51 -0500)]
Small improvements for explanations of E0250, E0368, E0372.

9 years agoAdd error explanations for E0055, E0089, E0192, E0261, E0262, E0263, E0318.
Nick Hamann [Tue, 19 May 2015 17:38:17 +0000 (12:38 -0500)]
Add error explanations for E0055, E0089, E0192, E0261, E0262, E0263, E0318.

9 years agoAuto merge of #24657 - aochagavia:rustdoc, r=alexcrichton
bors [Tue, 26 May 2015 20:04:09 +0000 (20:04 +0000)]
Auto merge of #24657 - aochagavia:rustdoc, r=alexcrichton

Fixes #24575
Fixes #25673

r? @alexcrichton

9 years agoAuto merge of #25593 - nham:E0210_E0326, r=alexcrichton
bors [Tue, 26 May 2015 18:30:42 +0000 (18:30 +0000)]
Auto merge of #25593 - nham:E0210_E0326, r=alexcrichton

Changes:

 - adds explanations for E0185, E0186, E0202, E0326
 - fixes the explanation for E0053. The previous description was too narrow; there are other error cases.
 - changes the error message for E0202 to be specific for associated types, since it seems inherent associated constants are implemented.

Part of #24407

9 years agoAuto merge of #25091 - quantheory:trait_associated_const_fixes, r=nikomatsakis
bors [Tue, 26 May 2015 16:58:07 +0000 (16:58 +0000)]
Auto merge of #25091 - quantheory:trait_associated_const_fixes, r=nikomatsakis

Closes #25046 (by rejecting the code that causes the ICE) and #24946. I haven't been able to deal with the array size or recursion issues yet for associated consts, though my hope was that the change I made for range match patterns might help with array sizes, too.

This PR is pretty much orthogonal to #25065.

9 years agoAuto merge of #25411 - alexcrichton:issue-18913, r=brson
bors [Tue, 26 May 2015 14:08:24 +0000 (14:08 +0000)]
Auto merge of #25411 - alexcrichton:issue-18913, r=brson

This flag indicates that when files are being replaced or added to archives (the
`r` flag) that the new file should not be inserted if it is not newer than the
file that already exists in the archive. The compiler never actually has a use
case of *not* wanting to insert a file because it already exists, and this
causes rlibs to not be updated in some cases when the compiler was re-run too
quickly.

Closes #18913

9 years agorustc_back: Don't pass 'u' to ar invocations
Alex Crichton [Thu, 14 May 2015 18:53:37 +0000 (11:53 -0700)]
rustc_back: Don't pass 'u' to ar invocations

This flag indicates that when files are being replaced or added to archives (the
`r` flag) that the new file should not be inserted if it is not newer than the
file that already exists in the archive. The compiler never actually has a use
case of *not* wanting to insert a file because it already exists, and this
causes rlibs to not be updated in some cases when the compiler was re-run too
quickly.

Closes #18913

9 years agoAuto merge of #25785 - arielb1:cleanup-201505, r=eddyb
bors [Tue, 26 May 2015 12:15:30 +0000 (12:15 +0000)]
Auto merge of #25785 - arielb1:cleanup-201505, r=eddyb

The caching essentially eliminates "stability checking" time (my attempt to clean-up junk got tangled up with stability, so I added the caching while I was at it).

r? @eddyb

9 years agoAuto merge of #25778 - econoplas:master, r=pnkfelix
bors [Tue, 26 May 2015 09:49:36 +0000 (09:49 +0000)]
Auto merge of #25778 - econoplas:master, r=pnkfelix

A regression was introduced by commit https://github.com/rust-lang/rust/commit/7b1916d25347913fce3e336517ef22025ccd875f #25612.  Negative signed integer literals less than -9223372036854775808i64 were no longer properly reported as #[warn(overflowing_literals)].

Also adding missing test cases to test/compile-fail/lint-type-overflow.rs which could have detected the regression.

Further explanation:

The expression `(negative && v > max as u64 + 1)` relies on the fact that algebraically speaking `-min == max + 1` to avoid negation and removing the need for `min` completely.

If i128 or i256 are ever added, it should also work for these types without requiring a change to `min != i64::MIN &&` also simplifying maintenance.

r? @pnkfelix

9 years agoRemove ObjectCastMap
Ariel Ben-Yehuda [Mon, 25 May 2015 23:28:04 +0000 (02:28 +0300)]
Remove ObjectCastMap

9 years agoUse lookup_locally_or_in_crate_store more often
Ariel Ben-Yehuda [Mon, 25 May 2015 21:42:22 +0000 (00:42 +0300)]
Use lookup_locally_or_in_crate_store more often

9 years agoMake caching in stability work. This improves stability check performance
Ariel Ben-Yehuda [Mon, 25 May 2015 21:41:27 +0000 (00:41 +0300)]
Make caching in stability work. This improves stability check performance
by 90%.

9 years agoClean-up some junk
Ariel Ben-Yehuda [Mon, 25 May 2015 17:51:16 +0000 (19:51 +0200)]
Clean-up some junk

9 years agoAuto merge of #25767 - mystor:patch-1, r=Gankro
bors [Mon, 25 May 2015 23:02:52 +0000 (23:02 +0000)]
Auto merge of #25767 - mystor:patch-1, r=Gankro

By the same logic that `mem::forget` is safe, `boxed::into_raw` is actually a safe function.

Fixes #25755.

9 years agoAuto merge of #25771 - killercup:trpl/cleanup-markdown-links, r=steveklabnik
bors [Mon, 25 May 2015 21:28:51 +0000 (21:28 +0000)]
Auto merge of #25771 - killercup:trpl/cleanup-markdown-links, r=steveklabnik

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

These are just some cleanups I did for the PDF version.

r? @steveklabnik

9 years agorustdoc: Show where clauses in type aliases
Ulrik Sverdrup [Mon, 25 May 2015 21:05:35 +0000 (23:05 +0200)]
rustdoc: Show where clauses in type aliases

Yes, it's allowed. Example:

    type MapFn<I, B> where I: Iterator = Map<I, fn(I::Item) -> B>;

Fixes #25769

9 years agoAuto merge of #25698 - mdinger:flat_map, r=steveklabnik
bors [Mon, 25 May 2015 19:52:45 +0000 (19:52 +0000)]
Auto merge of #25698 - mdinger:flat_map, r=steveklabnik

I'm not sure why `core` is on but it's blocking the playpen. Doesn't seem to be needed but I'm not sure. It's not on the playpen template and playpen works on release and nightly.

Seems easier to understand without `take()`.

9 years agoRemove unsafe block around boxed::into_raw() as it is now safe
Michael Layzell [Mon, 25 May 2015 18:44:22 +0000 (14:44 -0400)]
Remove unsafe block around boxed::into_raw() as it is now safe

9 years agoAuto merge of #25742 - thombles:tk/StringCoercion, r=steveklabnik
bors [Mon, 25 May 2015 18:18:11 +0000 (18:18 +0000)]
Auto merge of #25742 - thombles:tk/StringCoercion, r=steveklabnik

A few of us [over on the forum](https://users.rust-lang.org/t/string-type-coercion-in-rust/1439) have been tripped up by this distinction, which I don't think is mentioned. It's kind of logical if you read the "Deref coercions" page and squint a bit but I think it would be nice to explain it directly. Here's one way we could clarify it.

9 years agorustdoc: Fix associated types in signatures
Ulrik Sverdrup [Mon, 25 May 2015 13:06:38 +0000 (15:06 +0200)]
rustdoc: Fix associated types in signatures

Functions such as `fn foo<I: Iterator>(x: I::Item)` would not
render correctly and displayed `I` instead of `I::Item`. Same thing
with `I::Item` appearing in where bounds.

This fixes the bug by using paths for generics.

Fixes #24417

9 years agoAuto merge of #25773 - dotdash:deref_dst, r=eddyb
bors [Mon, 25 May 2015 15:54:39 +0000 (15:54 +0000)]
Auto merge of #25773 - dotdash:deref_dst, r=eddyb

Fat pointers aren't immediate, so in a datum, they're not actually
ByValue but ByRef.

Fixes #24589

9 years agoFix auto_ref for fat pointers
Björn Steinbrink [Mon, 25 May 2015 15:17:27 +0000 (17:17 +0200)]
Fix auto_ref for fat pointers

Fat pointers aren't immediate, so in a datum, they're not actually
ByValue but ByRef.

Fixes #24589

9 years ago- Fix regression of literal out of range check for negative i64 values which was...
econoplas [Mon, 25 May 2015 13:42:16 +0000 (07:42 -0600)]
- Fix regression of literal out of range check for negative i64 values which was introduced by commit 7b1916d25347913fce3e336517ef22025ccd875f.
- Add missing test cases to test/compile-fail/lint-type-overflow.rs which would have detected the regression.

9 years agoRustdoc: ignore deref-inherited static methods
Adolfo Ochagavía [Sun, 26 Apr 2015 19:03:38 +0000 (21:03 +0200)]
Rustdoc: ignore deref-inherited static methods

Fixes #24575

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 #25770 - dotdash:bool_transmute, r=eddyb
bors [Mon, 25 May 2015 12:20:24 +0000 (12:20 +0000)]
Auto merge of #25770 - dotdash:bool_transmute, r=eddyb

Fixes #25746

9 years agoFix transmutes with boolean source values
Björn Steinbrink [Mon, 25 May 2015 11:08:31 +0000 (13:08 +0200)]
Fix transmutes with boolean source values

Fixes #25746

9 years agoFix interchanged names of to_arg_ty and from_arg_ty
Björn Steinbrink [Mon, 25 May 2015 10:58:19 +0000 (12:58 +0200)]
Fix interchanged names of to_arg_ty and from_arg_ty

9 years agobook: add no_run and use statement to strings no-coercion example
Thomas Karpiniec [Mon, 25 May 2015 08:38:17 +0000 (18:38 +1000)]
book: add no_run and use statement to strings no-coercion example

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 agoMark `boxed::into_raw` as safe
Michael Layzell [Mon, 25 May 2015 01:45:29 +0000 (21:45 -0400)]
Mark `boxed::into_raw` as safe

By the same logic that `mem::forget` is safe, `boxed::into_raw` is actually a safe function. Fixes #25755.

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 agobook: explanation that String -> &str coercion doesn't happen for &str traits
Thomas Karpiniec [Sun, 24 May 2015 03:54:05 +0000 (13:54 +1000)]
book: explanation that String -> &str coercion doesn't happen for &str traits

9 years agodriver: Only emit the RUST_BACKTRACE message if not present
Richo Healey [Sun, 24 May 2015 02:24:17 +0000 (19:24 -0700)]
driver: Only emit the RUST_BACKTRACE message if not present

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 agoSimplify flat_map example
mdinger [Sat, 23 May 2015 01:37:11 +0000 (21:37 -0400)]
Simplify flat_map example

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 agoAllow patterns to be followed by if and in.
Steven Allen [Fri, 22 May 2015 14:37:44 +0000 (10:37 -0400)]
Allow patterns to be followed by if and in.

Needed to support:

match X {
  pattern if Y ...
}

for pattern in Y {}

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 agoAdd diagnostic code for generic associated const error.
Sean Patrick Santos [Fri, 22 May 2015 03:12:49 +0000 (21:12 -0600)]
Add diagnostic code for generic associated const error.

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