]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoMove native thread name setting from thread_info to Thread, fixes #21911
Vojtech Kral [Tue, 10 Feb 2015 14:06:45 +0000 (15:06 +0100)]
Move native thread name setting from thread_info to Thread, fixes #21911

9 years agoMove native thread name setting from thread_info to Thread, fixes #21911
Vojtech Kral [Wed, 4 Feb 2015 01:26:00 +0000 (02:26 +0100)]
Move native thread name setting from thread_info to Thread, fixes #21911

9 years agoAuto merge of #22054 - LeoTestard:include-parse-errors, r=alexcrichton
bors [Sun, 8 Feb 2015 14:41:02 +0000 (14:41 +0000)]
Auto merge of #22054 - LeoTestard:include-parse-errors, r=alexcrichton

Makes the compilation abort when a parse error is encountered while
trying to parse an item in an included file. The previous behaviour was
to stop processing the file when a token that can't start an item was
encountered, without producing any error. Fixes #21146.

9 years agoAuto merge of #22011 - fhahn:separate-parse-fail-tests, r=nikomatsakis
bors [Sun, 8 Feb 2015 12:35:03 +0000 (12:35 +0000)]
Auto merge of #22011 - fhahn:separate-parse-fail-tests, r=nikomatsakis

This PR moves all `compile-fail` tests that fail at the parsing stage to a `parse-fail` directory, in order to use the tests in the `parse-fail` directory to test if the new LALR parser rejects the same files as the Rust parser. I also adjusted the `testparser.py` script to handle the tests in `parse-fail` differently.

However during working on this, I discovered, that Rust's parser sometimes fails during parsing, but does not return a nonzero return code, e.g. compiling `/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` prints an error message, but returns status code 0. Compiling the same file without `-Z parse-only`, the same error message is displayed, but error code 101 returned. I'll look into that over the next week.

9 years agoAuto merge of #21970 - michaelwoerister:lang-item-call-debug-locs, r=brson
bors [Sun, 8 Feb 2015 10:27:58 +0000 (10:27 +0000)]
Auto merge of #21970 - michaelwoerister:lang-item-call-debug-locs, r=brson

Resolves some issues caused by the recent LLVM update (which itself solved some issues).

Closes #19848
Closes #20798

9 years agoAuto merge of #21565 - kmcallister:poison, r=alexcrichton
bors [Sun, 8 Feb 2015 08:21:44 +0000 (08:21 +0000)]
Auto merge of #21565 - kmcallister:poison, r=alexcrichton

