]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #21011: steveklabnik/gh20993
Alex Crichton [Thu, 15 Jan 2015 22:11:32 +0000 (14:11 -0800)]
rollup merge of #21011: steveklabnik/gh20993

Fixes #20993

9 years agorollup merge of #21005: huonw/deriving-docs
Alex Crichton [Thu, 15 Jan 2015 22:11:32 +0000 (14:11 -0800)]
rollup merge of #21005: huonw/deriving-docs

Syntax and a few fixed bugs etc.

9 years agorollup merge of #21001: camjackson/master
Alex Crichton [Thu, 15 Jan 2015 22:11:31 +0000 (14:11 -0800)]
rollup merge of #21001: camjackson/master

With the code samples as they are, the compiler says:
`feature has been added to Rust, directive not necessary`

9 years agorollup merge of #20988: ciphergoth/task-to-thread
Alex Crichton [Thu, 15 Jan 2015 22:11:30 +0000 (14:11 -0800)]
rollup merge of #20988: ciphergoth/task-to-thread

"Tasks" are no longer a thing in Rust; refer to threads instead. Work is still needed on [threads.md](threads.md).

9 years agorollup merge of #20986: alkor/doc-fixes
Alex Crichton [Thu, 15 Jan 2015 22:11:29 +0000 (14:11 -0800)]
rollup merge of #20986: alkor/doc-fixes

Corrections in TRPL macros guide

9 years agorollup merge of #20985: vhbit/ios-install
Alex Crichton [Thu, 15 Jan 2015 22:11:29 +0000 (14:11 -0800)]
rollup merge of #20985: vhbit/ios-install

It was broken as tried to copy dylibs which are actually never been
built for iOS

Fixes #20358

9 years agorollup merge of #20976: jbcrail/rm-unused-import
Alex Crichton [Thu, 15 Jan 2015 22:11:29 +0000 (14:11 -0800)]
rollup merge of #20976: jbcrail/rm-unused-import

The BorrowFrom trait was unused by the tests.

9 years agorollup merge of #20964: sfackler/recursion-syntax
Alex Crichton [Thu, 15 Jan 2015 22:11:28 +0000 (14:11 -0800)]
rollup merge of #20964: sfackler/recursion-syntax

9 years agorollup merge of #20929: laurilehmijoki/master
Alex Crichton [Thu, 15 Jan 2015 22:11:28 +0000 (14:11 -0800)]
rollup merge of #20929: laurilehmijoki/master

The sentence is easier to read once we move the word "again" away from the last position.

9 years agorollup merge of #20892: CarVac/master
Alex Crichton [Thu, 15 Jan 2015 22:11:28 +0000 (14:11 -0800)]
rollup merge of #20892: CarVac/master

`uint` was recently deprecated, so in following the use of `i32` in the first parts, replace all copies of `uint` with `u32`.

9 years agorollup merge of #20632: gchp/reference
Alex Crichton [Thu, 15 Jan 2015 22:11:27 +0000 (14:11 -0800)]
rollup merge of #20632: gchp/reference

I noticed that the `deriving` keyword is deprecated and that `derive` is the replacement. This updates the reference (and other docs) to remove the use `deriving`.

9 years agorollup merge of #20463: amaranth/black_box_output
Alex Crichton [Thu, 15 Jan 2015 22:11:27 +0000 (14:11 -0800)]
rollup merge of #20463: amaranth/black_box_output

By returning the passed value black_box can be used on data being
passed to a function being benchmarked. This ensures the compiler
does not optimize the function for the input which could result in
the entire function being optimized away.

9 years agoauto merge of #21077 : eddyb/rust/expr-qpath, r=nikomatsakis
bors [Thu, 15 Jan 2015 17:12:55 +0000 (17:12 +0000)]
auto merge of #21077 : eddyb/rust/expr-qpath, r=nikomatsakis

Working towards #16293, this adds support for `<T as Trait>::method` in expressions.

9 years agorustc: implement fully qualified UFCS expressions.
Eduard Burtescu [Thu, 15 Jan 2015 07:46:12 +0000 (09:46 +0200)]
rustc: implement fully qualified UFCS expressions.

9 years agosyntax: parse fully qualified UFCS expressions.
Eduard Burtescu [Tue, 13 Jan 2015 04:03:12 +0000 (06:03 +0200)]
syntax: parse fully qualified UFCS expressions.

9 years agosyntax: add fully qualified UFCS expressions.
Eduard Burtescu [Tue, 13 Jan 2015 04:02:56 +0000 (06:02 +0200)]
syntax: add fully qualified UFCS expressions.

9 years agoauto merge of #20990 : estsauver/rust/playpen_20732, r=alexcrichton
bors [Thu, 15 Jan 2015 09:12:47 +0000 (09:12 +0000)]
auto merge of #20990 : estsauver/rust/playpen_20732, r=alexcrichton

In #20732, that all links in some modules point to the same code
examples was reported. The ID's generated for documents in
librustdoc are not all unique, which means the code rendered as
text is not being properly selected.

This change makes the link to the code section that is next to
the current link.

9 years agoauto merge of #20980 : richo/rust/final-power, r=alexcrichton
bors [Thu, 15 Jan 2015 05:12:30 +0000 (05:12 +0000)]
auto merge of #20980 : richo/rust/final-power, r=alexcrichton

Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it.

