]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAuto merge of #38920 - petrochenkov:selfimpl, r=eddyb
bors [Wed, 25 Jan 2017 23:08:56 +0000 (23:08 +0000)]
Auto merge of #38920 - petrochenkov:selfimpl, r=eddyb

Partially implement RFC 1647 (`Self` in impl headers)

The name resolution part is easy, but the typeck part contains an unexpected problem.

It turns out that `Self` type *depends* on bounds and `where` clauses, so we need to convert them first to determine what the `Self` type is! If bounds/`where` clauses can refer to `Self` then we have a cyclic dependency.
This is required to support impls like this:
```
// Found in libcollections
impl<I: IntoIterator> SpecExtend<I> for LinkedList<I::Item> { .... }
                                                      ^^^^^ associated type `Item` is found using information from bounds

```
I'm not yet sure how to resolve this issue.
One possible solution (that feels hacky) is to make two passes over generics - first collect predicates ignoring everything involving `Self`, then determine `Self`, then collect predicates again without ignoring anything. (Some kind of lazy on-demand checking or something looks like a proper solution.)

This patch in its current state doesn't solve the problem with `Self` in bounds, so the only observable things it does is improving error messages and supporting `impl Trait<Self> for Type {}`.

There's also a question about feature gating. It's non-trivial to *detect* "newly resolved" `Self`s to feature gate them, but it's simple to *enable* the new resolution behavior when the feature gate is already specified. Alternatively this can be considered a bug fix and merged without a feature gate.

cc https://github.com/rust-lang/rust/issues/38864
r? @nikomatsakis
cc @eddyb
Whitespace ignoring diff https://github.com/rust-lang/rust/pull/38920/files?w=1

7 years agoAuto merge of #38856 - zackw:process-envs, r=aturon
bors [Wed, 25 Jan 2017 20:24:02 +0000 (20:24 +0000)]
Auto merge of #38856 - zackw:process-envs, r=aturon

Add std::process::Command::envs()

`Command::envs()` adds a vector of key-value pairs to the child
process environment all at once.  Suggested in #38526.

This is not fully baked and frankly I'm not sure it even _works_, but I need some help finishing it up, and this is the simplest way to show you what I've got.  The problems I know exist and don't know how to solve, from most to least important, are:

* [ ] I don't know if the type signature of the new function is correct.
* [x] The new test might not be getting run.  I didn't see it go by in the output of `x.py test src/libstd --stage 1`.
* [x] The tidy check says ``process.rs:402: different `since` than before`` which I don't know what it means.

r? @brson

7 years agoAuto merge of #39296 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Wed, 25 Jan 2017 17:23:54 +0000 (17:23 +0000)]
Auto merge of #39296 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 6 pull requests

- Successful merges: #38930, #39212, #39251, #39267, #39276, #39278
- Failed merges:

7 years agoRollup merge of #39278 - das-g:patch-1, r=steveklabnik
Guillaume Gomez [Wed, 25 Jan 2017 16:08:20 +0000 (17:08 +0100)]
Rollup merge of #39278 - das-g:patch-1, r=steveklabnik

fix book: refer to `add_two` as "tested function"

refer to `add_two` as "tested function" rather than "test function", which would be `it_works`

7 years agoRollup merge of #39276 - GuillaumeGomez:array_urls, r=frewsxcv
Guillaume Gomez [Wed, 25 Jan 2017 16:08:19 +0000 (17:08 +0100)]
Rollup merge of #39276 - GuillaumeGomez:array_urls, r=frewsxcv

Add missing urls for array docs

r? @frewsxcv

7 years agoRollup merge of #39267 - king6cong:master, r=steveklabnik
Guillaume Gomez [Wed, 25 Jan 2017 16:08:18 +0000 (17:08 +0100)]
Rollup merge of #39267 - king6cong:master, r=steveklabnik

doc comment rewording

7 years agoRollup merge of #39251 - wesleywiser:fixme_1, r=BurntSushi
Guillaume Gomez [Wed, 25 Jan 2017 16:08:17 +0000 (17:08 +0100)]
Rollup merge of #39251 - wesleywiser:fixme_1, r=BurntSushi

Remove a FIXME in core/hash tests

Removes a FIXME

7 years agoRollup merge of #39212 - redox-os:master, r=brson
Guillaume Gomez [Wed, 25 Jan 2017 16:08:16 +0000 (17:08 +0100)]
Rollup merge of #39212 - redox-os:master, r=brson

Use libc errno in Redox submodule

This fixes https://github.com/redox-os/redox/issues/830, and is necessary when using libc in Redox

7 years agoRollup merge of #38930 - insaneinside:place-left-arrow-syntax-docs, r=brson
Guillaume Gomez [Wed, 25 Jan 2017 16:08:14 +0000 (17:08 +0100)]
Rollup merge of #38930 - insaneinside:place-left-arrow-syntax-docs, r=brson

Updates to src/libcore/ops.rs docs for RFC#1228 (Placement Left Arrow)

Also fixed a minor typo in docs for `core::ops::Place`.

7 years agoAuto merge of #39286 - nrc:save-path, r=eddyb
bors [Wed, 25 Jan 2017 11:59:18 +0000 (11:59 +0000)]
Auto merge of #39286 - nrc:save-path, r=eddyb

save-analysis: polishing paths

