]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoTell the linker when we want to link a static executable
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Tell the linker when we want to link a static executable

If the C runtime is linked statically, explicitly tell the linker that
the executable should be static.

6 years agoDisable PIE when linking statically
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Disable PIE when linking statically

Static PIE support, while supported on musl, requires a patch to GCC.
Until/unless it is merged, adding '-pie' to the linker command line will
override '-static' and create a binary that requires a dynamic
interpreter (ld.so).

6 years agoIntroduce target feature crt_static_allows_dylibs
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce target feature crt_static_allows_dylibs

Most UNIX-like platforms do not allow shared libraries to statically
link their own libc, as libc expects to have consistent process-global
state. On those platforms, when we do not have a shared libc available,
we must not attempt to link dylibs or cdylibs. On Windows, however, it
is expected to statically link the CRT into dynamic libraries.

This feature is only relevant for targets that support both fully-static
and fully-dynamic linkage, such as musl on Linux.

6 years agoIntroduce temporary target feature crt_static_respected
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce temporary target feature crt_static_respected

This feature allows targets to opt in to full support of the crt-static
feature. Currently, crt-static is allowed on all targets, even those
that really can't or really shouldn't support it. This works because it
is very loose in the specification of its effects. Changing the behavior
of crt-static to be more strict in how it chooses libraries and links
executables would likely cause compilation to fail on these platforms.

To avoid breaking existing uses of crt-static, whitelist targets that
support the new, stricter behavior. For all other targets, this changes
crt-static from being "mostly a no-op" to "explicitly a no-op".

6 years agoFactor out a helper for the getting C runtime linkage
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Factor out a helper for the getting C runtime linkage

This commit makes no functional changes.

6 years agoInline crt-static choice for pc-windows-msvc
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Inline crt-static choice for pc-windows-msvc

This avoids the possibility of a duplicate or conflicting crt-static
command line option sent to rustc.

6 years agoIntroduce crt_static target option in config.toml
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce crt_static target option in config.toml

This controls the value of the crt-static feature used when building the
standard library for a target, as well as the compiler itself when that
target is the host.

6 years agoCopy musl startup objects before building std
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Copy musl startup objects before building std

They are required for linking it, even though it is a library, because
crtn.o in post_link_objects, as hardcoded in src/librustc_back/target/
linux_musl_base.rs, is added to the linker command line for both
executables and libraries.

6 years agoInfer a default musl_root for native builds
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Infer a default musl_root for native builds

6 years agoImprove explanation of musl_root
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Improve explanation of musl_root

6 years agoRemove incorrect special case of mips-musl
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Remove incorrect special case of mips-musl

The libdl/librt/libpthread provided by musl are no-op (empty static
libraries) on all architectures, mips included.

6 years agoAuto merge of #44033 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 22 Aug 2017 13:59:20 +0000 (13:59 +0000)]
Auto merge of #44033 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 5 pull requests

- Successful merges: #43993, #44001, #44010, #44014, #44029
- Failed merges:

6 years agoRollup merge of #44029 - WiSaGaN:patch-1, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:21 +0000 (13:36 +0200)]
Rollup merge of #44029 - WiSaGaN:patch-1, r=alexcrichton

Fix typos in 1.20 release notes

6 years agoRollup merge of #44014 - Mark-Simulacrum:update-readme, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:20 +0000 (13:36 +0200)]
Rollup merge of #44014 - Mark-Simulacrum:update-readme, r=alexcrichton

Update rustbuild README

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

r? @alexcrichton

6 years agoRollup merge of #44010 - GuillaumeGomez:read-links, r=frewsxcv
Guillaume Gomez [Tue, 22 Aug 2017 11:36:19 +0000 (13:36 +0200)]
Rollup merge of #44010 - GuillaumeGomez:read-links, r=frewsxcv

Add missing links for Read trait

r? @rust-lang/docs

6 years agoRollup merge of #44001 - tamird:release-notes-1.16, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:18 +0000 (13:36 +0200)]
Rollup merge of #44001 - tamird:release-notes-1.16, r=alexcrichton

RELEASES.md: document 1.16 lifetime elision change

Closes #41105.

r? @Mark-Simulacrum cc @nikomatsakis

6 years agoRollup merge of #43993 - tamird:better-wording-error, r=arielb1
Guillaume Gomez [Tue, 22 Aug 2017 11:36:17 +0000 (13:36 +0200)]
Rollup merge of #43993 - tamird:better-wording-error, r=arielb1