I needed these to implement efficient poisoning in [seqloq](https://github.com/kmcallister/seqloq/tree/poison).

9 years agoAuto merge of #21999 - tomjakubowski:rustdoc-fixes, r=alexcrichton
bors [Sun, 8 Feb 2015 06:15:52 +0000 (06:15 +0000)]
Auto merge of #21999 - tomjakubowski:rustdoc-fixes, r=alexcrichton

r? @alexcrichton

9 years agoAuto merge of #22044 - caspark:fix-rc-doc-links, r=nikomatsakis
bors [Sun, 8 Feb 2015 02:30:09 +0000 (02:30 +0000)]
Auto merge of #22044 - caspark:fix-rc-doc-links, r=nikomatsakis

Current link structure is /std/rc/struct.Rc.html so ../index.html ends
up linking to /std/ rather than /std/rc/

9 years agoAuto merge of #21988 - kmcallister:no-std, r=sfackler
bors [Sun, 8 Feb 2015 00:24:03 +0000 (00:24 +0000)]
Auto merge of #21988 - kmcallister:no-std, r=sfackler

Fixes #21833.

[breaking-change]

r? @alexcrichton

The tests in #21912 will also need `#[feature(no_std)]`. If you're okay with both PRs, I can merge and test them.

9 years agoAuto merge of #21874 - nagisa:reference-is-removal, r=steveklabnik
bors [Sat, 7 Feb 2015 21:48:33 +0000 (21:48 +0000)]
Auto merge of #21874 - nagisa:reference-is-removal, r=steveklabnik

r? @steveklabnik

9 years agoFix new test
Keegan McAllister [Sat, 7 Feb 2015 18:51:25 +0000 (10:51 -0800)]
Fix new test

9 years agoMake std::fmt a simple re-export from collections
Keegan McAllister [Fri, 6 Feb 2015 05:08:02 +0000 (21:08 -0800)]
Make std::fmt a simple re-export from collections

9 years agoFake up #![no_std] on pretty-printing; keep it out of AST
Keegan McAllister [Fri, 6 Feb 2015 01:04:11 +0000 (17:04 -0800)]
Fake up #![no_std] on pretty-printing; keep it out of AST

9 years agoFeature-gate #![no_std]
Keegan McAllister [Fri, 6 Feb 2015 00:14:42 +0000 (16:14 -0800)]
Feature-gate #![no_std]

Fixes #21833.

[breaking-change]

9 years agoDon't use std:: paths in syntax extensions when compiling a #![no_std] crate
Keegan McAllister [Sun, 7 Sep 2014 21:57:26 +0000 (14:57 -0700)]
Don't use std:: paths in syntax extensions when compiling a #![no_std] crate

Fixes #16803.
Fixes #14342.
Fixes half of #21827 -- slice syntax is still broken.

9 years agoUse path helper macros in deriving
Keegan McAllister [Sun, 7 Sep 2014 20:58:41 +0000 (13:58 -0700)]
Use path helper macros in deriving

9 years agoAuto merge of #21984 - pnkfelix:make-for-loops-a-terminating-scope, r=nikomatsakis
bors [Sat, 7 Feb 2015 18:20:55 +0000 (18:20 +0000)]
Auto merge of #21984 - pnkfelix:make-for-loops-a-terminating-scope, r=nikomatsakis

make `for PAT in ITER_EXPR { ... }` a terminating-scope for ITER_EXPR.

In effect, temporary anonymous values created during the evaluation of ITER_EXPR no longer not live for the entirety of the block surrounding the for-loop; instead they only live for the extent of the for-loop itself, and no longer.

----

There is one case I know of that this breaks, demonstrated to me by @nikomatsakis  (but it is also a corner-case that is useless in practice).  Here is that case:

```
fn main() {
    let mut foo: Vec<&i8> = Vec::new();
    for i in &[1, 2, 3] { foo.push(i) }
}
```

Note that if you add any code following the for-loop above, or even a semicolon to the end of it, then the code will stop compiling (i.e., it gathers a vector of references but the gathered vector cannot actually be used.)

(The above code, despite being useless, did occur in one run-pass test by accident; that test is updated here to accommodate the new striction.)

----

So, technically this is a:

[breaking-change]

9 years agoFix handling of parse errors when using `include!()`.
Leo Testard [Sat, 7 Feb 2015 16:23:33 +0000 (17:23 +0100)]
Fix handling of parse errors when using `include!()`.

Makes the compilation abort when a parse error is encountered while
trying to parse an item in an included file. The previous behaviour was
to stop processing the file when a token that can't start an item was
encountered, without producing any error. Fixes #21146.

9 years agoAuto merge of #21982 - pnkfelix:extend-Z-print-region-graph, r=nikomatsakis
bors [Sat, 7 Feb 2015 16:14:20 +0000 (16:14 +0000)]
Auto merge of #21982 - pnkfelix:extend-Z-print-region-graph, r=nikomatsakis

Extend region-inference graphviz rendering with enclosing relationship as well as the constraint edges.

9 years agoAuto merge of #21971 - pnkfelix:fsk-restrict-fixdsz-array-moves, r=nikomatsakis
bors [Sat, 7 Feb 2015 14:08:38 +0000 (14:08 +0000)]
Auto merge of #21971 - pnkfelix:fsk-restrict-fixdsz-array-moves, r=nikomatsakis

Revised version of PR #21930.

Restrictions on moves into and out-from fixed-length arrays.

(There was only one use of this "feature" in the compiler source.)

Note 1: the change to the error message in tests/compile-fail/borrowck-use-in-index-lvalue.rs, where we now report that *w is uninitialized (rather than w), was unintended fallout from the implementation strategy used here. The change appears harmless to me, but I welcome advice on how to bring back the old message, which was slightly cleaner (i.e. less unintelligible) since that the syntactic form *w does not actually appear in the source text.

Note 2: the move out-from restriction to only apply to expr[i], and not destructuring bind (e.g. f([a, b, c]: Array) { ... }) since the latter is compatible with nonzeroing drop, AFAICT.

[breaking-change]

9 years agoUpdates to tests reflecting array-move restrictions.
Felix S. Klock II [Wed, 4 Feb 2015 11:25:25 +0000 (12:25 +0100)]
Updates to tests reflecting array-move restrictions.

Note that the change to the error message in
borrowck-use-in-index-lvalue.rs, where we report that `*w` is
uninitialized rather than `w`, was unintended fallout from the
implementation strategy used here.

The change appears harmless to me, but I welcome advice on how to
bring back the old message, which was slightly cleaner (i.e. less
unintelligible).

----

drive-by: revise compile-fail/borrowck-vec-pattern-move-tail to make
it really clear that there is a conflict that must be signaled.

(A hypothetical future version of Rust might be able to accept the
prior version of the code, since the previously updated index was not
actually aliased.)

9 years agoAdd tests of move-into-dead-array restriction.
Felix S. Klock II [Tue, 3 Feb 2015 17:10:56 +0000 (18:10 +0100)]
Add tests of move-into-dead-array restriction.

9 years agoAdd tests of move-out-of-array restriction.
Felix S. Klock II [Tue, 3 Feb 2015 16:44:16 +0000 (17:44 +0100)]
Add tests of move-out-of-array restriction.

9 years agoRestrictions on moves out-from and into fixed-length arrays.
Felix S. Klock II [Tue, 3 Feb 2015 00:25:45 +0000 (01:25 +0100)]
Restrictions on moves out-from and into fixed-length arrays.

No longer legal: `fn foo(a: [D; 5]) { drop(a); a[2] = D::new(); }`;
one must first initialize the entirety of `a` before assigning to its
individual elements.

No longer legal: `fn foo(arr: [D; 5]) -> D { arr[2] }`, unless `D`
implements `Copy`. This "move out-from" restriction only affects
`expr[i]`, and not destructuring (e.g. `f([a, b, c]: Array) { ... }`).

uses mem_categorization to distinguish destructuring-bind from array
indexing.

See discussion on RFC PR 533.

[breaking-change]

9 years agoFix libsyntax so we can bootstrap even with move out of array restriction.
Felix S. Klock II [Tue, 3 Feb 2015 01:34:39 +0000 (02:34 +0100)]
Fix libsyntax so we can bootstrap even with move out of array restriction.

9 years agoremove closure `&mut:`/`&:` annotations.
Felix S. Klock II [Sat, 7 Feb 2015 12:16:09 +0000 (13:16 +0100)]
remove closure `&mut:`/`&:` annotations.

9 years agoAuto merge of #22023 - alexcrichton:oops-picked-the-wrong-plugin, r=nikomatsakis
bors [Sat, 7 Feb 2015 12:01:31 +0000 (12:01 +0000)]
Auto merge of #22023 - alexcrichton:oops-picked-the-wrong-plugin, r=nikomatsakis

The compiler would previously fall back to using `-L` and normal lookup paths if
a `--extern` path was specified but it did not match (wrong architecture, for
example). This commit removes this behavior and forces the hand of the crate
loader to *always* use the `--extern` path if specified, no matter whether it is
correct or not.

This fixes a bug today where the compiler's own libraries are favored in cross
compilation by accident. For example when a crate using the crates.io version of
`log` was cross compiled, Cargo would compile `log` for the target architecture.
When loading the macros, however, the compiler currently favors using the *host*
architecture (for plugins), and because the `--extern log=...` pointed at an
rlib for the target architecture, that lookup failed. The crate loader  then
fell back on `-L` paths to find the compiler-used `log` crate (the wrong one!)
and then a compile failure happened because the logging macros are slightly
different.

9 years agoFix broken link to std::rc module docs
Caspar Krieger [Sat, 7 Feb 2015 10:45:13 +0000 (21:45 +1100)]
Fix broken link to std::rc module docs

Current link structure is /std/rc/struct.Rc.html so ../index.html ends
up linking to /std/ rather than /std/rc/

9 years agoAuto merge of #21995 - leejunseok:fix_invariant_ex, r=steveklabnik
bors [Sat, 7 Feb 2015 09:55:14 +0000 (09:55 +0000)]
Auto merge of #21995 - leejunseok:fix_invariant_ex, r=steveklabnik

Should fix #20147

This is my second PR in the history of ever (I botched my first one #21828). Any tips would be appreciated!

9 years agoAuto merge of #21978 - Potpourri:error-extern-crate-staticlib, r=alexcrichton
bors [Sat, 7 Feb 2015 06:34:37 +0000 (06:34 +0000)]
Auto merge of #21978 - Potpourri:error-extern-crate-staticlib, r=alexcrichton

Add special error for this case and help message `please recompile this crate using --crate-type lib`, also list found candidates.

See issue #14416

r? @alexcrichton

9 years agosync: Expose PoisonError::new
Keegan McAllister [Fri, 23 Jan 2015 19:58:49 +0000 (11:58 -0800)]
sync: Expose PoisonError::new

9 years agosync: Add is_poisoned to Mutex and RwLock
Keegan McAllister [Fri, 23 Jan 2015 19:47:04 +0000 (11:47 -0800)]
sync: Add is_poisoned to Mutex and RwLock

9 years agoAuto merge of #21949 - japaric:index, r=nikomatsakis
bors [Sat, 7 Feb 2015 04:14:22 +0000 (04:14 +0000)]
Auto merge of #21949 - japaric:index, r=nikomatsakis

closes #21630

Overloaded indexing (`&[mut] foo[bar]`) only works when `<Self as Index>::Output` is the same as `<Self as IndexMut>::Output` (see issue above). To restrict implementations of `IndexMut` that doesn't work, this PR makes `IndexMut` a supertrait over `Index`, i.e. `trait IndexMut<I>: Index<I>`, just like in the `trait DerefMut: Deref` case.

This breaks all downstream implementations of `IndexMut`, in most cases this simply means removing the `type Output = ..` bit, which is now redundant, from `IndexMut` implementations:

``` diff
 impl Index<Foo> for Bar {
     type Output = Baz;
     ..
 }

 impl IndexMut<Foo> for Bar {
-    type Output = Baz;
     ..
 }
```

[breaking-change]

---

r? @nikomatsakis

9 years agomake `IndexMut` a super trait over `Index`
Jorge Aparicio [Wed, 4 Feb 2015 23:00:12 +0000 (18:00 -0500)]
make `IndexMut` a super trait over `Index`

closes #21630

9 years agoAuto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichton
bors [Sat, 7 Feb 2015 02:04:47 +0000 (02:04 +0000)]
Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichton

It's in order to make the code more homogeneous.

9 years agoAuto merge of #21997 - Manishearth:rollup, r=alexcrichton
bors [Fri, 6 Feb 2015 23:30:17 +0000 (23:30 +0000)]
Auto merge of #21997 - Manishearth:rollup, r=alexcrichton

None

9 years agolibrustdoc has been updated
GuillaumeGomez [Thu, 5 Feb 2015 14:19:23 +0000 (15:19 +0100)]
librustdoc has been updated

Fixes run build error

Fix test failure

Fix tests' errors

9 years agorustc: Don't fall back to -L if using --extern
Alex Crichton [Fri, 6 Feb 2015 21:40:00 +0000 (13:40 -0800)]
rustc: Don't fall back to -L if using --extern

The compiler would previously fall back to using `-L` and normal lookup paths if
a `--extern` path was specified but it did not match (wrong architecture, for
example). This commit removes this behavior and forces the hand of the crate
loader to *always* use the `--extern` path if specified, no matter whether it is
correct or not.

This fixes a bug today where the compiler's own libraries are favored in cross
compilation by accident. For example when a crate using the crates.io version of
`log` was cross compiled, Cargo would compile `log` for the target architecture.
When loading the macros, however, the compiler currently favors using the *host*
architecture (for plugins), and because the `--extern log=...` pointed at an
rlib for the target architecture, that lookup failed. The crate loader  then
fell back on `-L` paths to find the compiler-used `log` crate (the wrong one!)
and then a compile failure happened because the logging macros are slightly
different.

9 years agoMove compile-fail tests that are rejected by the parser to parse-fail
Florian Hahn [Fri, 6 Feb 2015 15:51:47 +0000 (16:51 +0100)]
Move compile-fail tests that are rejected by the parser to parse-fail

9 years agodebuginfo: Fix problem with debug locations of constants in match patterns.
Michael Woerister [Thu, 5 Feb 2015 17:26:58 +0000 (18:26 +0100)]
debuginfo: Fix problem with debug locations of constants in match patterns.

9 years agodebuginfo: Implement direct debuginfo source location application for ICmp, FCmp...
Michael Woerister [Wed, 4 Feb 2015 16:42:32 +0000 (17:42 +0100)]
debuginfo: Implement direct debuginfo source location application for ICmp, FCmp, and CallWithConv.

9 years agodebuginfo: Assign debuginfo source locations to lang-item calls.
Michael Woerister [Wed, 4 Feb 2015 16:16:59 +0000 (17:16 +0100)]
debuginfo: Assign debuginfo source locations to lang-item calls.

9 years agoAuto merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton
bors [Fri, 6 Feb 2015 19:49:31 +0000 (19:49 +0000)]
Auto merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton

New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.

9 years agoRollup merge of #22009 - japaric:no-mov, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 19:14:31 +0000 (00:44 +0530)]
Rollup merge of #22009 - japaric:no-mov, r=alexcrichton

 If you were still using `MaybeOwnedVector`, update your code to use `CowVec`.

[breaking-change]

---

We already removed `MaybeOwned` (the string equivalent) long time ago and with a much shorter deprecation period. It's time to let go.

9 years agoRollup merge of #22005 - nagisa:obsolete-ctx, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 19:14:14 +0000 (00:44 +0530)]
Rollup merge of #22005 - nagisa:obsolete-ctx, r=alexcrichton

 The word is repeated twice in the message like:

    error: obsolete syntax: `:`, `&mut:`, or `&:` syntax

This removes the word syntax that appears in messages after the second colon (:).

9 years agoRollup merge of #21994 - iKevinY:featureck-fix, r=brson
Manish Goregaokar [Fri, 6 Feb 2015 19:13:54 +0000 (00:43 +0530)]
Rollup merge of #21994 - iKevinY:featureck-fix, r=brson

 It seems that `lang_feature_stats` was supposed to refer to `language_feature_stats` instead.

r? @brson

9 years agofix outdated docs
Alexis [Fri, 6 Feb 2015 18:57:13 +0000 (13:57 -0500)]
fix outdated docs

Conflicts:
src/libstd/collections/mod.rs

9 years agofix outdated docs
Alexis [Fri, 6 Feb 2015 18:57:13 +0000 (13:57 -0500)]
fix outdated docs

Conflicts:
src/libstd/collections/mod.rs

9 years agoMore libcollections fixes
Manish Goregaokar [Fri, 6 Feb 2015 18:06:02 +0000 (23:36 +0530)]
More libcollections fixes

9 years agoAuto merge of #21860 - mdinger:enum_rewording, r=steveklabnik
bors [Fri, 6 Feb 2015 17:45:19 +0000 (17:45 +0000)]
Auto merge of #21860 - mdinger:enum_rewording, r=steveklabnik

Second try to address https://github.com/rust-lang/rust/issues/21196 . A lot that was removed at the end basically seemed repetitive showing simple variations on the same type. It seems more effective to just show more variants at the beginning instead.

If you want to pack values into an example, better to use `i32` or some digit than `String` because you don't need the `to_string()` method.

I didn't mention `derive` because:
* I can't explain it (only use it)
* I don't have a link to a good description (maybe rustbyexample but you probably want links internal)
* Giving more detail especially stating that `==` won't work and why should help quite a bit

I didn't `make test` or check links but I will if this will be merged.

@steveklabnik

9 years agoremove the deprecated MaybeOwnedVector
Jorge Aparicio [Fri, 6 Feb 2015 13:50:17 +0000 (08:50 -0500)]
remove the deprecated MaybeOwnedVector

9 years agoRemove word syntax from obsolete syntax messages
Simonas Kazlauskas [Fri, 6 Feb 2015 14:24:13 +0000 (16:24 +0200)]
Remove word syntax from obsolete syntax messages

The word is repeated twice in the message like

    error: obsolete syntax: `:`, `&mut:`, or `&:` syntax

This removes the word syntax that appears in messages after the second colon (:).

9 years agoRollup merge of #21991 - steveklabnik:gh21915, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 10:50:11 +0000 (16:20 +0530)]
Rollup merge of #21991 - steveklabnik:gh21915, r=huonw

 Fixes #21915

9 years agorm unused feature
Manish Goregaokar [Fri, 6 Feb 2015 10:49:30 +0000 (16:19 +0530)]
rm unused feature

9 years agolibcollections: unit test fixes
Manish Goregaokar [Fri, 6 Feb 2015 02:35:52 +0000 (08:05 +0530)]
libcollections: unit test fixes

9 years agoremove int_uint feature from libcollections
Alexis [Thu, 5 Feb 2015 20:08:33 +0000 (15:08 -0500)]
remove int_uint feature from libcollections

9 years agoRollup merge of #21989 - steveklabnik:gh21491, r=Gankro
Manish Goregaokar [Fri, 6 Feb 2015 01:37:04 +0000 (07:07 +0530)]
Rollup merge of #21989 - steveklabnik:gh21491, r=Gankro

 Fixes #21491

r? @kmcallister @Gankro

9 years agoAuto merge of #21962 - vrinek:printable-book, r=steveklabnik
bors [Fri, 6 Feb 2015 13:57:11 +0000 (13:57 +0000)]
Auto merge of #21962 - vrinek:printable-book, r=steveklabnik

Tested on:

* Safari on OSX
* Firefox on OSX

9 years agoEncode foreign function argument names
Tom Jakubowski [Fri, 6 Feb 2015 10:43:45 +0000 (02:43 -0800)]
Encode foreign function argument names

Fix #21917

9 years agoPrint full Type::ResolvedPaths starting with Self
Tom Jakubowski [Fri, 6 Feb 2015 10:02:59 +0000 (02:02 -0800)]
Print full Type::ResolvedPaths starting with Self

(e.g., `Self::Output`)

This doesn't actually "resugar" qualified paths like `<Self as
Foo>::Output`, it just doesn't elide the prefix segments when rendering
cleaned paths like `Self::Output`.

cc #21145

9 years agoFix infinite loop error
GuillaumeGomez [Thu, 5 Feb 2015 14:11:51 +0000 (15:11 +0100)]
Fix infinite loop error

9 years agoRemove getenv warning
GuillaumeGomez [Thu, 5 Feb 2015 00:03:12 +0000 (01:03 +0100)]
Remove getenv warning

9 years agoUpdate to last version, remove "[]" as much as possible
GuillaumeGomez [Wed, 4 Feb 2015 20:48:12 +0000 (21:48 +0100)]
Update to last version, remove "[]" as much as possible

9 years agolibrustc_driver has been updated
GuillaumeGomez [Wed, 4 Feb 2015 00:07:42 +0000 (01:07 +0100)]
librustc_driver has been updated

9 years agolibrustc_trans has been updated
GuillaumeGomez [Wed, 4 Feb 2015 00:04:50 +0000 (01:04 +0100)]
librustc_trans has been updated

9 years agolibrustc_resolve has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:48:39 +0000 (00:48 +0100)]
librustc_resolve has been updated

9 years agolibrustc_typeck has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:16:02 +0000 (00:16 +0100)]
librustc_typeck has been updated

9 years agolibrustc_borrowck has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:11:53 +0000 (00:11 +0100)]
librustc_borrowck has been updated

9 years agolibrustc has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:03:39 +0000 (00:03 +0100)]
librustc has been updated

9 years agoLibsyntax has been updated
GuillaumeGomez [Tue, 3 Feb 2015 22:31:06 +0000 (23:31 +0100)]
Libsyntax has been updated

9 years agoUpdate HEAD:master
GuillaumeGomez [Tue, 3 Feb 2015 18:59:29 +0000 (19:59 +0100)]
Update HEAD:master

9 years agoReplace the get method by the deref one on InternedString
GuillaumeGomez [Mon, 2 Feb 2015 23:23:08 +0000 (00:23 +0100)]
Replace the get method by the deref one on InternedString

9 years agoAdd Str trait to InternedString, set get method deprecated
GuillaumeGomez [Thu, 22 Jan 2015 11:28:44 +0000 (12:28 +0100)]
Add Str trait to InternedString, set get method deprecated

9 years agoRollup merge of #21968 - nikomatsakis:issue-21965-duplicate-preds-in-env, r=pnkfelix
Manish Goregaokar [Fri, 6 Feb 2015 00:11:55 +0000 (05:41 +0530)]
Rollup merge of #21968 - nikomatsakis:issue-21965-duplicate-preds-in-env, r=pnkfelix

 We were already building a hashset to check for duplicates, but we assumed that the initial vector had no duplicates. Fixes #21965.

r? @pnkfelix

9 years agoRollup merge of #21966 - scialex:fix-extern, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:11:38 +0000 (05:41 +0530)]
Rollup merge of #21966 - scialex:fix-extern, r=alexcrichton

 Also added test for it.

Fixes #21928

9 years agoRollup merge of #21958 - brson:stable-features, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:11:13 +0000 (05:41 +0530)]
Rollup merge of #21958 - brson:stable-features, r=alexcrichton

 ....

The 'stable_features' lint helps people progress from unstable to
stable Rust by telling them when they no longer need a `feature`
attribute because upstream Rust has declared it stable.

This compares to the existing 'unstable_features' lint, which is used
to implement feature staging, and triggers on *any* use
of `#[feature]`.

9 years agoRollup merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:10:52 +0000 (05:40 +0530)]
Rollup merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton

 New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.

9 years agoRollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:10:28 +0000 (05:40 +0530)]
Rollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichton

 This is 99% burning ints to the ground, but I also got rid of useless annotations or made code more \"idiomatic\" as I went along. Mostly changes in tests.