a couple of minor changes that get us better coverage of different paths.

r? @eddyb

7 years agoAuto merge of #39277 - tedsta:fuchsia_std_process, r=alexcrichton
bors [Wed, 25 Jan 2017 06:32:31 +0000 (06:32 +0000)]
Auto merge of #39277 - tedsta:fuchsia_std_process, r=alexcrichton

Update Fuchsia support for std::process.

- Adds support for try_wait.
- Miscellaneous updates to keep up with Magenta changes.

I'll begin `sys/fuchsia` soon, just been bogged down with my actual job lately (I'm not on the Fuchsia team).

7 years agosave-analysis: walk paths
Nick Cameron [Wed, 25 Jan 2017 04:00:19 +0000 (17:00 +1300)]
save-analysis: walk paths

Catches generic types in paths

7 years agosave-analysis: walk path expressions
Nick Cameron [Wed, 25 Jan 2017 03:46:34 +0000 (16:46 +1300)]
save-analysis: walk path expressions

This is actually kinda hard to hit, but it fixes missing the `foo` in `for _ in foo {}`.

7 years agoAuto merge of #35712 - oli-obk:exclusive_range_patterns, r=nikomatsakis
bors [Wed, 25 Jan 2017 02:17:33 +0000 (02:17 +0000)]
Auto merge of #35712 - oli-obk:exclusive_range_patterns, r=nikomatsakis

exclusive range patterns

adds `..` patterns to the language under a feature gate (`exclusive_range_pattern`).

This allows turning

``` rust
match i {
    0...9 => {},
    10...19 => {},
    20...29 => {},
    _ => {}
}
```

into

``` rust
match i {
    0..10 => {},
    10..20 => {},
    20..30 => {},
    _ => {}
}
```

7 years agoAuto merge of #39245 - alexcrichton:enable-platform, r=brson
bors [Tue, 24 Jan 2017 23:34:35 +0000 (23:34 +0000)]
Auto merge of #39245 - alexcrichton:enable-platform, r=brson

rustbuild: Start building --enable-extended

This commit adds a new flag to the configure script,
`--enable-extended`, which is intended for specifying a desire to
compile the full suite of Rust tools such as Cargo, the RLS, etc. This
is also an indication that the build system should create combined
installers such as the pkg/exe/msi artifacts.

Currently the `--enable-extended` flag just indicates that combined
installers should be built, and Cargo is itself not compiled just yet
but rather only downloaded from its location. The intention here is to
quickly get to feature parity with the current release process and then
we can start improving it afterwards.

All new files in this PR inside `src/etc/installer` are copied from the
rust-packaging repository.

cc #38531

7 years agorustbuild: Start building --enable-extended
Alex Crichton [Sat, 21 Jan 2017 01:03:06 +0000 (17:03 -0800)]
rustbuild: Start building --enable-extended

This commit adds a new flag to the configure script,
`--enable-extended`, which is intended for specifying a desire to
compile the full suite of Rust tools such as Cargo, the RLS, etc. This
is also an indication that the build system should create combined
installers such as the pkg/exe/msi artifacts.

Currently the `--enable-extended` flag just indicates that combined
installers should be built, and Cargo is itself not compiled just yet
but rather only downloaded from its location. The intention here is to
quickly get to feature parity with the current release process and then
we can start improving it afterwards.

All new files in this PR inside `src/etc/installer` are copied from the
rust-packaging repository.

7 years agofix mailmap
Steve Klabnik [Tue, 24 Jan 2017 22:22:00 +0000 (17:22 -0500)]
fix mailmap

7 years agofix book: refer to `add_two` as "tested function"
Raphael Das Gupta [Tue, 24 Jan 2017 21:44:41 +0000 (22:44 +0100)]
fix book: refer to `add_two` as "tested function"

rather than "test function", which would be `it_works`

7 years agoUpdated Fuchsia support for std::process. Adds support for try_wait. Misc. updates...
Theodore DeRego [Tue, 24 Jan 2017 21:01:47 +0000 (13:01 -0800)]
Updated Fuchsia support for std::process. Adds support for try_wait. Misc. updates to reflect changes in Magenta

7 years agoAdd missing urls for array docs
Guillaume Gomez [Tue, 24 Jan 2017 20:16:41 +0000 (21:16 +0100)]
Add missing urls for array docs

7 years agoAuto merge of #39222 - GuillaumeGomez:rustdoc_where, r=frewsxcv,steveklabnik,alexcric...
bors [Tue, 24 Jan 2017 15:26:20 +0000 (15:26 +0000)]
Auto merge of #39222 - GuillaumeGomez:rustdoc_where, r=frewsxcv,steveklabnik,alexcrichton,nrc

Force backline on all where in docs

Pictures are better than words in this case:

Before:

<img width="1440" alt="screen shot 2017-01-21 at 15 34 27" src="https://cloud.githubusercontent.com/assets/3050060/22175139/6e7c75d8-dfef-11e6-9904-023d63e609d2.png">

After:

<img width="1440" alt="screen shot 2017-01-21 at 15 34 32" src="https://cloud.githubusercontent.com/assets/3050060/22175140/75cc3846-dfef-11e6-9799-fffb213653e4.png">

r? @steveklabnik

cc @rust-lang/docs

7 years agoAuto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakis
bors [Tue, 24 Jan 2017 11:51:34 +0000 (11:51 +0000)]
Auto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakis

Fix multiple labels when some don't have message

The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ----^^^^^^^----
  |   |   |
  |   |   `b` is a good letter
  |
```

to

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ----^^^^^^^----
  |       |
  |       `b` is a good letter
```

from

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^
  |   |   |
  |   |
  |   `a` is a good letter
```

to

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^ `a` is a good letter
```

and from

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^
  |   |   |
  |   |
  |
```

to

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^
```
r? @nikomatsakis
cc @jonathandturner, @GuillaumeGomez, @nrc

7 years agodoc typo fix
king6cong [Tue, 24 Jan 2017 09:35:19 +0000 (17:35 +0800)]
doc typo fix

7 years agoAuto merge of #39173 - jseyfried:tokenstream, r=nrc
bors [Tue, 24 Jan 2017 09:29:18 +0000 (09:29 +0000)]
Auto merge of #39173 - jseyfried:tokenstream, r=nrc

Refactor `TokenStream`

r? @nrc

7 years agodoc comment rewording
king6cong [Tue, 24 Jan 2017 08:42:00 +0000 (16:42 +0800)]
doc comment rewording

7 years agoAuto merge of #39145 - nrc:opt-cfg-mod, r=@jseyfried
bors [Tue, 24 Jan 2017 06:57:29 +0000 (06:57 +0000)]
Auto merge of #39145 - nrc:opt-cfg-mod, r=@jseyfried

Add an option to the parser so cfg'ed out modules can still be parsed

r? @jseyfried

cc @dtolnay, @erickt it would be great if we could get this picked up into Syntex asap - it fixes a pretty nasty bug in Rustfmt.

7 years agoAuto merge of #39227 - alexcrichton:enable-i686-musl, r=brson
bors [Tue, 24 Jan 2017 03:43:22 +0000 (03:43 +0000)]
Auto merge of #39227 - alexcrichton:enable-i686-musl, r=brson

travis: Enable testing i686 musl

This fixes the final issues with the target related to unwinding by disabling
removal of frame pointers.

7 years agoAuto merge of #39048 - lambda:impl-tosocketaddrs-for-string, r=alexcrichton
bors [Tue, 24 Jan 2017 01:17:09 +0000 (01:17 +0000)]
Auto merge of #39048 - lambda:impl-tosocketaddrs-for-string, r=alexcrichton

impl ToSocketAddrs for String

`ToSocketAddrs` is implemented for a number of different types,
including `(IpAddr, u16)`, `&str`, and various others, for the
convenience of being able to run things like
`TcpListener::bind("10.11.12.13:1415")`.  However, because this is a
generic parameter with a trait bound, if you have a `String` you cannot
pass it in, either directly as `TcpListener::bind(string)`, or the
`TcpListener::bind(&string)` as you might expect due to deref coercion;
you have to use `TcpListener::bind(&*string)`, which is noisy and hard
to discover (though #39029 suggests better error messages to make it
more discoverable).

Rather than making people stumble over this, just implement
`ToSocketAddrs` for `String`.

7 years agoAuto merge of #39260 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 23 Jan 2017 22:38:33 +0000 (22:38 +0000)]
Auto merge of #39260 - steveklabnik:rollup, r=steveklabnik

Rollup of 7 pull requests

- Successful merges: #38794, #38956, #38993, #39191, #39200, #39233, #39258
- Failed merges:

7 years agoRollup merge of #39258 - jacwah:makefile-note, r=aturon
Steve Klabnik [Mon, 23 Jan 2017 21:40:53 +0000 (16:40 -0500)]
Rollup merge of #39258 - jacwah:makefile-note, r=aturon

build: Mention rustbuild in Makefile.in comments

I think this patch will help newcomers like myself with the build system. I didn't understand that the make targets listed in the Makefile.in comments only worked with the old system, until it was pointed out to me in #39256.

7 years agoRollup merge of #39233 - frewsxcv:upper-lower-docs, r=GuillaumeGomez
Steve Klabnik [Mon, 23 Jan 2017 21:40:52 +0000 (16:40 -0500)]
Rollup merge of #39233 - frewsxcv:upper-lower-docs, r=GuillaumeGomez

Add more references between lowercase/uppercase operations.

None

7 years agoRollup merge of #39200 - DirkyJerky:patch-1, r=steveklabnik
Steve Klabnik [Mon, 23 Jan 2017 21:40:50 +0000 (16:40 -0500)]
Rollup merge of #39200 - DirkyJerky:patch-1, r=steveklabnik

Docs for atomic orderings: link to the 'nomicon article for further reading

7 years agoRollup merge of #39191 - cesarb:book/trait-objects-vtable-size-and-align, r=steveklabnik
Steve Klabnik [Mon, 23 Jan 2017 21:40:49 +0000 (16:40 -0500)]
Rollup merge of #39191 - cesarb:book/trait-objects-vtable-size-and-align, r=steveklabnik

book: size and align in trait object vtables are used

The book currently claims that the `size` and `align` fields in the
trait object vtable are not used, but this is false. These two fields
are used by the stable `mem::size_of_val` and `mem::align_of_val`
functions.

See the `ty::TyDynamic` case of the `glue::size_and_align_of_dst`
function in librustc_trans, which is used to implement both intrinsics
in the unsized case.

r? @steveklabnik

