]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agotest: Ignore issue-19501 pretty for now
Alex Crichton [Wed, 3 Dec 2014 17:22:13 +0000 (09:22 -0800)]
test: Ignore issue-19501 pretty for now

I don't have enough time to investigate this thoroughly, so for now let's get
the queue moving by ignoring this test.

cc #19501

9 years agoauto merge of #19460 : steveklabnik/rust/conf_fixes, r=alexcrichton
bors [Tue, 2 Dec 2014 17:47:14 +0000 (17:47 +0000)]
auto merge of #19460 : steveklabnik/rust/conf_fixes, r=alexcrichton

9 years agoremove two unneccesary directories from configure
Steve Klabnik [Tue, 2 Dec 2014 14:21:28 +0000 (09:21 -0500)]
remove two unneccesary directories from configure

9 years agoauto merge of #19443 : nodakai/rust/another-missing-extracflags, r=alexcrichton
bors [Tue, 2 Dec 2014 12:02:06 +0000 (12:02 +0000)]
auto merge of #19443 : nodakai/rust/another-missing-extracflags, r=alexcrichton

rust-lang/rust@102b1a5bf1a60eeafb752844e5c98fe5f4e3b992 was not enough!

9 years agoauto merge of #19357 : michaelwoerister/rust/fix-issue-18791, r=alexcrichton
bors [Tue, 2 Dec 2014 10:06:58 +0000 (10:06 +0000)]
auto merge of #19357 : michaelwoerister/rust/fix-issue-18791, r=alexcrichton

One negative side-effect of this change is that there might be quite a bit of copying strings out of the codemap, i.e. one copy for every block that gets translated, just for taking a look at the last character of the block. If this turns out to cause a performance problem then `CodeMap::span_to_snippet()` could be changed return `Option<&str>` instead of `Option<String>`.

Fixes #18791

9 years agoauto merge of #19427 : scialex/rust/doc-attr-macros, r=sfackler
bors [Tue, 2 Dec 2014 07:22:02 +0000 (07:22 +0000)]
auto merge of #19427 : scialex/rust/doc-attr-macros, r=sfackler

this allows one to, for example, use #[doc = $macro_var ] in macros.

9 years agoauto merge of #19450 : jbapple/rust/pq-pop-time, r=Gankro
bors [Tue, 2 Dec 2014 02:52:15 +0000 (02:52 +0000)]
auto merge of #19450 : jbapple/rust/pq-pop-time, r=Gankro

pop calls siftdown, siftdown calls siftdown_range, and siftdown_range
loops on an index that can start as low as 0 and approximately doubles
each iteration.

9 years agoPop on binary heaps does not have constant time complexity.
Jim Apple [Tue, 2 Dec 2014 02:12:48 +0000 (18:12 -0800)]
Pop on binary heaps does not have constant time complexity.

pop calls siftdown, siftdown calls siftdown_range, and siftdown_range
loops on an index that can start as low as 0 and approximately doubles
each iteration.

9 years agodebuginfo: Fix multi-byte character related bug in cleanup scope handling.
Michael Woerister [Thu, 27 Nov 2014 12:54:01 +0000 (13:54 +0100)]
debuginfo: Fix multi-byte character related bug in cleanup scope handling.

Also see issue #18791.

9 years agoauto merge of #19439 : nodakai/rust/liblibc-getsid, r=acrichto
bors [Tue, 2 Dec 2014 00:22:00 +0000 (00:22 +0000)]
auto merge of #19439 : nodakai/rust/liblibc-getsid, r=acrichto

```
#include <unistd.h>

pid_t getsid(pid_t pid);

CONFORMING TO
       SVr4, POSIX.1-2001.
```

9 years agoauto merge of #19405 : jfager/rust/de-match-pyramid, r=bstrie
bors [Mon, 1 Dec 2014 21:56:53 +0000 (21:56 +0000)]
auto merge of #19405 : jfager/rust/de-match-pyramid, r=bstrie

No semantic changes, no enabling `if let` where it wasn't already enabled.

9 years agotest/run-make: another missing $(EXTRACFLAGS).
NODA, Kai [Sun, 23 Nov 2014 13:36:42 +0000 (21:36 +0800)]
test/run-make: another missing $(EXTRACFLAGS).

rust-lang/rust@102b1a5bf1a60eeafb752844e5c98fe5f4e3b992 was not enough!

Signed-off-by: NODA, Kai <nodakai@gmail.com>
9 years agoliblibc: getsid() was missing though setsid() was already there.
NODA, Kai [Mon, 1 Dec 2014 18:39:40 +0000 (02:39 +0800)]
liblibc: getsid() was missing though setsid() was already there.

include <unistd.h>

pid_t getsid(pid_t pid);

CONFORMING TO
       SVr4, POSIX.1-2001.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