9 years agoRollup merge of #21924 - steveklabnik:fix_try_docs, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:08:37 +0000 (05:38 +0530)]
Rollup merge of #21924 - steveklabnik:fix_try_docs, r=huonw

 This is now a Result, not an Option.

9 years agoRollup merge of #21925 - sfackler:allow-missing-copy, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:08:08 +0000 (05:38 +0530)]
Rollup merge of #21925 - sfackler:allow-missing-copy, r=alexcrichton

 This was particularly helpful in the time just after OIBIT's
implementation to make sure things that were supposed to be Copy
continued to be, but it's now creates a lot of noise for types that
intentionally don't want to be Copy.

r? @alexcrichton

9 years agoRollup merge of #21941 - dotdash:with_cond_false, r=Aatch
Manish Goregaokar [Fri, 6 Feb 2015 00:07:49 +0000 (05:37 +0530)]
Rollup merge of #21941 - dotdash:with_cond_false, r=Aatch

 Currently \"k / 2\" generates one (k: uint) or two (k: int) \"br false,
...\" instructions and the corresponding basic blocks, producing quite
some noise and making the code unnecessarily hard to read.

Additionally we can skip translation if the code would end up
unreachable anyway.

9 years agoRollup merge of #21951 - Gankro:entry, r=aturon
Manish Goregaokar [Fri, 6 Feb 2015 00:07:32 +0000 (05:37 +0530)]
Rollup merge of #21951 - Gankro:entry, r=aturon

 This also removes two erroneous re-exports of the Entry variants, and so is incidentally a [breaking-change], though presumably no one should have been using those.