borrowck: name the correct type in error message

Closes #36407.

r? @Mark-Simulacrum

6 years agoAuto merge of #44008 - RalfJung:staged1, r=alexcrichton
bors [Tue, 22 Aug 2017 11:15:10 +0000 (11:15 +0000)]
Auto merge of #44008 - RalfJung:staged1, r=alexcrichton

Make sure crates not opting in to staged_api don't use staged_api

This also fixes the problem that with `-Zforce-unstable-if-unmarked` set, crates could not use `#[deprecated]`.

If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when  `-Zforce-unstable-if-unmarked` is set. I have prepared that at <https://github.com/RalfJung/rust/tree/staged2>. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it?

Cc @alexcrichton #43975

6 years agoAuto merge of #44003 - LukasKalbertodt:patch-1, r=nikomatsakis
bors [Tue, 22 Aug 2017 08:32:14 +0000 (08:32 +0000)]
Auto merge of #44003 - LukasKalbertodt:patch-1, r=nikomatsakis

Add PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}

I don't see a reason why those two types shouldn't be tested for equality. But I hardly know anything about proc macros, so I'm probably wrong :)

6 years agoAuto merge of #43854 - estebank:missing-cond, r=nikomatsakis
bors [Tue, 22 Aug 2017 04:28:49 +0000 (04:28 +0000)]
Auto merge of #43854 - estebank:missing-cond, r=nikomatsakis

Point out missing if conditional

On a case where an else conditional is missing, point this out
instead of the token immediately after the (incorrect) else block:

```
error: missing condition for `if` statemementt push fork -f

  --> $DIR/issue-13483.rs:16:5
   |
13 |    } else if {
   |             ^ expected if condition here
```

instead of