This gets you as far as being able to target powerpc with, eg:

    LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs

Would really love to get this out before 1.0. r? @alexcrichton

9 years agoauto merge of #20290 : jroesch/rust/generalize-impl-bounds, r=nikomatsakis
bors [Thu, 15 Jan 2015 01:42:25 +0000 (01:42 +0000)]
auto merge of #20290 : jroesch/rust/generalize-impl-bounds, r=nikomatsakis

This should fix both #20020 and #20107. This moves out the code into its own file.

I have a couple concerns that can either be addressed in this PR or in a future one.

- The error reporting for the fulfillment context should be span aware because currently it is attached to the top
  of the file which is less then desirable.
- There is a failure in the test file: run-pass/issue-2611-3.rs, this seems like it should be a failure to me, but I am not sure.

As a nit I'm not enthused about the file name, and am open to better suggestions.

r? @nikomatsakis

9 years agoRefactor compare_impl_method to use all bounds
Jared Roesch [Wed, 14 Jan 2015 21:43:17 +0000 (13:43 -0800)]
Refactor compare_impl_method to use all bounds

Refactor compare_impl_method into its own file. Modify the
code to stop comparing individual parameter bounds.
Instead we now use the predicates list attached to the trait
and implementation generics. This ensures consistency even
when bounds are declared in different places (i.e on
a parameter vs. in a where clause).

9 years agoauto merge of #21082 : brson/rust/finally, r=alexcrichton
bors [Wed, 14 Jan 2015 12:19:58 +0000 (12:19 +0000)]
auto merge of #21082 : brson/rust/finally, r=alexcrichton

No in-tree users. Ugly interface. Closes #14332.

I just happened to notice that this module still lives and has no users. Assuming we don't want it.

r? @aturon cc @alexcrichton

9 years agoauto merge of #21076 : sfackler/rust/bufferedreader-undef, r=Gankro
bors [Wed, 14 Jan 2015 09:52:08 +0000 (09:52 +0000)]
auto merge of #21076 : sfackler/rust/bufferedreader-undef, r=Gankro

It's passed to the underlying reader, so uninitialized memory == sad
times.

We might want to shrink the default buffer size as well. 64k is pretty
huge. Java uses 8k by default, and Go uses 4k for reference.

r? @alexcrichton

9 years agoFix playpen links to not all be the same
Earl St Sauver [Mon, 12 Jan 2015 09:37:01 +0000 (01:37 -0800)]
Fix playpen links to not all be the same

Fixes #20732, that all links in some modules point to the same code
examples was reported. The ID's generated for documents in
librustdoc are not all unique, which means the code rendered as
text is not being properly selected.

This change removes the unique id generation and instead changes the
frontend code to grab the correct code sample by it's relative
position in the dom.

9 years agoauto merge of #21061 : japaric/rust/range, r=nick29581
bors [Wed, 14 Jan 2015 04:42:01 +0000 (04:42 +0000)]
auto merge of #21061 : japaric/rust/range, r=nick29581

9 years agoBump to ensure llvm is rebuilt
Richo Healey [Wed, 14 Jan 2015 03:03:31 +0000 (19:03 -0800)]
Bump to ensure llvm is rebuilt

9 years agoClean up conditions for clobbers
Richo Healey [Wed, 14 Jan 2015 03:01:37 +0000 (19:01 -0800)]
Clean up conditions for clobbers

9 years agoGeneralise pointer width tests using pointer_width
Richo Healey [Wed, 14 Jan 2015 02:59:45 +0000 (18:59 -0800)]
Generalise pointer width tests using pointer_width

9 years agoauto merge of #21018 : tomjakubowski/rust/rustdoc-where-xcrate, r=alexcrichton
bors [Wed, 14 Jan 2015 00:41:55 +0000 (00:41 +0000)]
auto merge of #21018 : tomjakubowski/rust/rustdoc-where-xcrate, r=alexcrichton

Various fixes for `rustdoc`, including showing where clauses
finally on re-exported items.

9 years agoAddress feedback
Brian Anderson [Tue, 13 Jan 2015 23:44:33 +0000 (15:44 -0800)]
Address feedback

9 years agoauto merge of #20957 : Ms2ger/rust/closures, r=alexcrichton
bors [Tue, 13 Jan 2015 21:29:00 +0000 (21:29 +0000)]
auto merge of #20957 : Ms2ger/rust/closures, r=alexcrichton

Returning the vectors directly makes the code a lot cleaner.

9 years agoauto merge of #20367 : retep998/rust/master, r=alexcrichton
bors [Tue, 13 Jan 2015 19:11:47 +0000 (19:11 +0000)]
auto merge of #20367 : retep998/rust/master, r=alexcrichton

Also adjusted some of the FFI definitions because apparently they don't use the long pointer prefix.
Gives a free performance boost because `SRWLock` is several times faster than `CriticalRegion` on every Windows system tested.
Fixes #19962

9 years agoauto merge of #20997 : nikomatsakis/rust/assoc-types-enum-field-access, r=nick29581
bors [Tue, 13 Jan 2015 14:21:39 +0000 (14:21 +0000)]
auto merge of #20997 : nikomatsakis/rust/assoc-types-enum-field-access, r=nick29581