r? @aturon

9 years agoRollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnik
Manish Goregaokar [Fri, 6 Feb 2015 00:07:17 +0000 (05:37 +0530)]
Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnik

 The spelling corrections were made in both documentation comments and
regular comments.

9 years agoRollup merge of #21955 - jbcrail:fix-test-comments, r=steveklabnik
Manish Goregaokar [Fri, 6 Feb 2015 00:06:59 +0000 (05:36 +0530)]
Rollup merge of #21955 - jbcrail:fix-test-comments, r=steveklabnik

 Just spelling corrections.

9 years agoRollup merge of #21964 - semarie:openbsd-env, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:06:48 +0000 (05:36 +0530)]
Rollup merge of #21964 - semarie:openbsd-env, r=alexcrichton

 - add `_SC_GETPW_R_SIZE_MAX` constant
- declare `struct passwd`
- convert `load_self` to `current_exe`

Note: OpenBSD don't provide system function to return a valuable Path
for `env::current_exe`. The implementation is currently based on the
value of `argv[0]`, which couldn't be used when executable is called via
PATH.

9 years agoRollup merge of #21976 - mzabaluev:fix-copy-mut-lifetime, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:06:32 +0000 (05:36 +0530)]
Rollup merge of #21976 - mzabaluev:fix-copy-mut-lifetime, r=alexcrichton

 Part of #21923