```
error: expected `{`, found `else`
  --> ../../src/test/ui/issue-13483.rs:14:7
   |
14 |     } else {
   |       ^^^^
```

Fix #13483.

6 years agoFix typos in 1.20 release notes
Wangshan Lu [Tue, 22 Aug 2017 03:29:05 +0000 (11:29 +0800)]
Fix typos in 1.20 release notes

6 years agoAuto merge of #43690 - scalexm:issue-28229, r=nikomatsakis
bors [Tue, 22 Aug 2017 01:34:54 +0000 (01:34 +0000)]
Auto merge of #43690 - scalexm:issue-28229, r=nikomatsakis

Generate builtin impls for `Clone`

This fixes a long-standing ICE and limitation where some builtin types implement `Copy` but not `Clone` (whereas `Clone` is a super trait of `Copy`).

However, this PR has a few side-effects:
* `Clone` is now marked as a lang item.
* `[T; N]` is now `Clone` if `T: Clone` (currently, only if `T: Copy` and for `N <= 32`).
* `fn foo<'a>() where &'a mut (): Clone { }` won't compile anymore because of how bounds for builtin traits are handled (e.g. same thing currently if you replace `Clone` by `Copy` in this example). Of course this function is unusable anyway, an error would pop as soon as it is called.

Hence, I'm wondering wether this PR would need an RFC...
Also, cc-ing @nikomatsakis, @arielb1.

Related issues: #28229, #24000.

6 years agoAuto merge of #43540 - petrochenkov:pathrelax, r=nikomatsakis
bors [Mon, 21 Aug 2017 23:03:57 +0000 (23:03 +0000)]
Auto merge of #43540 - petrochenkov:pathrelax, r=nikomatsakis

syntax: Relax path grammar

TLDR: Accept the disambiguator `::` in "type" paths (`Type::<Args>`), accept the disambiguator `::` before parenthesized generic arguments (`Fn::(Args)`).

The "turbofish" disambiguator `::<>` in expression paths is a necessary evil required for path parsing to be both simple and to give reasonable results.
Since paths in expressions usually refer to values (but not necessarily, e.g. `Struct::<u8> { field: 0 }` is disambiguated, but refers to a type), people often consider `::<>` to be inherent to *values*, and not *expressions* and want to write disambiguated paths for values even in contexts where disambiguation is not strictly necessary, for example when a path is passed to a macro `m!(Vec::<i32>::new)`.
The problem is that currently, if the disambiguator is not *required*, then it's *prohibited*. This results in confusion - see https://github.com/rust-lang/rust/issues/41740, https://internals.rust-lang.org/t/macro-path-uses-novel-syntax/5561.

This PR makes the disambiguator *optional* instead of prohibited in contexts where it's not strictly required, so people can pass paths to macros in whatever form they consider natural (e.g. disambiguated form for value paths).
This PR also accepts the disambiguator in paths with parenthesized arguments (`Fn::(Args)`) for consistency and to simplify testing of stuff like https://github.com/rust-lang/rust/pull/41856#issuecomment-301219194.

Closes https://github.com/rust-lang/rust/issues/41740

cc @rust-lang/lang
r? @nikomatsakis

6 years agoAuto merge of #44009 - pnkfelix:mir-borrowck-as-query, r=arielb1
bors [Mon, 21 Aug 2017 20:16:21 +0000 (20:16 +0000)]
Auto merge of #44009 - pnkfelix:mir-borrowck-as-query, r=arielb1

Mir borrowck as query

Turn the `mir-borrowck` pass (aka "transform") into a query.

(If I had realized how relatively easy this was going to be, I would have made it part of #43108. `let hindsight = 20/20;`)

6 years agoAuto merge of #43971 - alexcrichton:lint-statements, r=michaelwoerister
bors [Mon, 21 Aug 2017 17:38:26 +0000 (17:38 +0000)]
Auto merge of #43971 - alexcrichton:lint-statements, r=michaelwoerister

rustc: Add `Local` to the HIR map of parents

When walking parents for lints we want to be sure to hit `let` statements which
can have attributes, so hook up these statements in the HIR map.

Closes #43910

6 years agoUpdate rustbuild README
Mark Simulacrum [Mon, 21 Aug 2017 12:22:01 +0000 (06:22 -0600)]
Update rustbuild README

6 years agoMoved support code for `rustc_mir::borrow_check` query out of `mod transform`.
Felix S. Klock II [Mon, 21 Aug 2017 09:31:35 +0000 (11:31 +0200)]
Moved support code for `rustc_mir::borrow_check` query out of `mod transform`.

6 years agoRemove the `rustc_mir::transform` entry point for mir-borrowck.
Felix S. Klock II [Mon, 21 Aug 2017 09:04:15 +0000 (11:04 +0200)]
Remove the `rustc_mir::transform` entry point for mir-borrowck.

6 years agoExpose mir-borrowck via a query.
Felix S. Klock II [Mon, 21 Aug 2017 08:24:12 +0000 (10:24 +0200)]
Expose mir-borrowck via a query.

(A followup commit removes the mir::transform based entry point.)

6 years agorustc_plugin: use staged API
Ralf Jung [Mon, 21 Aug 2017 10:46:36 +0000 (12:46 +0200)]
rustc_plugin: use staged API

6 years agoAdd missing links for Read trait
Guillaume Gomez [Mon, 21 Aug 2017 09:45:33 +0000 (11:45 +0200)]
Add missing links for Read trait

6 years agoAuto merge of #43986 - petrochenkov:pubcrate3, r=pnkfelix
bors [Mon, 21 Aug 2017 08:14:17 +0000 (08:14 +0000)]
Auto merge of #43986 - petrochenkov:pubcrate3, r=pnkfelix

rustc: Remove some dead code

Extracted from https://github.com/rust-lang/rust/pull/43192

r? @eddyb

6 years agoAuto merge of #43929 - oli-obk:use_placement, r=nrc
bors [Mon, 21 Aug 2017 05:18:03 +0000 (05:18 +0000)]
Auto merge of #43929 - oli-obk:use_placement, r=nrc

Improve placement of `use` suggestions

r? @nrc

cc @estebank @Mark-Simulacrum

fixes #42835
fixes #42548
fixes #43769

6 years agoAuto merge of #44004 - frewsxcv:frewsxcv-bors-docs, r=Mark-Simulacrum
bors [Mon, 21 Aug 2017 01:27:00 +0000 (01:27 +0000)]
Auto merge of #44004 - frewsxcv:frewsxcv-bors-docs, r=Mark-Simulacrum

Fix broken homu link in CONTRIBUTING.md.

Fixes the docs aspect of https://github.com/rust-lang/rust/issues/43898.

6 years agoFix broken homu link in CONTRIBUTING.md.
Corey Farwell [Mon, 21 Aug 2017 01:24:14 +0000 (21:24 -0400)]
Fix broken homu link in CONTRIBUTING.md.

Fixes the docs aspect of https://github.com/rust-lang/rust/issues/43898.

6 years agoborrowck: name the correct type in error message
Tamir Duberstein [Sat, 19 Aug 2017 23:33:24 +0000 (16:33 -0700)]
borrowck: name the correct type in error message

Closes #36407.

6 years agoAdd PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}
Lukas Kalbertodt [Sun, 20 Aug 2017 21:20:34 +0000 (23:20 +0200)]
Add PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}