Various fixes to enum field access. Builds on PR #20955.

r? @nick29581

9 years agoReplace usage of deriving with derive in docs
Greg Chapple [Tue, 6 Jan 2015 10:56:14 +0000 (10:56 +0000)]
Replace usage of deriving with derive in docs

9 years agoauto merge of #20963 : nick29581/rust/ast_map, r=eddyb
bors [Tue, 13 Jan 2015 11:56:31 +0000 (11:56 +0000)]
auto merge of #20963 : nick29581/rust/ast_map, r=eddyb

9 years agoFix test failures
Travis Watkins [Tue, 13 Jan 2015 11:43:30 +0000 (05:43 -0600)]
Fix test failures

9 years agoRewrite each_attr to return a vector.
Ms2ger [Sun, 11 Jan 2015 19:03:20 +0000 (20:03 +0100)]
Rewrite each_attr to return a vector.

9 years agoReturn the Vec from csearch::get_item_attrs.
Ms2ger [Sun, 11 Jan 2015 17:16:02 +0000 (18:16 +0100)]
Return the Vec from csearch::get_item_attrs.

Using a closure unnecessarily obfuscates the code.

9 years agoReturn the Vec from decoder::get_item_attrs.
Ms2ger [Sun, 11 Jan 2015 16:33:02 +0000 (17:33 +0100)]
Return the Vec from decoder::get_item_attrs.

Using a closure unnecessarily obfuscates the code.

9 years agoauto merge of #20960 : erickt/rust/fix-associated-types-debuginfo, r=michaelwoerister
bors [Tue, 13 Jan 2015 09:06:35 +0000 (09:06 +0000)]
auto merge of #20960 : erickt/rust/fix-associated-types-debuginfo, r=michaelwoerister

Closes #20797

9 years agostd: Deprecate `finally` module
Brian Anderson [Tue, 13 Jan 2015 08:27:28 +0000 (00:27 -0800)]
std: Deprecate `finally` module

No in-tree users. Ugly interface. Closes #14332.

9 years agoReturn passed value from black_box
Travis Watkins [Sat, 3 Jan 2015 08:49:42 +0000 (02:49 -0600)]
Return passed value from black_box

By returning the passed value black_box can be used on data being
passed to a function being benchmarked. This ensures the compiler
does not optimize the function for the input which could result in
the entire function being optimized away.

9 years agoauto merge of #20955 : nikomatsakis/rust/assoc-types-struct-field-access, r=nick29581
bors [Tue, 13 Jan 2015 05:01:34 +0000 (05:01 +0000)]
auto merge of #20955 : nikomatsakis/rust/assoc-types-struct-field-access, r=nick29581

Normalize the types of fields we project out of a struct or tuple struct.
Fixes #20954.

r? @nick29581

9 years agoInitialize memory for BufferedReader buffer
Steven Fackler [Tue, 13 Jan 2015 03:50:33 +0000 (19:50 -0800)]
Initialize memory for BufferedReader buffer

It's passed to the underlying reader, so uninitialized memory == sad
times.

We might want to shrink the default buffer size as well. 64k is pretty
huge. Java uses 8k by default, and Go uses 4k for reference.

9 years agoChange Mutex to use SRWLock on Windows.
Peter Atashian [Mon, 12 Jan 2015 22:50:39 +0000 (17:50 -0500)]
Change Mutex to use SRWLock on Windows.

Signed-off-by: Peter Atashian <retep998@gmail.com>
9 years agoauto merge of #20944 : brson/rust/weve-met-with-a-terrible-fate-havent-we, r=brson
bors [Tue, 13 Jan 2015 01:08:03 +0000 (01:08 +0000)]
auto merge of #20944 : brson/rust/weve-met-with-a-terrible-fate-havent-we, r=brson

Closes #13871

9 years agocleanup: `&foo[0..a]` -> `&foo[..a]`
Jorge Aparicio [Mon, 12 Jan 2015 21:59:18 +0000 (16:59 -0500)]
cleanup: `&foo[0..a]` -> `&foo[..a]`

9 years agoauto merge of #20896 : sfackler/rust/atomic-rename, r=alexcrichton
bors [Mon, 12 Jan 2015 22:56:20 +0000 (22:56 +0000)]
auto merge of #20896 : sfackler/rust/atomic-rename, r=alexcrichton

Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize

Closes #20893

[breaking-change]

9 years agoSome random things
Nick Cameron [Sun, 11 Jan 2015 05:45:59 +0000 (18:45 +1300)]
Some random things

9 years agoAdd view items to the ast map
Nick Cameron [Sun, 11 Jan 2015 09:45:34 +0000 (22:45 +1300)]
Add view items to the ast map

9 years agoauto merge of #20894 : swgillespie/rust/emacs-issue-20422, r=pnkfelix
bors [Mon, 12 Jan 2015 19:20:56 +0000 (19:20 +0000)]
auto merge of #20894 : swgillespie/rust/emacs-issue-20422, r=pnkfelix

rust-mode.el recently started highlighting keywords that were substrings of identifiers. Identifiers such as `xyz_type` would have `type` highlighted, which isn't normal. This patch re-introduces `_` as a word constituent, so that keywords following a `_` don't get syntax highlighted as keywords. Fixes issue #20422