9 years agoRollup merge of #21980 - pnkfelix:more-robust-span-to-snippet, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:06:15 +0000 (05:36 +0530)]
Rollup merge of #21980 - pnkfelix:more-robust-span-to-snippet, r=huonw

 This can be considered partial work on #8256.

The main observable change: macro expansion sometimes results in spans where `lo > hi`; so for now, when we have such a span, do not attempt to return a snippet result.

(Longer term, we might think about whether we could still present a snippet for the cases where this arises, e.g. perhaps by showing the whole macro as the snippet, assuming that is the sole cause of such spans; or by somehow looking up the closest AST node that holds both `lo` and `hi`, and showing that.)

As a drive-by, revised the API to return a `Result` rather than an `Option`, with better information-packed error value that should help us (and maybe also our users) identify the causes of such problems in the future.  Ideally the call-sites that really want an actual snippet would be updated to catch the newly added `Err` case and print something meaningful about it, but that is not part of this PR.

9 years agoRollup merge of #21981 - pnkfelix:improve-compile-test-malformed-option-handling...
Manish Goregaokar [Fri, 6 Feb 2015 00:05:43 +0000 (05:35 +0530)]
Rollup merge of #21981 - pnkfelix:improve-compile-test-malformed-option-handling, r=huonw

 improve `compiletest` error message when path option missing.