7 years agoRollup merge of #38993 - krdln:patch-1, r=steveklabnik
Steve Klabnik [Mon, 23 Jan 2017 21:40:48 +0000 (16:40 -0500)]
Rollup merge of #38993 - krdln:patch-1, r=steveklabnik

Add `&mut expr` to syntax index

7 years agoRollup merge of #38956 - theduke:document-field-init-shorthand-38830, r=steveklabnik
Steve Klabnik [Mon, 23 Jan 2017 21:40:47 +0000 (16:40 -0500)]
Rollup merge of #38956 - theduke:document-field-init-shorthand-38830, r=steveklabnik

Update struct_expr grammar for field init shorthand.

Part of the work for #38830 .

r? @steveklabnik

7 years agoRollup merge of #38794 - ConnyOnny:master, r=steveklabnik
Steve Klabnik [Mon, 23 Jan 2017 21:40:46 +0000 (16:40 -0500)]
Rollup merge of #38794 - ConnyOnny:master, r=steveklabnik

book: match enum warning

Matching enums with named fields in the previous way yielded the "non_shorthand_field_patterns" warning.
The new code shows the shorthand syntax as well as field renaming, so it should be exhaustive ;-)

7 years agoAdd an option to the parser so cfg'ed out modules can still be parsed
Nick Cameron [Wed, 18 Jan 2017 00:13:36 +0000 (13:13 +1300)]
Add an option to the parser so cfg'ed out modules can still be parsed

7 years agobuild: Link to new build sys from Makefile.in
Jacob Wahlgren [Mon, 23 Jan 2017 18:56:48 +0000 (19:56 +0100)]
build: Link to new build sys from Makefile.in

7 years agoRemove `open_span` and `close_span` from `Delimited`.
Jeffrey Seyfried [Mon, 23 Jan 2017 04:58:15 +0000 (04:58 +0000)]
Remove `open_span` and `close_span` from `Delimited`.

7 years agoAuto merge of #39248 - Wilfred:patch-1, r=frewsxcv
bors [Mon, 23 Jan 2017 05:05:51 +0000 (05:05 +0000)]
Auto merge of #39248 - Wilfred:patch-1, r=frewsxcv

Adding missing URL to release notes

7 years agoRemove a FIXME in core/hash tests
Wesley Wiser [Mon, 23 Jan 2017 03:35:27 +0000 (22:35 -0500)]
Remove a FIXME in core/hash tests

7 years agoAuto merge of #39242 - Eijebong:typo_fix, r=apasel422
bors [Mon, 23 Jan 2017 02:53:57 +0000 (02:53 +0000)]
Auto merge of #39242 - Eijebong:typo_fix, r=apasel422

Fix minor typo

7 years agoAuto merge of #39247 - est31:master, r=jseyfried
bors [Mon, 23 Jan 2017 00:36:00 +0000 (00:36 +0000)]
Auto merge of #39247 - est31:master, r=jseyfried

Remove proc_macro from the tidy whitelist again

PR #38842 has exposed that we were missing the src/test/compile-fail-fulldeps
directory in the search for feature gate tests. Because the detection didn't
work despite the effort to name the test appropriately and add a correct
"// gate-test-proc_macro" comment, proc_macro was added to the whitelist.

We fix this little weakness in the feature gate tidy check and add
the src/test/compile-fail-fulldeps directory to the checked directories.

Part of issue #39059 .

7 years agoAdding missing URL to release notes
Wilfred Hughes [Sun, 22 Jan 2017 23:26:45 +0000 (23:26 +0000)]
Adding missing URL to release notes

7 years agoRemove proc_macro from the tidy whitelist again
est31 [Sun, 22 Jan 2017 22:05:51 +0000 (23:05 +0100)]
Remove proc_macro from the tidy whitelist again

PR #38842 has exposed that we were missing the src/test/compile-fail-fulldeps
directory in the search for feature gate tests. Because the detection didn't
work despite the effort to name the test appropriately and add a correct
"// gate-test-proc_macro" comment, proc_macro was added to the whitelist.

We fix this little weakness in the feature gate tidy check and add
the src/test/compile-fail-fulldeps directory to the checked directories.

7 years agoAuto merge of #39238 - king6cong:pr, r=frewsxcv
bors [Sun, 22 Jan 2017 22:20:12 +0000 (22:20 +0000)]
Auto merge of #39238 - king6cong:pr, r=frewsxcv

better comment wording

7 years agoRemove crate `proc_macro_tokens`.
Jeffrey Seyfried [Sun, 22 Jan 2017 09:09:33 +0000 (09:09 +0000)]
Remove crate `proc_macro_tokens`.

7 years agoRefactor `TokenStream`.
Jeffrey Seyfried [Wed, 18 Jan 2017 03:27:09 +0000 (03:27 +0000)]
Refactor `TokenStream`.

7 years agoAuto merge of #39243 - cseale:issue_30924, r=est31
bors [Sun, 22 Jan 2017 19:12:59 +0000 (19:12 +0000)]
Auto merge of #39243 - cseale:issue_30924, r=est31