I don't see a reason why those two types shouldn't be tested for equality.

6 years agoAuto merge of #44000 - ids1024:redox-exec-error, r=alexcrichton
bors [Sun, 20 Aug 2017 20:29:08 +0000 (20:29 +0000)]
Auto merge of #44000 - ids1024:redox-exec-error, r=alexcrichton

redox: Correct error on exec when file is not found

`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.

6 years agoRELEASES.md: document 1.16 lifetime elision change
Tamir Duberstein [Sun, 20 Aug 2017 19:49:36 +0000 (15:49 -0400)]
RELEASES.md: document 1.16 lifetime elision change

Closes #41105.

6 years agoredox: Correct error on exec when file is not found
Ian Douglas Scott [Sun, 20 Aug 2017 17:07:17 +0000 (10:07 -0700)]
redox: Correct error on exec when file is not found

`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.

6 years agoAuto merge of #43996 - shanavas786:fix-typo, r=frewsxcv
bors [Sun, 20 Aug 2017 15:58:05 +0000 (15:58 +0000)]
Auto merge of #43996 - shanavas786:fix-typo, r=frewsxcv

Fix typo in doc

6 years agoMake sure crates not opting in to staged_api don't use staged_api
Ralf Jung [Sun, 20 Aug 2017 14:49:03 +0000 (16:49 +0200)]
Make sure crates not opting in to staged_api don't use staged_api

6 years agoTest staging attributes when -Zforce-unstable-if-unmarked is set
Ralf Jung [Sun, 20 Aug 2017 13:30:15 +0000 (15:30 +0200)]
Test staging attributes when -Zforce-unstable-if-unmarked is set

Both new tests currently fail

6 years agoAuto merge of #43978 - GuillaumeGomez:missing-links, r=frewsxcv
bors [Sun, 20 Aug 2017 13:28:18 +0000 (13:28 +0000)]
Auto merge of #43978 - GuillaumeGomez:missing-links, r=frewsxcv

Missing links

r? @rust-lang/docs

6 years agoAuto merge of #43976 - dylanmckay:update-builtins, r=alexcrichton
bors [Sun, 20 Aug 2017 09:39:12 +0000 (09:39 +0000)]
Auto merge of #43976 - dylanmckay:update-builtins, r=alexcrichton

Update the compiler_builtins submodule

Fixes #43411

6 years agoFix typo in doc
Shanavas M [Sun, 20 Aug 2017 08:04:02 +0000 (11:04 +0300)]
Fix typo in doc

6 years agoAuto merge of #43911 - arthurprs:update-jemalloc, r=alexcrichton
bors [Sun, 20 Aug 2017 07:18:38 +0000 (07:18 +0000)]
Auto merge of #43911 - arthurprs:update-jemalloc, r=alexcrichton

Update jemalloc to 4.5.0

Second try, including the fix for osx deadlock jemalloc/jemalloc#895.

cc https://github.com/rust-lang/rust/pull/41861 @alexcrichton @RalfJung

6 years agoAuto merge of #43965 - frewsxcv:frewsxcv-filter-map, r=QuietMisdreavus
bors [Sun, 20 Aug 2017 04:50:22 +0000 (04:50 +0000)]
Auto merge of #43965 - frewsxcv:frewsxcv-filter-map, r=QuietMisdreavus

Minor Iterator::filter_map description rewording.

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

6 years agoAuto merge of #43950 - redox-os:redox_docker, r=alexcrichton
bors [Sun, 20 Aug 2017 02:25:20 +0000 (02:25 +0000)]
Auto merge of #43950 - redox-os:redox_docker, r=alexcrichton

Add x86_64-unknown-redox to build manifest target list

This should fix the issue of `x86_64-unknown-redox` not being available for `rustup target add`

6 years agoAuto merge of #43936 - oli-obk:patch-6, r=alexcrichton
bors [Sat, 19 Aug 2017 23:53:53 +0000 (23:53 +0000)]
Auto merge of #43936 - oli-obk:patch-6, r=alexcrichton