I often run `compiletest` by hand by cut-and-pasting from what `make` runs, (which I observe via `remake --trace`), but then I need to tweak it (cut out options) and its useful to be told when I have removed an option that is actually required, such as `--android-cross-path=path`.)

9 years agoRollup merge of #21983 - pnkfelix:eschew-untyped-arena-in-regions-mock-tcx, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:05:28 +0000 (05:35 +0530)]
Rollup merge of #21983 - pnkfelix:eschew-untyped-arena-in-regions-mock-tcx, r=huonw

 Ported regions-mock-tcx to use TypedArena rather than Arena since it holds cyclic structure (which the Arena API updated for the Drop-Check-Rule cannot handle).

Plus, the use of `arena::Arena` here really is not justified; the allocated values are all the same type anyway.

9 years agoRollup merge of #21986 - LeoTestard:identical-statics, r=eddyb
Manish Goregaokar [Fri, 6 Feb 2015 00:05:13 +0000 (05:35 +0530)]
Rollup merge of #21986 - LeoTestard:identical-statics, r=eddyb

 Creating two identical static expressions involving casts of pointers to arrays
caused an assertion failure in librustc_trans.

cc @eddyb

9 years agoRollup merge of #21987 - pnkfelix:eschew-arena-in-variance-analysis, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:04:51 +0000 (05:34 +0530)]
Rollup merge of #21987 - pnkfelix:eschew-arena-in-variance-analysis, r=huonw

 Use a TypedArena rather than an Arena for the backing storage of variance analysis.