[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31

7 years agotravis: Enable testing i686 musl
Alex Crichton [Fri, 20 Jan 2017 23:32:47 +0000 (15:32 -0800)]
travis: Enable testing i686 musl

This fixes the final issues with the target related to unwinding by disabling
removal of frame pointers.

7 years ago[Gate Tests] - marking feature tests
Colm Seale [Sun, 22 Jan 2017 16:35:15 +0000 (16:35 +0000)]
[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31

7 years agoAuto merge of #38648 - utkarshkukreti:question-mark-in-libstd-documentation-examples...
bors [Sun, 22 Jan 2017 16:55:16 +0000 (16:55 +0000)]
Auto merge of #38648 - utkarshkukreti:question-mark-in-libstd-documentation-examples, r=pnkfelix,steveklabnik,frewsxcvx

libstd: replace all `try!` with `?` in documentation examples

See #38644.

For the record, I used the following Perl one-liner and then manually fixed a couple of things it got wrong:

    $ perl -p -i -e 's#(///.*)try!\((.*)\)#$1$2?#' src/libstd/**/*.rs

7 years agoFix minor typo
Eijebong [Sun, 22 Jan 2017 16:27:29 +0000 (17:27 +0100)]
Fix minor typo

7 years agolibstd: mention `?` operator instead of removing `try!` macro reference
Utkarsh Kukreti [Thu, 29 Dec 2016 08:42:14 +0000 (14:12 +0530)]
libstd: mention `?` operator instead of removing `try!` macro reference

7 years agolibstd: update std::io module documentation to not mention `try!`
Utkarsh Kukreti [Wed, 28 Dec 2016 09:09:41 +0000 (14:39 +0530)]
libstd: update std::io module documentation to not mention `try!`

We're not using it in the examples anymore.

7 years agolibstd: replace all `try!` with `?` in documentation examples
Utkarsh Kukreti [Wed, 28 Dec 2016 09:02:35 +0000 (14:32 +0530)]
libstd: replace all `try!` with `?` in documentation examples

See #38644.

7 years agoAuto merge of #38108 - linclark:32777-E0328, r=GuillaumeGomez
bors [Sun, 22 Jan 2017 14:38:04 +0000 (14:38 +0000)]
Auto merge of #38108 - linclark:32777-E0328, r=GuillaumeGomez

Add error explanation for E0328.

This PR adds an explanation for an error in the list in #32777.

I haven't used this feature myself, so I was piecing it together from the docs. Please let me know if any changes in wording should be made.

One problem: When I followed the instructions in CONTRIBUTING.md, it said to run `make check-stage1` before posting the PR. This reported failures, but they seemed to be intermittent. I got different numbers of failures on each run. Here's the output for the last run

```
failures:

---- [run-make] run-make/rustc-macro-dep-files stdout ----

error: make failed
status: exit code: 2
command: "make"
stdout:
------------------------------------------
DYLD_LIBRARY_PATH="/Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin:/Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/lib:" '/Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/bin/rustc' --out-dir /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin -L /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin  foo.rs
DYLD_LIBRARY_PATH="/Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin:/Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/lib:" '/Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/bin/rustc' --out-dir /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin -L /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin  bar.rs --emit dep-info

------------------------------------------
stderr:
------------------------------------------
dyld: lazy symbol binding failed: Symbol not found: __ZN4core3fmt5write17h2f7663117dd4fb40E
  Referenced from: /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin/libfoo.dylib
  Expected in: /Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/lib/libstd-fdb5dc8c.dylib

dyld: Symbol not found: __ZN4core3fmt5write17h2f7663117dd4fb40E
  Referenced from: /Users/lclark/Repos/rust/x86_64-apple-darwin/test/run-make/rustc-macro-dep-files.stage1-x86_64-apple-darwin/libfoo.dylib
  Expected in: /Users/lclark/Repos/rust/x86_64-apple-darwin/stage1/lib/libstd-fdb5dc8c.dylib

make[1]: *** [all] Trace/BPT trap: 5

------------------------------------------

thread '[run-make] run-make/rustc-macro-dep-files' panicked at 'explicit panic', /Users/lclark/Repos/rust/src/tools/compiletest/src/runtest.rs:2407
note: Run with `RUST_BACKTRACE=1` for a backtrace.

failures:
    [run-make] run-make/rustc-macro-dep-files

test result: FAILED. 136 passed; 1 failed; 0 ignored; 0 measured

thread 'main' panicked at 'Some tests failed', /Users/lclark/Repos/rust/src/tools/compiletest/src/main.rs:302
make: *** [tmp/check-stage1-T-x86_64-apple-darwin-H-x86_64-apple-darwin-rmake.ok] Error 101
```

r? @GuillaumeGomez

7 years agoAdd more references between lowercase/uppercase operations.
Corey Farwell [Sat, 21 Jan 2017 22:35:15 +0000 (17:35 -0500)]
Add more references between lowercase/uppercase operations.

7 years agoAuto merge of #39224 - GuillaumeGomez:os_string_urls, r=frewsxcv
bors [Sun, 22 Jan 2017 12:19:11 +0000 (12:19 +0000)]
Auto merge of #39224 - GuillaumeGomez:os_string_urls, r=frewsxcv

Add missing urls for OsStr and OsString

r? @frewsxcv

7 years agoAdd missing urls for OsStr and OsString
Guillaume Gomez [Sat, 21 Jan 2017 15:38:54 +0000 (16:38 +0100)]
Add missing urls for OsStr and OsString

7 years agoAuto merge of #39127 - canndrew:unreachable-pattern-errors-into-warnings, r=arielb1
bors [Sun, 22 Jan 2017 08:56:27 +0000 (08:56 +0000)]
Auto merge of #39127 - canndrew:unreachable-pattern-errors-into-warnings, r=arielb1

Change unreachable pattern ICEs to warnings

Allow code with unreachable `?` and `for` patterns to compile.
Add some tests.

7 years agobetter comment wording
king6cong [Sun, 22 Jan 2017 07:45:06 +0000 (15:45 +0800)]
better comment wording

7 years agoRemove duplicate `TokenStream` quoter tests (modulo imports).
Jeffrey Seyfried [Sat, 21 Jan 2017 08:32:11 +0000 (08:32 +0000)]
Remove duplicate `TokenStream` quoter tests (modulo imports).

7 years agoAuto merge of #39221 - frewsxcv:os-string-docs, r=GuillaumeGomez
bors [Sun, 22 Jan 2017 06:41:33 +0000 (06:41 +0000)]
Auto merge of #39221 - frewsxcv:os-string-docs, r=GuillaumeGomez

Add doc examples for `std::ffi::OsString` fucntions/methods.

None

7 years agoAuto merge of #39060 - jseyfried:improve_unused, r=nrc
bors [Sun, 22 Jan 2017 03:42:24 +0000 (03:42 +0000)]
Auto merge of #39060 - jseyfried:improve_unused, r=nrc

Improve unused `extern crate` and unused `#[macro_use]` warnings

This PR
 - adds `unused_imports` warnings for unused `#[macro_use] extern crate` macro imports,
 - improves `unused_extern_crates` warnings (avoids false negatives), and
 - removes unused `#[macro_use]` imports and unused `extern crate`s.

r? @nrc

7 years agoRemove unused `extern crate`s.
Jeffrey Seyfried [Sat, 14 Jan 2017 09:21:43 +0000 (09:21 +0000)]
Remove unused `extern crate`s.

7 years agoWarn on unused `#[macro_use]` imports.
Jeffrey Seyfried [Sat, 14 Jan 2017 08:58:50 +0000 (08:58 +0000)]
Warn on unused `#[macro_use]` imports.

7 years agoAuto merge of #39176 - CartesianDaemon:master, r=frewsxcv
bors [Sun, 22 Jan 2017 01:19:18 +0000 (01:19 +0000)]
Auto merge of #39176 - CartesianDaemon:master, r=frewsxcv

Use fs::symlink_metadata in doc for is_symlink

fs::metadata() follows symlinks so is_symlink() will always return
false. Use symlink_metadata instead in the example in the
documentation.

See issue #39088.

7 years agoAuto merge of #39218 - xen0n:syntax-warts, r=alexcrichton
bors [Sat, 21 Jan 2017 22:07:14 +0000 (22:07 +0000)]
Auto merge of #39218 - xen0n:syntax-warts, r=alexcrichton

syntax: remove abi::Os and abi::Architecture

They're long dead since the switch to flexible targets, but was not removed like their consumers were. Interesting they even got maintained by various porters out there!

Technically [syntax-breaking] as they're public API, but since they're unused in the compiler, the potential breakage IMO should be minimal.

7 years agoRevert "Add link to symlink_metadata in fs::Metadata doc"
Jack Vickeridge [Sat, 21 Jan 2017 19:57:57 +0000 (19:57 +0000)]
Revert "Add link to symlink_metadata in fs::Metadata doc"

This reverts commit fe9f5d52a6830991609c07455b0267852d9c3545.

7 years agoAuto merge of #39210 - GuillaumeGomez:GuillaumeGomez-patch-1, r=frewsxcv
bors [Sat, 21 Jan 2017 19:51:08 +0000 (19:51 +0000)]
Auto merge of #39210 - GuillaumeGomez:GuillaumeGomez-patch-1, r=frewsxcv

Specify the result of integer cast on boolean

Fixes #39190.

r? @frewsxcv

7 years agoAuto merge of #39203 - ranma42:doc_metadata, r=BurntSushi
bors [Sat, 21 Jan 2017 16:51:22 +0000 (16:51 +0000)]
Auto merge of #39203 - ranma42:doc_metadata, r=BurntSushi

Document that `Metadata` can be obtained from `symlink_metadata`

When retrieving the information about a syslink (specifically, when invoking `Metadata::is_symlink`) you generally want the `syslink_metadata`. It would be natural to point at both options to retrieve a `Metadata` value, as they are both appropriate (for different use cases).

7 years agoGeneralize envs() and args() to iterators.
Zack Weinberg [Sat, 21 Jan 2017 16:01:11 +0000 (11:01 -0500)]
Generalize envs() and args() to iterators.

 * Command::envs() now takes anything that is IntoIterator<Item=(K, V)>
   where both K and V are AsRef<OsStr>.
 * Since we're not 100% sure that's the right signature, envs() is
   now marked unstable.  (You can use envs() with HashMap<str, str> but
   not Vec<(str, str)>, for instance.)
 * Update the test to match.

 * By analogy, args() now takes any IntoIterator<Item=S>, S: AsRef<OsStr>.
   This should be uncontroversial.

7 years agoAdd doc examples for `std::ffi::OsString` fucntions/methods.
Corey Farwell [Sat, 21 Jan 2017 14:26:06 +0000 (09:26 -0500)]
Add doc examples for `std::ffi::OsString` fucntions/methods.

7 years agoForce backline on all where in docs
Guillaume Gomez [Sat, 21 Jan 2017 14:34:11 +0000 (15:34 +0100)]
Force backline on all where in docs

7 years agoAuto merge of #39204 - ollie27:linkchecker_fragment, r=alexcrichton
bors [Sat, 21 Jan 2017 11:48:08 +0000 (11:48 +0000)]
Auto merge of #39204 - ollie27:linkchecker_fragment, r=alexcrichton

linkchecker: Fix checking links which are just fragments

Also fix a typo which linkchecker should have caught.

It was broken by 31a8638e5e716bec90f4398a57c58fb34e492667.

r? @alexcrichton

7 years agoSpecify the result of integer cast on boolean
Guillaume Gomez [Fri, 20 Jan 2017 21:32:12 +0000 (22:32 +0100)]
Specify the result of integer cast on boolean

7 years agoResolve `Self` in impl headers
Vadim Petrochenkov [Sun, 8 Jan 2017 11:06:44 +0000 (14:06 +0300)]
Resolve `Self` in impl headers

7 years agoAuto merge of #39206 - MJDSys:fix_rustbuild_libdir, r=alexcrichton
bors [Sat, 21 Jan 2017 08:41:40 +0000 (08:41 +0000)]
Auto merge of #39206 - MJDSys:fix_rustbuild_libdir, r=alexcrichton

Fix rustbuild to work with --libdir.

Similar to the makefiles, pass CFG_LIBDIR_RELATIVE to cargo when building
rustc in stages > 0.  This tells rustc to check the different directory.

I'm not sure how you want this handled in the toml system (my distribution, Gentoo, uses configure still).  I have a feeling the system needs a rework anyways for rustbuild.  If there is some discussion that needs to happen, could you merge this in the mean time?  I'd be happy to help transition this to a better method.

7 years agoImprove `unused_extern_crate` warnings.
Jeffrey Seyfried [Sat, 14 Jan 2017 07:35:54 +0000 (07:35 +0000)]
Improve `unused_extern_crate` warnings.

7 years agosyntax: remove abi::Os and abi::Architecture
Wang Xuerui [Sat, 21 Jan 2017 07:05:41 +0000 (15:05 +0800)]
syntax: remove abi::Os and abi::Architecture

They're long dead since the switch to flexible targets, but was not
removed like their consumers were. Interesting they even got maintained
by various porters out there!

Technically [syntax-breaking] as they're public API, but since they're
unused in the compiler, the potential breakage IMO should be minimal.

7 years agoAuto merge of #39156 - GuillaumeGomez:debug_librand, r=alexcrichton
bors [Sat, 21 Jan 2017 05:44:21 +0000 (05:44 +0000)]
Auto merge of #39156 - GuillaumeGomez:debug_librand, r=alexcrichton

Add missing Debug implementation for librand structs

Part of #31869.

7 years agoFix multiple labels when some don't have message
Esteban Küber [Sat, 21 Jan 2017 02:57:21 +0000 (18:57 -0800)]
Fix multiple labels when some don't have message

The diagnostic emitter now accounts for labels with no text message,
presenting the underline on its own, without drawing the line for the
non existing message below it. Go from

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ----^^^^^^^----
  |   |   |
  |   |   `b` is a good letter
  |
```

to

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ----^^^^^^^----
  |       |
  |       `b` is a good letter
```

and from

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^
  |   |   |
  |   |
  |   `a` is a good letter
```

to

```
error: foo
 --> test.rs:3:6
  |
3 |   a { b { c } d }
  |   ^^^^-------^^^^ `a` is a good letter
```

7 years agoAuto merge of #39086 - aidanhs:aphs-local-rebuild-no-jemalloc, r=alexcrichton
bors [Sat, 21 Jan 2017 03:26:37 +0000 (03:26 +0000)]
Auto merge of #39086 - aidanhs:aphs-local-rebuild-no-jemalloc, r=alexcrichton

Make rustbuild force_alloc_system rather than relying on stage0

This 'fixes' jemalloc-less local rebuilds, where we tell cargo that we're actually stage1 (this only fixes the rustbuild path, since I wasn't enthusiastic to dive into the makefiles).

There should be one effect from this PR: `--enable-local-rebuild --disable-jemalloc` will successfully build a stage0 std (rather than erroring). Ideally I think it'd be nice to specify an allocator preference in Cargo.toml/cargo command line (used when an allocator must be picked i.e. dylibs, not rlibs), but since that's not possible we can make do with a force_alloc_system feature. Sadly this locks you into a single allocator in the build libstd, making any eventual implementation of #38575 not quite right in this edge case, but clearly not many people exercise the combination of these two flags.

This PR is also a substitute for #37975 I think. The crucial difference is that the feature name here is distinct from the jemalloc feature (reused in the previous PR) - we don't want someone to be forced into alloc_system just for disabling jemalloc!

Fixes #39054

r? @alexcrichton

7 years agoFix comment
Andrew Cann [Sat, 21 Jan 2017 02:55:30 +0000 (10:55 +0800)]
Fix comment

7 years agoFix some nits
Andrew Cann [Sat, 21 Jan 2017 02:53:16 +0000 (10:53 +0800)]
Fix some nits

7 years agoUse libc errno
Jeremy Soller [Sat, 21 Jan 2017 01:44:36 +0000 (18:44 -0700)]
Use libc errno

7 years agoAuto merge of #39199 - alexcrichton:rollup, r=alexcrichton
bors [Sat, 21 Jan 2017 00:56:18 +0000 (00:56 +0000)]
Auto merge of #39199 - alexcrichton:rollup, r=alexcrichton

Rollup of 28 pull requests

- Successful merges: #38603, #38761, #38842, #38847, #38955, #38966, #39062, #39068, #39077, #39111, #39112, #39114, #39118, #39120, #39132, #39135, #39138, #39142, #39143, #39146, #39157, #39166, #39167, #39168, #39179, #39184, #39195, #39197
- Failed merges: #39060, #39145

7 years agoappveyor: Don't test i586 MSVC binaries yet
Alex Crichton [Sat, 21 Jan 2017 00:31:36 +0000 (16:31 -0800)]
appveyor: Don't test i586 MSVC binaries yet

I was hoping

7 years agoMore test fixes from rollup
Alex Crichton [Fri, 20 Jan 2017 01:18:12 +0000 (17:18 -0800)]
More test fixes from rollup

7 years agoFix rustbuild to work with --libdir.
Matthew Dawson [Fri, 20 Jan 2017 14:22:16 +0000 (09:22 -0500)]
Fix rustbuild to work with --libdir.

Similar to the makefiles, pass CFG_LIBDIR_RELATIVE to cargo when building
rustc in stages > 0.  This tells rustc to check the different directory.

7 years agoMerge branch 'older-glibc' into rollup
Alex Crichton [Fri, 20 Jan 2017 16:36:50 +0000 (08:36 -0800)]
Merge branch 'older-glibc' into rollup

7 years agoTest fixes from the rollup
Alex Crichton [Fri, 20 Jan 2017 00:38:38 +0000 (16:38 -0800)]
Test fixes from the rollup

7 years agoRollup merge of #39197 - michaelwoerister:test-38942, r=alexcrichton
Alex Crichton [Thu, 19 Jan 2017 23:49:53 +0000 (15:49 -0800)]
Rollup merge of #39197 - michaelwoerister:test-38942, r=alexcrichton

Add regression test for issue #38942

Closes #38942.

Kudos to @pnkfelix and @nagisa, who did all the hard work of creating a reduced test case.

7 years agoRollup merge of #39195 - nagisa:deny-extra-requirement-in-impl, r=eddyb
Alex Crichton [Thu, 19 Jan 2017 23:49:51 +0000 (15:49 -0800)]
Rollup merge of #39195 - nagisa:deny-extra-requirement-in-impl, r=eddyb

Deny extra_requirement_in_impl forward-compat lint

Part of #37166

7 years agoRollup merge of #39184 - michaelwoerister:no-trans-items-for-meta-crates, r=eddyb
Alex Crichton [Thu, 19 Jan 2017 23:49:50 +0000 (15:49 -0800)]
Rollup merge of #39184 - michaelwoerister:no-trans-items-for-meta-crates, r=eddyb

trans: Exit earlier from base::trans_crate() when compiling rmeta crates.

Fixes https://github.com/rust-lang/rust/issues/38964.
r? @eddyb
cc @nrc

7 years agoRollup merge of #39179 - petrochenkov:objparen, r=eddyb
Alex Crichton [Thu, 19 Jan 2017 23:49:49 +0000 (15:49 -0800)]
Rollup merge of #39179 - petrochenkov:objparen, r=eddyb

Fix regression in parsing of trait object types

Fixes https://github.com/rust-lang/rust/issues/39169

Accepting parens in this position is a regression itself, introduced in Rust 1.6 by https://github.com/rust-lang/rust/pull/29870, so I hope to revert this in my next bounds refactoring patch (possibly with a warning,  crater run, etc).

r? @eddyb

7 years agoRollup merge of #39168 - estebank:multiline-candidate, r=petrochenkov
Alex Crichton [Thu, 19 Jan 2017 23:49:47 +0000 (15:49 -0800)]
Rollup merge of #39168 - estebank:multiline-candidate, r=petrochenkov

Use multiline Diagnostic for candidate in other module

```
error[E0574]: expected struct, variant or union type, found enum `Result`
  --> $DIR/issue-16058.rs:19:9
   |
19 |         Result {
   |         ^^^^^^ not a struct, variant or union type
   |
   = help: possible better candidates are found in other modules, you can import them into scope:
             `use std::fmt::Result;`
             `use std::io::Result;`
             `use std::thread::Result;`

error: aborting due to previous error
```

7 years agoRollup merge of #39167 - alexcrichton:no-more-sha, r=brson
Alex Crichton [Thu, 19 Jan 2017 23:49:46 +0000 (15:49 -0800)]
Rollup merge of #39167 - alexcrichton:no-more-sha, r=brson

travis: Stop uploading sha256 files

We'll generate these later in the build process and otherwise they could just
cause spurious failures with files overwriting one another.

cc #38531

7 years agoRollup merge of #39166 - glandium:master, r=brson
Alex Crichton [Thu, 19 Jan 2017 23:49:45 +0000 (15:49 -0800)]
Rollup merge of #39166 - glandium:master, r=brson

Update jemalloc to include various fixes for OSX 10.12