9 years agoauto merge of #19436 : lifthrasiir/rust/rustdoc-short-src-paths, r=alexcrichton
bors [Mon, 1 Dec 2014 17:51:55 +0000 (17:51 +0000)]
auto merge of #19436 : lifthrasiir/rust/rustdoc-short-src-paths, r=alexcrichton

Before: `doc/src/collections/home/lifthrasiir/git/rust/src/libcollections/vec.rs.html`
After: `doc/src/collections/vec.rs.html`

If the source code is in the parent dirs relative to the crate root, `..` is replaced with `up` as expected. Any other error like non-UTF-8 paths or drive-relative paths falls back to the absolute path.

There might be a way to improve on false negatives, but this alone should be enough for fixing #18370.

9 years agoadded negative test for macro expansion in attributes
Alexander Light [Mon, 1 Dec 2014 16:08:29 +0000 (11:08 -0500)]
added negative test for macro expansion in attributes

9 years agorustdoc: Use relative paths in source renders.
Kang Seonghoon [Mon, 1 Dec 2014 11:46:51 +0000 (20:46 +0900)]
rustdoc: Use relative paths in source renders.

Before: doc/src/collections/home/lifthrasiir/git/rust/src/libcollections/vec.rs.html
After: doc/src/collections/vec.rs.html

If the source code is in the parent dirs relative to the crate root,
`..` is replaced with `up` as expected. Any other error like non-UTF-8
paths or drive-relative paths falls back to the absolute path.

There might be a way to improve on false negatives, but this alone
should be enough for fixing #18370.

9 years agoauto merge of #19417 : alexcrichton/rust/issue-19383, r=huonw
bors [Mon, 1 Dec 2014 07:11:53 +0000 (07:11 +0000)]
auto merge of #19417 : alexcrichton/rust/issue-19383, r=huonw

We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383

9 years agoauto merge of #19425 : frewsxcv/rust/patch-1, r=steveklabnik
bors [Mon, 1 Dec 2014 05:11:50 +0000 (05:11 +0000)]
auto merge of #19425 : frewsxcv/rust/patch-1, r=steveklabnik