Upgrade a comment to a doc comment

r? @alexcrichton

cc @bjorn3

6 years agoAuto merge of #43990 - tamird:defid-not-name, r=eddyb
bors [Sat, 19 Aug 2017 21:09:09 +0000 (21:09 +0000)]
Auto merge of #43990 - tamird:defid-not-name, r=eddyb

librustc_typeck: store a DefId rather than a Name

r? @eddyb

cc @tschottdorf

6 years agolibrustc_typeck: store a DefId rather than a Name
Tamir Duberstein [Sat, 19 Aug 2017 20:41:10 +0000 (13:41 -0700)]
librustc_typeck: store a DefId rather than a Name

6 years agorustc: Remove some dead code
Vadim Petrochenkov [Sat, 19 Aug 2017 00:09:55 +0000 (03:09 +0300)]
rustc: Remove some dead code

6 years agoAuto merge of #43919 - frewsxcv:frewsxcv-char-primitive, r=QuietMisdreavus
bors [Sat, 19 Aug 2017 05:46:46 +0000 (05:46 +0000)]
Auto merge of #43919 - frewsxcv:frewsxcv-char-primitive, r=QuietMisdreavus

Minor rewrite of char primitive unicode intro.

Opened primarily to address #36998.

Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two.

Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing ðŸ˜…

6 years agoAuto merge of #43933 - topecongiro:bad-span-for-attributes, r=petrochenkov
bors [Sat, 19 Aug 2017 01:59:36 +0000 (01:59 +0000)]
Auto merge of #43933 - topecongiro:bad-span-for-attributes, r=petrochenkov

Fix bad span for attributes

Closes #42641.

6 years agoMinor Iterator::filter_map description rewording.
Corey Farwell [Thu, 17 Aug 2017 22:02:01 +0000 (18:02 -0400)]
Minor Iterator::filter_map description rewording.

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

6 years agorustc: Add `Local` to the HIR map of parents
Alex Crichton [Fri, 18 Aug 2017 06:56:11 +0000 (23:56 -0700)]
rustc: Add `Local` to the HIR map of parents

When walking parents for lints we want to be sure to hit `let` statements which
can have attributes, so hook up these statements in the HIR map.

Closes #43910

6 years agoAdd missing links for String module and type
Guillaume Gomez [Fri, 18 Aug 2017 15:17:46 +0000 (17:17 +0200)]
Add missing links for String module and type

6 years agoAuto merge of #43917 - ids1024:redox-unwind, r=alexcrichton
bors [Fri, 18 Aug 2017 15:11:46 +0000 (15:11 +0000)]
Auto merge of #43917 - ids1024:redox-unwind, r=alexcrichton

Enable unwinding panics on Redox

6 years agoAdd missing urls for Result struct
Guillaume Gomez [Fri, 18 Aug 2017 14:41:54 +0000 (16:41 +0200)]
Add missing urls for Result struct

6 years agoAdd missing url for fmt module
Guillaume Gomez [Fri, 18 Aug 2017 14:32:38 +0000 (16:32 +0200)]
Add missing url for fmt module

6 years agoUpdate the compiler_builtins submodule
Dylan McKay [Fri, 18 Aug 2017 11:03:37 +0000 (23:03 +1200)]
Update the compiler_builtins submodule

Fixes #43411

6 years agoAuto merge of #43901 - GuillaumeGomez:unsized-union-field, r=petrochenkov
bors [Fri, 18 Aug 2017 10:57:55 +0000 (10:57 +0000)]
Auto merge of #43901 - GuillaumeGomez:unsized-union-field, r=petrochenkov

udpdate error message for unsized union field

Fixes #36312.

6 years agoAdd an additional empty line between the suggested `use` and the next item
Oliver Schneider [Fri, 18 Aug 2017 10:46:28 +0000 (12:46 +0200)]
Add an additional empty line between the suggested `use` and the next item

6 years agoHandle structs, unions and enums unsized field/variant separately
Guillaume Gomez [Wed, 16 Aug 2017 16:45:54 +0000 (18:45 +0200)]
Handle structs, unions and enums unsized field/variant separately

6 years agoAuto merge of #43904 - topecongiro:libsyntax/parse-attr, r=petrochenkov
bors [Fri, 18 Aug 2017 08:17:45 +0000 (08:17 +0000)]
Auto merge of #43904 - topecongiro:libsyntax/parse-attr, r=petrochenkov