9 years agorustdoc: Show type bindings on object types
Tom Jakubowski [Mon, 12 Jan 2015 17:43:24 +0000 (09:43 -0800)]
rustdoc: Show type bindings on object types

Fix #20299

9 years agoEase parsing of an English sentence
Lauri Lehmijoki [Sun, 11 Jan 2015 07:57:16 +0000 (09:57 +0200)]
Ease parsing of an English sentence

9 years agorustdoc: Remove traces of old closures
Tom Jakubowski [Mon, 12 Jan 2015 17:08:50 +0000 (09:08 -0800)]
rustdoc: Remove traces of old closures

9 years agorustdoc: Fix where clauses on re-exports
Tom Jakubowski [Sun, 11 Jan 2015 07:50:46 +0000 (23:50 -0800)]
rustdoc: Fix where clauses on re-exports

Projection predicates on re-exports, for the time being, are rendered as
equality predicates because that's easier. It would be nice to fix this
in the future.

Some gymnastics were needed to remove redundant bounds from the `types`
and `lifetimes` fields, remove implicit `Sized` bounds, and re-create
`?Sized` bounds.

Fix #20203, fix #20924, fix #20911, fix #20534

9 years agoSmall grammar fix in the book
Steve Klabnik [Mon, 12 Jan 2015 15:45:32 +0000 (10:45 -0500)]
Small grammar fix in the book

Fixes #20993

9 years agoauto merge of #20789 : nikomatsakis/rust/issue-20765-normalize-where-clause, r=nrc
bors [Mon, 12 Jan 2015 15:10:38 +0000 (15:10 +0000)]
auto merge of #20789 : nikomatsakis/rust/issue-20765-normalize-where-clause, r=nrc

Normalize bounds that we extract from where clauses. Fixes #20765.

r? @nick29581
cc @jroesch

9 years agoFix text in TRPL macros guide to match the example
Alexander Korolkov [Sun, 11 Jan 2015 21:51:25 +0000 (00:51 +0300)]
Fix text in TRPL macros guide to match the example

Also, update description of macro invocation syntax:
after https://github.com/rust-lang/rust/pull/20563 there is
a number of additional limitations on macro syntax.

9 years agoNormalize bounds that we extract from where clauses. Fixes #20765.
Niko Matsakis [Fri, 9 Jan 2015 02:41:42 +0000 (21:41 -0500)]
Normalize bounds that we extract from where clauses. Fixes #20765.

9 years agoUpdate #[deriving] documentation.
Huon Wilson [Mon, 12 Jan 2015 13:00:19 +0000 (00:00 +1100)]
Update #[deriving] documentation.

Syntax and a few fixed bugs etc.

9 years agoFix various oversights in enum field treatment in trans and typeck.
Niko Matsakis [Mon, 12 Jan 2015 09:59:59 +0000 (04:59 -0500)]
Fix various oversights in enum field treatment in trans and typeck.

Fixes #20996.

9 years agoRemove usage and reference of feature(globs) from the book
Cam Jackson [Mon, 12 Jan 2015 12:06:03 +0000 (23:06 +1100)]
Remove usage and reference of feature(globs) from the book

9 years agoauto merge of #20942 : nagisa/rust/shrl-impls, r=nikomatsakis
bors [Mon, 12 Jan 2015 11:05:30 +0000 (11:05 +0000)]
auto merge of #20942 : nagisa/rust/shrl-impls, r=nikomatsakis

This is only relevant to the code that uses generics such as

    fn magic<T: Shl>(a: T) { a << 10u8; }

r? @nikomatsakis

9 years agoPurge references to Rust tasks from TRPL.
Paul Crowley [Sat, 10 Jan 2015 09:45:51 +0000 (09:45 +0000)]
Purge references to Rust tasks from TRPL.

9 years agoauto merge of #19870 : mdinger/rust/align_error, r=nick29581
bors [Mon, 12 Jan 2015 08:55:22 +0000 (08:55 +0000)]
auto merge of #19870 : mdinger/rust/align_error, r=nick29581

#### Updated 1/12/2014

I updated the multi-line testcase to current but didn't modify the others. The spew code was broke by the `matches!` macro no longer working and I'm not interested in fixing the testcase.

I additionally added one testcase below.

Errors will in general look similar to below if the error is either `mismatched types` or a few other types. The rest are ignored.

---

#### Extra testcase:
```rust
pub trait Foo {
    type A;
    fn boo(&self) -> <Self as Foo>::A;
}

struct Bar;

impl Foo for i32 {
    type A = u32;
    fn boo(&self) -> u32 {
        42
    }
}

fn foo1<I: Foo<A=Bar>>(x: I) {
    let _: Bar = x.boo();
}

fn foo2<I: Foo>(x: I) {
    let _: Bar = x.boo();
}

pub fn baz(x: &Foo<A=Bar>) {
    let _: Bar = x.boo();
}

pub fn main() {
    let a = 42i32;
    foo1(a);
    baz(&a);
}
```