![](http://img2.wikia.nocookie.net/__cb20140809223829/disney/images/5/56/Darkwing_Duck_Poster_Promo.jpg)

9 years agoAdd test for expanding doc strings in macros.
Alexander Light [Mon, 1 Dec 2014 02:05:32 +0000 (21:05 -0500)]
Add test for expanding doc strings in macros.

9 years agoauto merge of #19418 : P1start/rust/unsafe-extern-trait, r=alexcrichton
bors [Mon, 1 Dec 2014 01:56:52 +0000 (01:56 +0000)]
auto merge of #19418 : P1start/rust/unsafe-extern-trait, r=alexcrichton

Fixes #19398.

9 years agofix missed switch pointed out in review plus a few others
jfager [Sun, 30 Nov 2014 23:11:40 +0000 (18:11 -0500)]
fix missed switch pointed out in review plus a few others

9 years agoauto merge of #19415 : P1start/rust/error-message-fixes, r=alexcrichton
bors [Sun, 30 Nov 2014 19:46:53 +0000 (19:46 +0000)]
auto merge of #19415 : P1start/rust/error-message-fixes, r=alexcrichton

This is the style followed by most other error messages.

9 years agoauto merge of #19411 : lifthrasiir/rust/asm-clobbers-expanded, r=alexcrichton
bors [Sun, 30 Nov 2014 17:21:48 +0000 (17:21 +0000)]
auto merge of #19411 : lifthrasiir/rust/asm-clobbers-expanded, r=alexcrichton

I.e. we should not prematurely build operand constraints at the expansion time. Otherwise `--pretty expanded` diverges:

```
$ cat t.rs
#![feature(asm)]

pub fn main() { unsafe { asm!("" : : : "hello", "world") }; }

$ rustc t.rs --pretty
#![feature(asm)]

pub fn main() { unsafe { asm!("" : : : "hello" , "world") }; }

$ rustc t.rs --pretty expanded
#![feature(asm)]
#![feature(phase)]
#![no_std]
#![feature(globs)]
#[phase(plugin, link)]
extern crate "std" as std;
#[prelude_import]
use std::prelude::*;

pub fn main() { unsafe { asm!("":  :  : "~{hello},~{world}") }; }
```

(The last code *does* compile, but won't do the expected thing.)

9 years agoallow macro expansions in attributes
Alexander Light [Sun, 30 Nov 2014 14:51:15 +0000 (09:51 -0500)]
allow macro expansions in attributes

9 years agoFix typo in tests makefile
Corey Farwell [Sun, 30 Nov 2014 14:07:36 +0000 (09:07 -0500)]
Fix typo in tests makefile

9 years agoauto merge of #19369 : seanmonstar/rust/cow-str, r=alexcrichton
bors [Sun, 30 Nov 2014 10:21:49 +0000 (10:21 +0000)]
auto merge of #19369 : seanmonstar/rust/cow-str, r=alexcrichton

This implementation existed on MaybeOwned, but has been lost in the
transition to Cows. Let's put it back.

@aturon r?

9 years agotrans: Eliminated redundant allocations.
Kang Seonghoon [Sun, 30 Nov 2014 09:52:44 +0000 (18:52 +0900)]
trans: Eliminated redundant allocations.

9 years agoFix the ordering of `unsafe` and `extern` in methods
P1start [Sun, 30 Nov 2014 08:33:04 +0000 (21:33 +1300)]
Fix the ordering of `unsafe` and `extern` in methods

This breaks code that looks like this:

    trait Foo {
        extern "C" unsafe fn foo();
    }

    impl Foo for Bar {
        extern "C" unsafe fn foo() { ... }
    }

Change such code to look like this:

    trait Foo {
        unsafe extern "C" fn foo();
    }

    impl Foo for Bar {
        unsafe extern "C" fn foo() { ... }
    }

Fixes #19398.

[breaking-change]

9 years agomk: Use host llvm linkage paths, not target ones
Alex Crichton [Sun, 30 Nov 2014 08:01:19 +0000 (00:01 -0800)]
mk: Use host llvm linkage paths, not target ones

We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383

9 years agoAdjust some error messages to start with a lowercase letter and not finish with a...
P1start [Fri, 28 Nov 2014 06:01:41 +0000 (19:01 +1300)]
Adjust some error messages to start with a lowercase letter and not finish with a full stop

9 years agoauto merge of #19365 : frewsxcv/rust/getopts-cleanup, r=alexcrichton
bors [Sun, 30 Nov 2014 06:56:41 +0000 (06:56 +0000)]
auto merge of #19365 : frewsxcv/rust/getopts-cleanup, r=alexcrichton

* Remove public reexports, as a part of #19253
* Rename getopts::Fail_ to getopts::Fail
 * Didn't see a reason for the suffixed '_'
* Removed getopts::FailType
 * Looked like it was only beings used for tests; refactored the tests
   to stop requiring it
* A few other non-breaking trivial refactoring changes

[breaking-change]

9 years agosyntax: Make `asm!` clobbers a proper vector.
Kang Seonghoon [Sun, 30 Nov 2014 02:56:31 +0000 (11:56 +0900)]
syntax: Make `asm!` clobbers a proper vector.

Otherwise `--pretty expanded` diverges.

9 years agoauto merge of #19392 : murarth/rust/rustc-compile-twice, r=nick29581
bors [Sat, 29 Nov 2014 21:51:34 +0000 (21:51 +0000)]
auto merge of #19392 : murarth/rust/rustc-compile-twice, r=nick29581

Closes #19371

9 years agoReplace some verbose match statements with their `if let` equivalent.
jfager [Sat, 29 Nov 2014 21:41:21 +0000 (16:41 -0500)]
Replace some verbose match statements with their `if let` equivalent.

No semantic changes, no enabling `if let` where it wasn't already enabled.

9 years agoauto merge of #19401 : MatejLach/rust/guide_are_fix, r=steveklabnik
bors [Sat, 29 Nov 2014 17:31:32 +0000 (17:31 +0000)]
auto merge of #19401 : MatejLach/rust/guide_are_fix, r=steveklabnik

Fixes a small omission of `are` in the sentence:
`There also a few things you can do with a tuple as a whole, without...`
r @steveklabnik?

9 years agoFix rustc panic on second compile_input
Murarth [Sat, 29 Nov 2014 04:56:09 +0000 (21:56 -0700)]
Fix rustc panic on second compile_input

9 years agoFix a simple typo
Matej Lach [Sat, 29 Nov 2014 13:26:32 +0000 (13:26 +0000)]
Fix a simple typo

9 years agoauto merge of #19345 : steveklabnik/rust/gh19344, r=alexcrichton
bors [Fri, 28 Nov 2014 15:11:24 +0000 (15:11 +0000)]
auto merge of #19345 : steveklabnik/rust/gh19344, r=alexcrichton

Fixes #19344

9 years agoreword faq to remove reference to indexing strings
Steve Klabnik [Wed, 26 Nov 2014 21:48:06 +0000 (16:48 -0500)]
reword faq to remove reference to indexing strings

Fixes #19344

9 years agoauto merge of #19366 : liigo/rust/mipsel-linux, r=alexcrichton
bors [Fri, 28 Nov 2014 11:31:22 +0000 (11:31 +0000)]
auto merge of #19366 : liigo/rust/mipsel-linux, r=alexcrichton

Since #19076 was merged, I believe mipsel + linux maybe need add to the list here, too.

9 years agoauto merge of #19363 : michaelwoerister/rust/support-unboxed-closures, r=alexcrichton
bors [Fri, 28 Nov 2014 09:31:24 +0000 (09:31 +0000)]
auto merge of #19363 : michaelwoerister/rust/support-unboxed-closures, r=alexcrichton

This PR lets `rustc` generate debuginfo for variables captured by unboxed closures.

Fixes #19356

@nikomatsakis This PR will probably conflict with #19338. If this gets merged before, you should be able to just leave the test case as it is (maybe remove the `#![feature(unboxed_closures)]` directive).

9 years agoauto merge of #19360 : olivren/rust/master, r=Gankro
bors [Fri, 28 Nov 2014 07:31:26 +0000 (07:31 +0000)]
auto merge of #19360 : olivren/rust/master, r=Gankro

The previous code was giving an incorrect result (not x/3).

Also, this function does not work with signed integers. It now accepts `u32` instead of `i32`.

9 years agoimpl Str for CowString
Sean McArthur [Fri, 28 Nov 2014 03:21:38 +0000 (19:21 -0800)]
impl Str for CowString

This implementation existed on MaybeOwned, but has been lost in the
transition to Cows. Let's put it back.

9 years agoauto merge of #19355 : vhbit/rust/ios-backtrace-fix, r=alexcrichton
bors [Fri, 28 Nov 2014 02:46:24 +0000 (02:46 +0000)]
auto merge of #19355 : vhbit/rust/ios-backtrace-fix, r=alexcrichton

9 years agolibrustrt: stack_overflow support mipsel linux
Liigo Zhuang [Tue, 25 Nov 2014 11:16:08 +0000 (19:16 +0800)]
librustrt: stack_overflow support mipsel linux

9 years agoauto merge of #19354 : barosl/rust/strconv-doc-fix, r=steveklabnik
bors [Fri, 28 Nov 2014 00:01:23 +0000 (00:01 +0000)]
auto merge of #19354 : barosl/rust/strconv-doc-fix, r=steveklabnik

- `int_to_str_bytes_common()` doesn't have a return value.
- `float_to_str_bytes_common()` has an old-style doc comment.

9 years agoauto merge of #19349 : tomjakubowski/rust/rustdoc-struct-variant-vis, r=sfackler
bors [Thu, 27 Nov 2014 21:46:24 +0000 (21:46 +0000)]
auto merge of #19349 : tomjakubowski/rust/rustdoc-struct-variant-vis, r=sfackler

Teach rustdoc that struct variant fields have inherited visibility.

Fix #19048

9 years agogetopts: cleanup, renames, remove reexports
Corey Farwell [Thu, 27 Nov 2014 19:39:50 +0000 (14:39 -0500)]
getopts: cleanup, renames, remove reexports

* Remove public reexports, as a part of #19253
* Rename getopts::Fail_ to getopts::Fail
 * Didn't see a reason for the suffixed '_'
* Removed getopts::FailType
 * Looked like it was only beings used for tests; refactored the tests
   to stop requiring it
* A few other non-breaking trivial refactoring changes

[breaking-change]

9 years agoauto merge of #19112 : steveklabnik/rust/doc_rc, r=Gankro
bors [Thu, 27 Nov 2014 17:26:22 +0000 (17:26 +0000)]
auto merge of #19112 : steveklabnik/rust/doc_rc, r=Gankro

9 years agodebuginfo: Make variables captured in unboxed closures available in debuginfo.
Michael Woerister [Thu, 27 Nov 2014 14:52:16 +0000 (15:52 +0100)]
debuginfo: Make variables captured in unboxed closures available in debuginfo.

9 years agoFix example code for unreachable!
olivren [Thu, 27 Nov 2014 14:25:29 +0000 (15:25 +0100)]
Fix example code for unreachable!

The previous code was giving an incorrect result (not x/3).

9 years agoauto merge of #19348 : SimonSapin/rust/patch-9, r=huonw
bors [Thu, 27 Nov 2014 10:11:19 +0000 (10:11 +0000)]
auto merge of #19348 : SimonSapin/rust/patch-9, r=huonw

9 years agoFixed iOS build after Iter stab
Valerii Hiora [Thu, 27 Nov 2014 09:33:56 +0000 (11:33 +0200)]
Fixed iOS build after Iter stab

9 years agoDocumentation fix for std::num::strconv
Barosl Lee [Thu, 27 Nov 2014 08:04:31 +0000 (17:04 +0900)]
Documentation fix for std::num::strconv

- int_to_str_bytes_common() doesn't have a return value.
- float_to_str_bytes_common() has an old-style doc comment.

9 years agoauto merge of #19343 : sfackler/rust/less-special-attrs, r=alexcrichton
bors [Thu, 27 Nov 2014 06:41:17 +0000 (06:41 +0000)]
auto merge of #19343 : sfackler/rust/less-special-attrs, r=alexcrichton

Descriptions and licenses are handled by Cargo now, so there's no reason
to keep these attributes around.

9 years agoauto merge of #19342 : alexcrichton/rust/rollup, r=alexcrichton
bors [Thu, 27 Nov 2014 04:32:12 +0000 (04:32 +0000)]
auto merge of #19342 : alexcrichton/rust/rollup, r=alexcrichton

9 years agoMore test fixes and rebase conflicts!
Alex Crichton [Wed, 26 Nov 2014 19:17:23 +0000 (11:17 -0800)]
More test fixes and rebase conflicts!

9 years agorollup merge of #19329: steveklabnik/doc_style_cleanup2
Alex Crichton [Wed, 26 Nov 2014 19:00:36 +0000 (11:00 -0800)]
rollup merge of #19329: steveklabnik/doc_style_cleanup2

9 years ago/*! -> //!
Steve Klabnik [Wed, 26 Nov 2014 02:17:11 +0000 (21:17 -0500)]
/*! -> //!

Sister pull request of https://github.com/rust-lang/rust/pull/19288, but
for the other style of block doc comment.

9 years agoTest fixes and rebase conflicts
Alex Crichton [Wed, 26 Nov 2014 18:21:45 +0000 (10:21 -0800)]
Test fixes and rebase conflicts

9 years agorollup merge of #19336: apasel422/guide
Alex Crichton [Wed, 26 Nov 2014 17:47:13 +0000 (09:47 -0800)]
rollup merge of #19336: apasel422/guide

- `s/(left|right) hand/\1-hand/`
- `s/parenthesis/parentheses/`
- `s/unicode/Unicode/`
- `s/validly-encoded/validly encoded/`

9 years agorollup merge of #19330: csouth3/binaryheap-iter
Alex Crichton [Wed, 26 Nov 2014 17:47:11 +0000 (09:47 -0800)]
rollup merge of #19330: csouth3/binaryheap-iter

There's no reason that BinaryHeap's iterator can't implement DoubleEnded and ExactSize, so add these implementations.

9 years agorollup merge of #19328: sfackler/buffered-get-mut
Alex Crichton [Wed, 26 Nov 2014 17:47:10 +0000 (09:47 -0800)]
rollup merge of #19328: sfackler/buffered-get-mut

This is necessary to e.g. set a timeout on the underlying stream.

r? @alexcrichton

9 years agorollup merge of #19326: huonw/safer-syntax
Alex Crichton [Wed, 26 Nov 2014 17:47:08 +0000 (09:47 -0800)]
rollup merge of #19326: huonw/safer-syntax

This makes it correct (e.g. avoiding null pointers) and safe.

9 years agorollup merge of #19325: ucarion/pointers-doc-formatting
Alex Crichton [Wed, 26 Nov 2014 17:47:04 +0000 (09:47 -0800)]
rollup merge of #19325: ucarion/pointers-doc-formatting

The "Returning Pointers" section of the pointers guide broke from the convention of putting code between backticks. This PR fixes that. There's also a little trailing whitespace I took care of.

9 years agorollup merge of #19322: DiamondLovesYou/multi-llvmdeps
Alex Crichton [Wed, 26 Nov 2014 17:47:01 +0000 (09:47 -0800)]
rollup merge of #19322: DiamondLovesYou/multi-llvmdeps

9 years agorollup merge of #19317: sfackler/xcrate-namespace
Alex Crichton [Wed, 26 Nov 2014 17:46:59 +0000 (09:46 -0800)]
rollup merge of #19317: sfackler/xcrate-namespace

The chunk of code in encoder.rs was at one point deleted, but must have come back in a rebase or something :(

Closes #19293

9 years agorollup merge of #19316: steveklabnik/gh18876
Alex Crichton [Wed, 26 Nov 2014 17:46:57 +0000 (09:46 -0800)]
rollup merge of #19316: steveklabnik/gh18876

Fixes #18876

9 years agorollup merge of #19313: steveklabnik/gh18844
Alex Crichton [Wed, 26 Nov 2014 17:46:54 +0000 (09:46 -0800)]
rollup merge of #19313: steveklabnik/gh18844

Fixes #18844

9 years agorollup merge of #19312: steveklabnik/gh19177
Alex Crichton [Wed, 26 Nov 2014 17:46:48 +0000 (09:46 -0800)]
rollup merge of #19312: steveklabnik/gh19177

9 years agorollup merge of #19310: steveklabnik/gh19178
Alex Crichton [Wed, 26 Nov 2014 17:44:57 +0000 (09:44 -0800)]
rollup merge of #19310: steveklabnik/gh19178

Fixes #19178

9 years agorollup merge of #19308: thestinger/oom
Alex Crichton [Wed, 26 Nov 2014 17:44:55 +0000 (09:44 -0800)]
rollup merge of #19308: thestinger/oom

Closes #19305

9 years agorollup merge of #19307: steveklabnik/gh19199
Alex Crichton [Wed, 26 Nov 2014 17:44:53 +0000 (09:44 -0800)]
rollup merge of #19307: steveklabnik/gh19199

Fixes #19199

9 years agorollup merge of #19304: steveklabnik/gh19302
Alex Crichton [Wed, 26 Nov 2014 17:44:51 +0000 (09:44 -0800)]
rollup merge of #19304: steveklabnik/gh19302

Fixes #19302.

Also made a minor cosmetic change to bring the example in line with style guidelines.

9 years agorollup merge of #19301: Gankro/take-fix
Alex Crichton [Wed, 26 Nov 2014 17:44:49 +0000 (09:44 -0800)]
rollup merge of #19301: Gankro/take-fix

Was taking the value out correctly, but then not doing anything to actually fix the table. derp.

9 years agorollup merge of #19300: killercup/patch-1
Alex Crichton [Wed, 26 Nov 2014 17:44:47 +0000 (09:44 -0800)]
rollup merge of #19300: killercup/patch-1

Just saw this when looking at #19297 and couldn't find an issue/PR dealing with this. #18773 seems to have missed this file.

Compiler output is generated [here](https://github.com/rust-lang/rust/blob/770378a313a573776b16237a46b75bafa49072c1/src/librustc_trans/driver/mod.rs#L466).

cc @steveklabnik

9 years agorollup merge of #19299: nikomatsakis/stop-indenting-test-output
Alex Crichton [Wed, 26 Nov 2014 17:44:45 +0000 (09:44 -0800)]
rollup merge of #19299: nikomatsakis/stop-indenting-test-output

This fixes a long-time irritant of mine. Inserting tabs causes M-x next-error to not work in emacs and seems to serve relatively little purpose in improving overall readability.

r? @brson

9 years agorollup merge of #19298: nikomatsakis/unboxed-closure-parse-the-plus
Alex Crichton [Wed, 26 Nov 2014 17:44:43 +0000 (09:44 -0800)]
rollup merge of #19298: nikomatsakis/unboxed-closure-parse-the-plus

Implements RFC 438.

Fixes #19092.

This is a [breaking-change]: change types like `&Foo+Send` or `&'a mut Foo+'a` to `&(Foo+Send)` and `&'a mut (Foo+'a)`, respectively.

r? @brson

9 years agorollup merge of #19296: csouth3/trieset-union
Alex Crichton [Wed, 26 Nov 2014 17:44:38 +0000 (09:44 -0800)]
rollup merge of #19296: csouth3/trieset-union

TrieSet doesn't yet have union, intersection, difference, and symmetric difference functions implemented.  Luckily, TrieSet is largely similar to TreeSet, so I was able to reference the implementations of these functions in the latter, and adapt them as necessary to make them work for TrieSet.

One thing that I thought was interesting is that the Iterator yielded by `iter()` for TrieSet iterates over the set's values directly rather than references to the values (whereas I think in most cases I see the Iterator given by `iter()` iterating over immutable references), so for consistency within TrieSet's interface, all of these Iterators also iterate over the values directly.  Let me know if all of these should be instead iterating over references.

9 years agorollup merge of #19288: steveklabnik/doc_style_cleanup
Alex Crichton [Wed, 26 Nov 2014 17:44:33 +0000 (09:44 -0800)]
rollup merge of #19288: steveklabnik/doc_style_cleanup

This is considered good convention.

This is about half of them in total, I just don't want an impossible to land patch. :smile:

9 years agorollup merge of #19287: alexcrichton/issue-19272
Alex Crichton [Wed, 26 Nov 2014 17:44:30 +0000 (09:44 -0800)]
rollup merge of #19287: alexcrichton/issue-19272

At the same time remove the `pub use` of the variants in favor of accessing
through the enum type itself. This is a breaking change as the `Found` and
`NotFound` variants must now be imported through `BinarySearchResult` instead of
just `std::slice`.

[breaking-change]
Closes #19271

9 years agorollup merge of #19282: steveklabnik/remove_grammar
Alex Crichton [Wed, 26 Nov 2014 17:44:27 +0000 (09:44 -0800)]
rollup merge of #19282: steveklabnik/remove_grammar

I stumbled across this today, and it's not really working. It's been around for a very, very long time, and seems to be based on stuff we don't even have anymore.

I asked in `#rust-internals`, and @cmr said we should just kill it, so here I am. :) I don't think that anything else uses Java, but maybe I missed something.

And if this _isn't_ what we want, I'm fine with closing too. Just some housekeeping.

9 years agorollup merge of #19273: ogham/rename-file-types
Alex Crichton [Wed, 26 Nov 2014 17:44:21 +0000 (09:44 -0800)]
rollup merge of #19273: ogham/rename-file-types

All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

Part of #19253.

9 years agorollup merge of #19272: tomjakubowski/rustdoc-sized
Alex Crichton [Wed, 26 Nov 2014 17:44:18 +0000 (09:44 -0800)]
rollup merge of #19272: tomjakubowski/rustdoc-sized

Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly.

Fix #18515

9 years agorollup merge of #19266: aochagavia/const
Alex Crichton [Wed, 26 Nov 2014 17:44:14 +0000 (09:44 -0800)]
rollup merge of #19266: aochagavia/const

With this PR, the following code works:

```
#![feature(tuple_indexing)]
struct MyStruct { field1: uint }

const S: MyStruct = MyStruct { field1: 42u };
const T: (uint,) = (42u,);

struct ConstCheck {
    array1: [int, ..S.field1],
    array2: [int, ..T.0],
}
```

Closes https://github.com/rust-lang/rust/issues/19244
Related https://github.com/rust-lang/rust/issues/19265

9 years agorollup merge of #19231: Gankro/ringbuf-into-iter
Alex Crichton [Wed, 26 Nov 2014 17:44:06 +0000 (09:44 -0800)]
rollup merge of #19231: Gankro/ringbuf-into-iter

r? @huonw @csherratt

9 years agorollup merge of #19224: frewsxcv/unprefix-json-types
Alex Crichton [Wed, 26 Nov 2014 17:44:03 +0000 (09:44 -0800)]
rollup merge of #19224: frewsxcv/unprefix-json-types

Addressing the issues brought up in [this thread](https://github.com/rust-lang/rust/pull/19114#discussion_r20614461)

This pull request:

* Unpublicizes reexports
* Renames type aliases:
 * `json::JsonArray` ☞ `json::Array`
 * `json::JsonObject` ☞ `json::Object`

9 years agorustdoc: inherited vis. for struct variant fields
Tom Jakubowski [Wed, 26 Nov 2014 23:57:22 +0000 (15:57 -0800)]
rustdoc: inherited vis. for struct variant fields

Teach rustdoc that struct variant fields have inherited visibility.

Fix #19048

9 years agoUpdate docstrings for UnicodeChar::is_digit => is_numeric rename
Simon Sapin [Wed, 26 Nov 2014 23:42:54 +0000 (23:42 +0000)]
Update docstrings for UnicodeChar::is_digit => is_numeric rename

9 years agoauto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton
bors [Wed, 26 Nov 2014 22:37:06 +0000 (22:37 +0000)]
auto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton

...of the type being matched.

This change will result in a better diagnostic for code like the following:

```rust
enum Enum {
    Foo,
    Bar
}

fn f(x: Enum) {
    match x {
        Foo => (),
        Bar => ()
    }
}
```

which would currently simply fail with an unreachable pattern error
on the 2nd arm.

The user is advised to either use a qualified path in the patterns
or import the variants explicitly into the scope.

9 years agoDo not print any warnings if '-A warnings' is specified on the command line
Jakub Bukaj [Mon, 24 Nov 2014 19:53:12 +0000 (14:53 -0500)]
Do not print any warnings if '-A warnings' is specified on the command line

9 years agoWarn on pattern bindings that have the same name as a variant
Jakub Bukaj [Thu, 20 Nov 2014 15:57:36 +0000 (16:57 +0100)]
Warn on pattern bindings that have the same name as a variant

...of the type being matched.

This change will result in a better diagnostic for code like the following:

```rust
enum Enum {
    Foo,
    Bar
}

fn f(x: Enum) {
    match x {
        Foo => (),
        Bar => ()
    }
}
```

which would currently simply fail with an unreachable pattern error
on the 2nd arm.

The user is advised to either use a qualified path in the patterns
or import the variants explicitly into the scope.

9 years agoauto merge of #19144 : michaelwoerister/rust/lldb-scripts, r=alexcrichton
bors [Wed, 26 Nov 2014 20:12:09 +0000 (20:12 +0000)]
auto merge of #19144 : michaelwoerister/rust/lldb-scripts, r=alexcrichton

This PR adds the `rust-lldb` script (feel free to bikeshed about the name).
The script will start LLDB and, before doing anything else, load [LLDB type summaries](http://lldb.llvm.org/varformats.html) that will make LLDB print values with Rust syntax. Just use the script like you would normally use LLDB:

```
rust-lldb executable-to-debug --and-any-other-commandline --args
```
The script will just add one additional commandline argument to the LLDB invocation and pass along the rest of the arguments to LLDB after that.

Given the following program...
```rust
fn main() {
let x = Some(1u);
let y = [0, 1, 2i];
let z = (x, y);

println!("{} {} {}", x, y, z);
}
```
...*without* the 'LLDB type summaries', values will be printed something like this...
```
(lldb) p x
(core::option::Option<uint>) $3 = {
   = (RUST$ENUM$DISR = Some)
   = (RUST$ENUM$DISR = Some, 1)
}
(lldb) p y
(long [3]) $4 = ([0] = 0, [1] = 1, [2] = 2)
(lldb) p z
((core::option::Option<uint>, [int, ..3])) $5 = {
   = {
     = (RUST$ENUM$DISR = Some)
     = (RUST$ENUM$DISR = Some, 1)
  }
   = ([0] = 0, [1] = 1, [2] = 2)
}
```
...*with* the 'LLDB type summaries', values will be printed like this:
```
(lldb) p x
(core::option::Option<uint>) $0 = Some(1)
(lldb) p y
(long [3]) $1 = [0, 1, 2]
(lldb) p z
((core::option::Option<uint>, [int, ..3])) $2 = (Some(1), [0, 1, 2])
```

The 'LLDB type summaries' used by the script have been in use for a while in the LLDB autotests but I still consider them to be of alpha-version quality. If you see anything weird when you use them, feel free to file an issue.

The script will use whatever Rust "installation" is in PATH, so whichever `rustc` will be called if you type `rustc` into the console, this is the one that the script will ask for the LLDB extension module location. The build system will take care of putting the script and LLDB python module in the right places, whether you want to use the stage1 or stage2 compiler or the one coming with `make install` / `rustup.sh`.

Since I don't have much experience with the build system, Makefiles and shell scripts, please look these changes over carefully.

9 years agoRemove special casing for some meta attributes
Steven Fackler [Wed, 26 Nov 2014 19:44:45 +0000 (11:44 -0800)]
Remove special casing for some meta attributes

Descriptions and licenses are handled by Cargo now, so there's no reason
to keep these attributes around.

9 years agoauto merge of #19176 : aturon/rust/stab-iter, r=alexcrichton
bors [Wed, 26 Nov 2014 17:42:07 +0000 (17:42 +0000)]
auto merge of #19176 : aturon/rust/stab-iter, r=alexcrichton

This is an initial pass at stabilizing the `iter` module. The module is
fairly large, but is also pretty polished, so most of the stabilization
leaves things as they are.

Some changes:

* Due to the new object safety rules, various traits needs to be split
  into object-safe traits and extension traits. This includes `Iterator`
  itself. While splitting up the traits adds some complexity, it will
  also increase flexbility: once we have automatic impls of `Trait` for
  trait objects over `Trait`, then things like the iterator adapters
  will all work with trait objects.

* Iterator adapters that use up the entire iterator now take it by
  value, which makes the semantics more clear and helps catch bugs. Due
  to the splitting of Iterator, this does not affect trait objects. If
  the underlying iterator is still desired for some reason, `by_ref` can
  be used. (Note: this change had no fallout in the Rust distro except
  for the useless mut lint.)

* In general, extension traits new and old are following an [in-progress
  convention](rust-lang/rfcs#445). As such, they
  are marked `unstable`.

* As usual, anything involving closures is `unstable` pending unboxed
  closures.

* A few of the more esoteric/underdeveloped iterator forms (like
  `RandomAccessIterator` and `MutableDoubleEndedIterator`, along with
  various unfolds) are left experimental for now.

* The `order` submodule is left `experimental` because it will hopefully
  be replaced by generalized comparison traits.

* "Leaf" iterators (like `Repeat` and `Counter`) are uniformly
  constructed by free fns at the module level. That's because the types
  are not otherwise of any significance (if we had `impl Trait`, you
  wouldn't want to define a type at all).

Closes #17701

Due to renamings and splitting of traits, this is a:

[breaking-change]

9 years agodebuginfo: Fix LLDB pretty printer for enum variants with zero fields.
Michael Woerister [Wed, 26 Nov 2014 16:42:32 +0000 (17:42 +0100)]
debuginfo: Fix LLDB pretty printer for enum variants with zero fields.

9 years agoAdd tests for the parsing of `+` and the error messages if people get it wrong.
Niko Matsakis [Tue, 25 Nov 2014 12:42:16 +0000 (07:42 -0500)]
Add tests for the parsing of `+` and the error messages if people get it wrong.

Fixes #18772.

9 years agoFix odd example where bounds were permitted and then ignored
Niko Matsakis [Fri, 21 Nov 2014 00:45:42 +0000 (19:45 -0500)]
Fix odd example where bounds were permitted and then ignored

9 years agoFix rustdoc
Niko Matsakis [Fri, 21 Nov 2014 00:44:49 +0000 (19:44 -0500)]
Fix rustdoc

9 years agoRote changes due to the fact that ast paths no longer carry this extraneous bounds.
Niko Matsakis [Thu, 20 Nov 2014 20:08:48 +0000 (15:08 -0500)]
Rote changes due to the fact that ast paths no longer carry this extraneous bounds.