Eat open paren when parsing list in libsyntax/parse/attr.rs

This PR adds a small refactoring:
```diff
      pub fn parse_meta_item_kind(&mut self) -> PResult<'a, ast::MetaItemKind> {
         Ok(if self.eat(&token::Eq) {
             ast::MetaItemKind::NameValue(self.parse_unsuffixed_lit()?)
-        } else if self.token == token::OpenDelim(token::Paren) {
+        } else if self.eat(&token::OpenDelim(token::Paren)) {
             ast::MetaItemKind::List(self.parse_meta_seq()?)
         } else {
-            self.eat(&token::OpenDelim(token::Paren));
             ast::MetaItemKind::Word
         })
     }
```
in `parse_meta_item_kind()`, the parser calls `self.eat(&token::OpenDelim(token::Paren));` before returning `ast::MetaItemKind::Word` just to add `(` to expected token. It seems more natural to eat the paren when parsing `ast::MetaItemKind::List`.

6 years agorustc: Rename NodeLocal to NodeBinding
Alex Crichton [Fri, 18 Aug 2017 06:00:57 +0000 (23:00 -0700)]
rustc: Rename NodeLocal to NodeBinding

6 years agoAuto merge of #43900 - TobiasSchaffner:net_out_of_io, r=alexcrichton
bors [Fri, 18 Aug 2017 05:47:56 +0000 (05:47 +0000)]
Auto merge of #43900 - TobiasSchaffner:net_out_of_io, r=alexcrichton

Refactoring: move net specific file descriptor methods

Move the implementations of net specific file descriptor methods from
io to net. This makes it easier to exclude net at all if it is not needed
for a target.

6 years agoVerify that an `if` condition block returns a value
Esteban Küber [Thu, 17 Aug 2017 23:51:52 +0000 (16:51 -0700)]
Verify that an `if` condition block returns a value

6 years agoAuto merge of #43897 - lu-zero:master, r=alexcrichton
bors [Fri, 18 Aug 2017 03:15:01 +0000 (03:15 +0000)]
Auto merge of #43897 - lu-zero:master, r=alexcrichton

More PowerPC intrinsics

6 years agoAuto merge of #43832 - huntiep:compiler-desugaring-enum, r=nikomatsakis
bors [Fri, 18 Aug 2017 00:26:08 +0000 (00:26 +0000)]
Auto merge of #43832 - huntiep:compiler-desugaring-enum, r=nikomatsakis

Implement CompilerDesugaringKind enum

This is the first step outlined in #35946. I think that the variants of `CompilerDesugaringKind` should be changed, I didn't know what the official names for `...` and `<-` are.

I'm not to sure how tests for the compiler work, but I would imagine that tests should be added such that
`Symbol::intern(s) == CompilerDesugaringKind::from(s).as_symbol()` for valid `s`.

6 years agoCheck for `else` keyword on missing `if` condition
Esteban Küber [Thu, 17 Aug 2017 19:14:35 +0000 (12:14 -0700)]
Check for `else` keyword on missing `if` condition

6 years agoAdd x86_64-unknown-redox to build manifest target list
Jeremy Soller [Thu, 17 Aug 2017 20:58:47 +0000 (14:58 -0600)]
Add x86_64-unknown-redox to build manifest target list

6 years agoPoint out missing if conditional
Esteban Küber [Sun, 13 Aug 2017 21:50:27 +0000 (14:50 -0700)]
Point out missing if conditional

On a case where an else conditional is missing, point this out
instead of the token immediately after the (incorrect) else block:

```
error: missing condition for `if` statemementt push fork -f

  --> $DIR/issue-13483.rs:16:5
   |
13 |    } else if {
   |             ^ expected if condition here
```

instead of