#### Multi-line output:
```cmd
$ ./rustc test3.rs
test3.rs:20:18: 20:25 error: mismatched types:
 expected `Bar`,
    found `<I as Foo>::A`
(expected struct `Bar`,
    found associated type)
test3.rs:20     let _: Bar = x.boo();
                             ^~~~~~~
test3.rs:31:5: 31:9 error: type mismatch resolving `<i32 as Foo>::A == Bar`:
 expected u32,
    found struct `Bar`
test3.rs:31     foo1(a);
                ^~~~
test3.rs:31:5: 31:9 note: required by `foo1`
test3.rs:31     foo1(a);
                ^~~~
test3.rs:32:9: 32:11 error: type mismatch resolving `<i32 as Foo>::A == Bar`:
 expected u32,
    found struct `Bar`
test3.rs:32     baz(&a);
                    ^~
test3.rs:32:9: 32:11 note: required for the cast to the object type `Foo`
test3.rs:32     baz(&a);
                    ^~
error: aborting due to 3 previous errors
```

---

This is a continuation of #19203 which I apparently broke by force pushing after it was closed. I'm attempting to add multi-line errors where they are largely beneficial - to help differentiate different types in compiler messages. As before, this is still a simple fix.

#### Testcase:
```rust
struct S;

fn test() -> Option<i32> {
    let s: S;

    s
}

fn test2() -> Option<i32> {
    Ok(7) // Should be Some(7)
}

impl Iterator for S {
    type Item = i32;
    fn next(&mut self) -> Result<i32, i32> { Ok(7) }
}

fn main(){
    test();
    test2();

}
```

---

#### Single-line playpen errors:
```cmd
<anon>:6:5: 6:6 error: mismatched types: expected `core::option::Option<int>`, found `S` (expected enum core::option::Option, found struct S)
<anon>:6     s
             ^
<anon>:10:5: 10:10 error: mismatched types: expected `core::option::Option<int>`, found `core::result::Result<_, _>` (expected enum core::option::Option, found enum core::result::Result)
<anon>:10     Ok(7) // Should be Some(7)
              ^~~~~
<anon>:14:5: 14:55 error: method `next` has an incompatible type for trait: expected enum core::option::Option, found enum core::result::Result [E0053]
<anon>:14     fn next(&mut self) -> Result<uint, uint> { Ok(7) }
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
playpen: application terminated with error code 101
```

---

#### Multi-line errors:
```cmd
$ ./rustc test.rs
test.rs:6:5: 6:6 error: mismatched types:
 expected `core::option::Option<i32>`,
    found `S`
(expected enum `core::option::Option`,
    found struct `S`)
test.rs:6     s
              ^
test.rs:10:5: 10:10 error: mismatched types:
 expected `core::option::Option<i32>`,
    found `core::result::Result<_, _>`
(expected enum `core::option::Option`,
    found enum `core::result::Result`)
test.rs:10     Ok(7) // Should be Some(7)
               ^~~~~
test.rs:15:5: 15:53 error: method `next` has an incompatible type for trait: expected enum `core::option::Option`, found enum `core::result::Result` [E0053]
test.rs:15     fn next(&mut self) -> Result<i32, i32> { Ok(7) }
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
```

---

#### Positive notes
* Vim worked fine with it: https://github.com/rust-lang/rust/pull/19203#issuecomment-66861668
* `make check` didn't find any errors
* Fixed *backtick* placement suggested by @p1start at https://github.com/rust-lang/rust/pull/19203#issuecomment-64062052