(The code was not using the main feature of Arena in the first place, since all of the `alloc` calls were on the same type.)

9 years agorustdoc: Show non-Rust ABIs on methods
Tom Jakubowski [Fri, 6 Feb 2015 08:51:38 +0000 (00:51 -0800)]
rustdoc: Show non-Rust ABIs on methods

Fix #21621

9 years agorustdoc: Clean up some htmldocck tests
Tom Jakubowski [Fri, 6 Feb 2015 07:54:11 +0000 (23:54 -0800)]
rustdoc: Clean up some htmldocck tests

Fix #21740

9 years agoadded example back in, with a modified, (hopefully) improved description
Junseok Lee [Fri, 6 Feb 2015 07:46:30 +0000 (23:46 -0800)]
added example back in, with a modified, (hopefully) improved description

9 years agoremoved weird example
Junseok Lee [Sun, 1 Feb 2015 02:21:57 +0000 (18:21 -0800)]
removed weird example

9 years agoAuto merge of #21609 - GarrettHeel:master, r=steveklabnik
bors [Fri, 6 Feb 2015 05:52:20 +0000 (05:52 +0000)]
Auto merge of #21609 - GarrettHeel:master, r=steveklabnik

Now that it's no longer feature gated, add docs for wildcard syntax.

9 years agoFix name of variable referenced in featureck.py
Kevin Yap [Fri, 6 Feb 2015 04:13:08 +0000 (20:13 -0800)]
Fix name of variable referenced in featureck.py

9 years agoAuto merge of #21947 - bluss:full-range-syntax, r=brson
bors [Fri, 6 Feb 2015 03:11:34 +0000 (03:11 +0000)]
Auto merge of #21947 - bluss:full-range-syntax, r=brson

Implement step 1 of rust-lang/rfcs#702

Allows the expression `..` (without either endpoint) in general, can be
used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`.

The old syntax &expr[] is not yet removed or warned for.

9 years agoMention the queueueue-ness of mpsc.
Steve Klabnik [Fri, 6 Feb 2015 03:07:47 +0000 (22:07 -0500)]
Mention the queueueue-ness of mpsc.

Fixes #21915

9 years agoImprove error message, when found staticlib instead crate
Potpourri [Thu, 5 Feb 2015 20:28:17 +0000 (23:28 +0300)]
Improve error message, when found staticlib instead crate