```
error: expected `{`, found `else`
  --> ../../src/test/ui/issue-13483.rs:14:7
   |
14 |     } else {
   |       ^^^^
```

6 years agoAuto merge of #43939 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 17 Aug 2017 17:10:25 +0000 (17:10 +0000)]
Auto merge of #43939 - frewsxcv:rollup, r=frewsxcv

Rollup of 9 pull requests

- Successful merges: #43891, #43905, #43912, #43914, #43915, #43916, #43920, #43928, #43930
- Failed merges:

6 years agoImprove placement of `use` suggestions
Oliver Schneider [Thu, 17 Aug 2017 09:03:59 +0000 (11:03 +0200)]
Improve placement of `use` suggestions

6 years agoRollup merge of #43930 - pravic:es5-revert-shorthand, r=frewsxcv
Corey Farwell [Thu, 17 Aug 2017 14:44:15 +0000 (10:44 -0400)]
Rollup merge of #43930 - pravic:es5-revert-shorthand, r=frewsxcv

Fix ES5 regression with shorthand names.

Reverts 1b6c9605e4.

I appreciate new features and syntax in Rust, but seriously, don't rewrite anything. Especially if this **breaks** documentation of language itself and every crate hosted at docs.rs.

6 years agoRollup merge of #43928 - anthonyclays:anthonyclays-refcell-docfix, r=QuietMisdreavus
Corey Farwell [Thu, 17 Aug 2017 14:44:14 +0000 (10:44 -0400)]
Rollup merge of #43928 - anthonyclays:anthonyclays-refcell-docfix, r=QuietMisdreavus

Fixed typo in RefCell::get_mut

"[...] is usually not you want." => "[...] is usually not what you want."

6 years agoRollup merge of #43920 - michael-zapata:cleanup/mir, r=arielb1
Corey Farwell [Thu, 17 Aug 2017 14:44:13 +0000 (10:44 -0400)]
Rollup merge of #43920 - michael-zapata:cleanup/mir, r=arielb1

refactor(mir): remove unused argument

Small cleanup that shouldn't have any impact, as it's a small thing introduced in #43772

6 years agoRollup merge of #43916 - integer32llc:cargo-docs-redirect, r=alexcrichton
Corey Farwell [Thu, 17 Aug 2017 14:44:12 +0000 (10:44 -0400)]
Rollup merge of #43916 - integer32llc:cargo-docs-redirect, r=alexcrichton

Implement a temp redirect for cargo docs

As discussed in
https://github.com/rust-lang/cargo/issues/4040#issuecomment-321639074

This is a redirect meant to be replaced once cargo docs have been
converted to mdbook. We just want *a* URL to ride the trains for now so
that we can print doc.rust-lang.org/cargo in the paper book and
guarantee that it will go *somewhere* useful by the time the book is
printed.

Implemented as a meta redirect in HTML because we don't currently have
any google juice at doc.rust-lang.org/cargo to lose.

When I run `./x.py doc`, this creates a `build/x86_64-apple-darwin/doc/cargo/index.html` file that contains a meta redirect to doc.crates.io. As I understand rust-central-station to work, this should be what we need to make `doc.rust-lang.org/cargo` to work.

r? @alexcrichton and/or @steveklabnik

6 years agoRollup merge of #43915 - adrian5:patch-1, r=sfackler
Corey Farwell [Thu, 17 Aug 2017 14:44:11 +0000 (10:44 -0400)]
Rollup merge of #43915 - adrian5:patch-1, r=sfackler

Fix typo in doc

6 years agoRollup merge of #43914 - steveklabnik:update-books, r=QuietMisdreavus
Corey Farwell [Thu, 17 Aug 2017 14:44:10 +0000 (10:44 -0400)]
Rollup merge of #43914 - steveklabnik:update-books, r=QuietMisdreavus

Update the books for next release

6 years agoRollup merge of #43912 - Songbird0:e0106_field_lifetimes, r=GuillaumeGomez
Corey Farwell [Thu, 17 Aug 2017 14:44:09 +0000 (10:44 -0400)]
Rollup merge of #43912 - Songbird0:e0106_field_lifetimes, r=GuillaumeGomez

E0106: field lifetimes

Hi there,

I've added an example for custom type lifetimes located in another `struct` field.

cc @GuillaumeGomez

6 years agoRollup merge of #43905 - partim:master, r=steveklabnik
Corey Farwell [Thu, 17 Aug 2017 14:44:08 +0000 (10:44 -0400)]
Rollup merge of #43905 - partim:master, r=steveklabnik

Document that `std::hash::Hasher::finish()` does not reset the hasher.

Clarifies the fact that `finish()` doesn’t in fact end or reset the hasher. This was surprising to me â€¦

Follows up on and fixes #43763

6 years agoRollup merge of #43891 - Fourchaux:master, r=steveklabnik
Corey Farwell [Thu, 17 Aug 2017 14:44:07 +0000 (10:44 -0400)]
Rollup merge of #43891 - Fourchaux:master, r=steveklabnik

Fix typos & us spellings

Fixing some typos and non en-US spellings.

(Update of PR https://github.com/rust-lang/rust/pull/42812 )

6 years agoUpgrade a comment to a doc comment
Oliver Schneider [Thu, 17 Aug 2017 14:21:55 +0000 (16:21 +0200)]
Upgrade a comment to a doc comment

6 years agoUpgrade a comment to a doc comment
Oliver Schneider [Thu, 17 Aug 2017 14:15:40 +0000 (16:15 +0200)]
Upgrade a comment to a doc comment

6 years agoUpdate ui tests
Seiichi Uchida [Thu, 17 Aug 2017 12:59:19 +0000 (21:59 +0900)]
Update ui tests

6 years agoInclude the closing paren to the span of ast::NestedMetaItem
Seiichi Uchida [Thu, 17 Aug 2017 12:58:01 +0000 (21:58 +0900)]
Include the closing paren to the span of ast::NestedMetaItem

6 years agoUse respan()
Seiichi Uchida [Thu, 17 Aug 2017 12:24:08 +0000 (21:24 +0900)]
Use respan()

6 years agoAuto merge of #43902 - michaelwoerister:fix-mir-passes-promoted, r=arielb1
bors [Thu, 17 Aug 2017 10:58:12 +0000 (10:58 +0000)]
Auto merge of #43902 - michaelwoerister:fix-mir-passes-promoted, r=arielb1

Run MIR passes on promoted temporaries again.

This seems to have been broken some time in the past (maybe here: https://github.com/rust-lang/rust/commit/9c154a67bf5c6841c39afdb90388cc3ba36dc70c#diff-2f8e8805126c84b2be3f0967ffa0af28L162).

r? @arielb1

6 years agoFix ES5 regression with shorthand names.
pravic [Thu, 17 Aug 2017 09:41:14 +0000 (12:41 +0300)]
Fix ES5 regression with shorthand names.

Reverts 1b6c9605e4.

6 years agoFixed typo in RefCell::get_mut
Anthony Clays [Thu, 17 Aug 2017 08:57:17 +0000 (10:57 +0200)]
Fixed typo in RefCell::get_mut

6 years agorefactor(mir): remove unused argument
Michael Zapata [Thu, 17 Aug 2017 04:14:32 +0000 (16:14 +1200)]
refactor(mir): remove unused argument

Small cleanup that shouldn't have any impact

6 years agoAuto merge of #43878 - kennytm:fix-43869-put-impl-trait-out-of-the-loop, r=alexcrichton
bors [Thu, 17 Aug 2017 06:19:38 +0000 (06:19 +0000)]
Auto merge of #43878 - kennytm:fix-43869-put-impl-trait-out-of-the-loop, r=alexcrichton

Exclude `impl Trait` functions from everybody_loops.

Fixes #43869.

cc #34511.

6 years agoMinor rewrite of char primitive unicode intro.
Corey Farwell [Thu, 17 Aug 2017 04:36:30 +0000 (00:36 -0400)]
Minor rewrite of char primitive unicode intro.

Opened primarily to address #36998.

6 years agoAuto merge of #43867 - GuillaumeGomez:useless-help, r=nikomatsakis
bors [Thu, 17 Aug 2017 03:42:26 +0000 (03:42 +0000)]
Auto merge of #43867 - GuillaumeGomez:useless-help, r=nikomatsakis

Remove useless help part

Part of #32658.

I think this error should be splitted into two parts, each more specific (`anonymous function` vs `type method`).

6 years agoEnable unwinding panics on Redox
Ian Douglas Scott [Thu, 17 Aug 2017 00:19:53 +0000 (17:19 -0700)]
Enable unwinding panics on Redox

6 years agoUse direct references to CompilerDesugaringKind
Hunter Praska [Wed, 16 Aug 2017 23:46:48 +0000 (18:46 -0500)]
Use direct references to CompilerDesugaringKind

6 years agoAuto merge of #43864 - GuillaumeGomez:static-method-invalid-use, r=eddyb
bors [Wed, 16 Aug 2017 23:40:01 +0000 (23:40 +0000)]
Auto merge of #43864 - GuillaumeGomez:static-method-invalid-use, r=eddyb

Add help for static method invalid use

Fixes #30391.