#### Negative notes
* Didn't check Emacs support but also wasn't provided a testcase...
* Needs to be tested with macro errors but I don't have a good testcase yet
* I would like to move the `E[0053]` earlier (see https://github.com/rust-lang/rust/issues/19464#issuecomment-65334301) but I don't know how
* It might be better to indent the types slightly like so (but I don't know how):
```cmd
test.rs:6:5: 6:6 error: mismatched types:
          expected `core::option::Option<int>`,
             found `S`
         (expected enum `core::option::Option`,
             found struct `S`)
test.rs:6     s
```
* Deep whitespace indentation may be a bad idea because early wrapping will cause misalignment between lines

#### Other
* I thought that compiler flags or something else (environment variables maybe) might be required because of comments against it but now that seems too much of a burden for users and for too little gain.
* There was concern that it will make large quantities of errors difficult to distinguish but I don't find that an issue. They both look awful and multi-line errors makes the types easier to understand.

---

#### Single lined spew:
```cmd
$ rustc test2.rs
test2.rs:161:9: 170:10 error: method `next` has an incompatible type for trait: expected enum core::option::Option, found enum core::result::Result [E0053]
test2.rs:161         fn next(&mut self) -> Result<&'a str, int> {
test2.rs:162             self.curr = self.next;
test2.rs:163
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
test2.rs:165                 self.next = if self.all.char_at(self.next) == '(' { close }
test2.rs:166                 else { open }
             ...
test2.rs:164:21: 164:31 error: mismatched types: expected `core::result::Result<uint, int>`, found `core::option::Option<_>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
                                 ^~~~~~~~~~
test2.rs:164:33: 164:44 error: mismatched types: expected `core::result::Result<uint, int>`, found `core::option::Option<_>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
                                             ^~~~~~~~~~~
test2.rs:169:40: 169:76 error: mismatched types: expected `core::result::Result<&'a str, int>`, found `core::option::Option<&str>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:169             if self.curr != self.len { Some(self.all[self.curr..self.next]) } else { None }
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test2.rs:169:86: 169:90 error: mismatched types: expected `core::result::Result<&'a str, int>`, found `core::option::Option<_>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:169             if self.curr != self.len { Some(self.all[self.curr..self.next]) } else { None }
                                                                                                  ^~~~
test2.rs:205:14: 205:18 error: mismatched types: expected `core::result::Result<uint, int>`, found `core::option::Option<uint>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:205             (open, close)
                          ^~~~
test2.rs:205:20: 205:25 error: mismatched types: expected `core::result::Result<uint, int>`, found `core::option::Option<uint>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:205             (open, close)
                                ^~~~~
test2.rs:210:21: 210:31 error: mismatched types: expected `core::result::Result<uint, int>`, found `core::option::Option<_>` (expected enum core::result::Result, found enum core::option::Option)
test2.rs:210             if let (Some(open), _) = Parens::find_parens(self.all, 0) {
                                 ^~~~~~~~~~
test2.rs:210:13: 212:28 error: mismatched types: expected `core::option::Option<&'a int>`, found `core::option::Option<&str>` (expected int, found str)
test2.rs:210             if let (Some(open), _) = Parens::find_parens(self.all, 0) {
test2.rs:211                 Some(self.all[0..open])
test2.rs:212             } else { None }
test2.rs:299:48: 299:58 error: mismatched types: expected `Box<translate::Entity>`, found `collections::vec::Vec<_>` (expected box, found struct collections::vec::Vec)
test2.rs:299         pub fn new() -> Entity { Entity::Group(Vec::new()) }
                                                            ^~~~~~~~~~
test2.rs:359:51: 359:58 error: type `&mut Box<translate::Entity>` does not implement any method in scope named `push`
test2.rs:359                 Entity::Group(ref mut vec) => vec.push(e),
                                                               ^~~~~~~
test2.rs:366:51: 366:85 error: type `&mut Box<translate::Entity>` does not implement any method in scope named `push`
test2.rs:366                 Entity::Group(ref mut vec) => vec.push(Entity::Inner(s.to_string())),
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 12 previous errors
```

---

#### Multi-line spew:

```cmd
$ ./rustc test2.rs
test2.rs:161:9: 170:10 error: method `next` has an incompatible type for trait:
 expected enum `core::option::Option`,
    found enum `core::result::Result` [E0053]
test2.rs:161         fn next(&mut self) -> Result<&'a str, int> {
test2.rs:162             self.curr = self.next;
test2.rs:163
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
test2.rs:165                 self.next = if self.all.char_at(self.next) == '(' { close }
test2.rs:166                 else { open }
             ...
test2.rs:164:21: 164:31 error: mismatched types:
 expected `core::result::Result<uint, int>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
                                 ^~~~~~~~~~
test2.rs:164:33: 164:44 error: mismatched types:
 expected `core::result::Result<uint, int>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:164             if let (Some(open), Some(close)) = Parens::find_parens(self.all, self.next) {
                                             ^~~~~~~~~~~
test2.rs:169:40: 169:76 error: mismatched types:
 expected `core::result::Result<&'a str, int>`,
    found `core::option::Option<&str>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:169             if self.curr != self.len { Some(self.all[self.curr..self.next]) } else { None }
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test2.rs:169:86: 169:90 error: mismatched types:
 expected `core::result::Result<&'a str, int>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:169             if self.curr != self.len { Some(self.all[self.curr..self.next]) } else { None }
                                                                                                  ^~~~
test2.rs:205:14: 205:18 error: mismatched types:
 expected `core::result::Result<uint, int>`,
    found `core::option::Option<uint>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:205             (open, close)
                          ^~~~
test2.rs:205:20: 205:25 error: mismatched types:
 expected `core::result::Result<uint, int>`,
    found `core::option::Option<uint>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:205             (open, close)
                                ^~~~~
test2.rs:210:21: 210:31 error: mismatched types:
 expected `core::result::Result<uint, int>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`)
test2.rs:210             if let (Some(open), _) = Parens::find_parens(self.all, 0) {
                                 ^~~~~~~~~~
test2.rs:210:13: 212:28 error: mismatched types:
 expected `core::option::Option<&'a int>`,
    found `core::option::Option<&str>`
(expected int,
    found str)
test2.rs:210             if let (Some(open), _) = Parens::find_parens(self.all, 0) {
test2.rs:211                 Some(self.all[0..open])
test2.rs:212             } else { None }
test2.rs:229:57: 229:96 error: the trait `core::ops::Fn<(char,), bool>` is not implemented for the type `|char| -> bool`
test2.rs:229                                              .map(|s| s.trim_chars(|c: char| c.is_whitespace()))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test2.rs:238:46: 239:75 error: type `core::str::CharSplits<'_, |char| -> bool>` does not implement any method in scope named `filter_map`
test2.rs:238                                             .filter_map(|s| if !s.is_empty() { Some(s.trim_chars('\'')) }
test2.rs:239                                                             else { None })
test2.rs:237:46: 237:91 error: the trait `core::ops::Fn<(char,), bool>` is not implemented for the type `|char| -> bool`
test2.rs:237                 let vec: Vec<&str> = value[].split(|c: char| matches!(c, '(' | ')' | ','))
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test2.rs:238:65: 238:77 error: the type of this value must be known in this context
test2.rs:238                                             .filter_map(|s| if !s.is_empty() { Some(s.trim_chars('\'')) }
                                                                             ^~~~~~~~~~~~
test2.rs:299:48: 299:58 error: mismatched types:
 expected `Box<translate::Entity>`,
    found `collections::vec::Vec<_>`
(expected box,
    found struct `collections::vec::Vec`)
test2.rs:299         pub fn new() -> Entity { Entity::Group(Vec::new()) }
                                                            ^~~~~~~~~~
test2.rs:321:36: 322:65 error: type `core::str::CharSplits<'_, |char| -> bool>` does not implement any method in scope named `filter_map`
test2.rs:321                                   .filter_map(|s| if !s.is_empty() { Some(s.trim_chars('\'')) }
test2.rs:322                                                   else { None })
test2.rs:320:36: 320:81 error: the trait `core::ops::Fn<(char,), bool>` is not implemented for the type `|char| -> bool`
test2.rs:320             let vec: Vec<&str> = s.split(|c: char| matches!(c, '(' | ')' | ','))
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test2.rs:321:55: 321:67 error: the type of this value must be known in this context
test2.rs:321                                   .filter_map(|s| if !s.is_empty() { Some(s.trim_chars('\'')) }
                                                                   ^~~~~~~~~~~~
test2.rs:359:51: 359:58 error: type `&mut Box<translate::Entity>` does not implement any method in scope named `push`
test2.rs:359                 Entity::Group(ref mut vec) => vec.push(e),
                                                               ^~~~~~~
test2.rs:366:51: 366:85 error: type `&mut Box<translate::Entity>` does not implement any method in scope named `push`
test2.rs:366                 Entity::Group(ref mut vec) => vec.push(Entity::Inner(s.to_string())),
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 24 previous errors
```

Closes #18946 #19464
cc @P1start @jakub- @tomjakubowski @kballard @chris-morgan

9 years agoiOS: fixed install phase
Valerii Hiora [Wed, 25 Jun 2014 12:33:49 +0000 (15:33 +0300)]
iOS: fixed install phase

It was broken as tried to copy dylibs which are actually never been
built for iOS

9 years agoauto merge of #20917 : nick29581/rust/plugins, r=huonw
bors [Mon, 12 Jan 2015 06:50:21 +0000 (06:50 +0000)]
auto merge of #20917 : nick29581/rust/plugins, r=huonw

9 years agoFix testsuite errors
mdinger [Mon, 12 Jan 2015 06:01:44 +0000 (01:01 -0500)]
Fix testsuite errors

9 years agoImplement multi-line errors
mdinger [Mon, 12 Jan 2015 04:18:52 +0000 (23:18 -0500)]
Implement multi-line errors

9 years agoBacktick nits
mdinger [Wed, 7 Jan 2015 02:27:21 +0000 (21:27 -0500)]
Backtick nits

9 years agorustc_trans: Fix type projection debuginfo
Erick Tryzelaar [Mon, 12 Jan 2015 05:39:03 +0000 (21:39 -0800)]
rustc_trans: Fix type projection debuginfo

Closes #20797

9 years agopowerpc: Fix extraneous include in rt support
Richo Healey [Sun, 11 Jan 2015 04:35:22 +0000 (20:35 -0800)]
powerpc: Fix extraneous include in rt support

9 years agopowerpc: Fix missing include in cabi_powerpc
Richo Healey [Sun, 11 Jan 2015 04:35:10 +0000 (20:35 -0800)]
powerpc: Fix missing include in cabi_powerpc

9 years agopowerpc: definition support for libc
Richo Healey [Sat, 10 Jan 2015 05:38:14 +0000 (21:38 -0800)]
powerpc: definition support for libc

9 years agopowerpc: rough platform support
Richo Healey [Sat, 10 Jan 2015 04:38:53 +0000 (20:38 -0800)]
powerpc: rough platform support

9 years agopowerpc: pthread support
Richo Healey [Sat, 10 Jan 2015 04:33:29 +0000 (20:33 -0800)]
powerpc: pthread support

9 years agopowerpc: Fixup more stack work
Richo Healey [Sat, 10 Jan 2015 04:28:48 +0000 (20:28 -0800)]
powerpc: Fixup more stack work

9 years agopowerpc: add cdefs for linux
Richo Healey [Sat, 10 Jan 2015 04:27:46 +0000 (20:27 -0800)]
powerpc: add cdefs for linux

This borrowed entirely from the mips definitions, and should be
revisited after it lands while testing.

9 years agopowerpc: Janky segmented stack support
Richo Healey [Sat, 10 Jan 2015 04:26:10 +0000 (20:26 -0800)]
powerpc: Janky segmented stack support

9 years agopowerpc: Add unwinder size REVISIT
Richo Healey [Sat, 10 Jan 2015 04:20:57 +0000 (20:20 -0800)]
powerpc: Add unwinder size REVISIT

9 years agopowerpc: Add libstd utils
Richo Healey [Sat, 10 Jan 2015 04:20:15 +0000 (20:20 -0800)]
powerpc: Add libstd utils

9 years agopowerpc: Teach trans about powerpc
Richo Healey [Sat, 10 Jan 2015 04:13:23 +0000 (20:13 -0800)]
powerpc: Teach trans about powerpc

9 years agopowerpc: initialize llvm
Richo Healey [Sat, 10 Jan 2015 04:03:37 +0000 (20:03 -0800)]
powerpc: initialize llvm

9 years agopowerpc: Add backend support for powerpc
Richo Healey [Sat, 10 Jan 2015 04:00:29 +0000 (20:00 -0800)]
powerpc: Add backend support for powerpc

9 years agopowerpc: Tell liballoc about power alignment
Richo Healey [Sat, 10 Jan 2015 03:54:55 +0000 (19:54 -0800)]
powerpc: Tell liballoc about power alignment

9 years agopowerpc: Document the existance of powerpc
Richo Healey [Sat, 10 Jan 2015 03:53:47 +0000 (19:53 -0800)]
powerpc: Document the existance of powerpc

9 years agopowerpc: Use toolchain assembler on power
Richo Healey [Sat, 10 Jan 2015 03:52:58 +0000 (19:52 -0800)]
powerpc: Use toolchain assembler on power

9 years agopowerpc: Build llvm for powerpc
Richo Healey [Sat, 10 Jan 2015 03:52:18 +0000 (19:52 -0800)]
powerpc: Build llvm for powerpc

9 years agopowerpc: Add platform configuration
Richo Healey [Sat, 10 Jan 2015 03:51:51 +0000 (19:51 -0800)]
powerpc: Add platform configuration

9 years agopowerpc: Add support to configure
Richo Healey [Sat, 10 Jan 2015 03:49:54 +0000 (19:49 -0800)]
powerpc: Add support to configure

9 years agoauto merge of #20889 : Manishearth/rust/trait-error, r=nikomatsakis
bors [Mon, 12 Jan 2015 04:45:18 +0000 (04:45 +0000)]
auto merge of #20889 : Manishearth/rust/trait-error, r=nikomatsakis

fixes #20783

r? @nikomatsakis

9 years agoRemove unused import.
Joseph Crail [Mon, 12 Jan 2015 04:08:26 +0000 (23:08 -0500)]
Remove unused import.

9 years agoauto merge of #20897 : barosl/rust/no-type-for-node-ice, r=nick29581
bors [Mon, 12 Jan 2015 02:40:20 +0000 (02:40 +0000)]
auto merge of #20897 : barosl/rust/no-type-for-node-ice, r=nick29581

If the type of a node cannot be determined due to a previous type error, a `no type for node` ICE occurs. This commit makes it return `ty_err` instead in such a case.

Fixes #20401.
Fixes #20506.
Fixes #20614.
Fixes #20752.
Fixes #20829.
Fixes #20846.
Fixes #20885.
Fixes #20886.
Fixes #20952.
Fixes #20970.

9 years agoReplace uint with u32 in trpl/guessing-game.md
CarVac [Sat, 10 Jan 2015 19:14:21 +0000 (14:14 -0500)]
Replace uint with u32 in trpl/guessing-game.md

uint was recently deprecated, so in following the use of i32 at first,
replace all references to uint with u32.

Also change literals from e.g. 100u to 100, so that they are no longer
usize.

9 years agoMerge pull request #20968 from estsauver/20762
bors [Mon, 12 Jan 2015 00:21:32 +0000 (00:21 +0000)]
Merge pull request #20968 from estsauver/20762

Fix sentence fragment in librustc README

Reviewed-by: alexcrichton
9 years agoMerge pull request #20966 from Valloric/ownership-fix
bors [Mon, 12 Jan 2015 00:21:31 +0000 (00:21 +0000)]
Merge pull request #20966 from Valloric/ownership-fix

Fixing integer usage in ownership doc

Reviewed-by: steveklabnik
9 years agoMerge pull request #20956 from angst7/docfixes1
bors [Mon, 12 Jan 2015 00:21:31 +0000 (00:21 +0000)]
Merge pull request #20956 from angst7/docfixes1

replace deprecated uint references with u32 in trpl/looping.md

Reviewed-by: Gankro
9 years agoMerge pull request #20934 from tomjakubowski/patch-1
bors [Mon, 12 Jan 2015 00:21:30 +0000 (00:21 +0000)]
Merge pull request #20934 from tomjakubowski/patch-1

Escape a leading # in a doc comment

Reviewed-by: eddyb
9 years agoMerge pull request #20933 from gifnksm/patch-1
bors [Mon, 12 Jan 2015 00:21:30 +0000 (00:21 +0000)]
Merge pull request #20933 from gifnksm/patch-1

TRPL: `cargo build` doesn't run executables

Reviewed-by: alexcrichton
9 years agoMerge pull request #20930 from charmeleon/master
bors [Mon, 12 Jan 2015 00:21:29 +0000 (00:21 +0000)]
Merge pull request #20930 from charmeleon/master

Switching out range(0,10) example to 0..10. Tests fine

Reviewed-by: brson
9 years agoMerge pull request #20926 from xnil/patch-1
bors [Mon, 12 Jan 2015 00:21:29 +0000 (00:21 +0000)]
Merge pull request #20926 from xnil/patch-1

Hepburn romanization of さようなら

Reviewed-by: huonw