]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Mon, 21 Aug 2017 22:50:00 +0000 (15:50 -0700)]
Merge remote-tracking branch 'origin/master' into gen

6 years agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Mon, 21 Aug 2017 22:45:40 +0000 (15:45 -0700)]
Merge remote-tracking branch 'origin/master' into gen

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 agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Mon, 21 Aug 2017 17:41:56 +0000 (10:41 -0700)]
Merge remote-tracking branch 'origin/master' into gen

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 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 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 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 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 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 agoMake gathering generator interior types O(n log n)
John Kåre Alsaker [Sun, 20 Aug 2017 12:20:33 +0000 (14:20 +0200)]
Make gathering generator interior types O(n log n)

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 agoFix a diagnostic
Alex Crichton [Fri, 18 Aug 2017 16:40:59 +0000 (09:40 -0700)]
Fix a diagnostic

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 agoFix more UI tests
Alex Crichton [Fri, 18 Aug 2017 05:52:04 +0000 (22:52 -0700)]
Fix more UI tests

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 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 agoFix UI tests
Alex Crichton [Thu, 17 Aug 2017 22:20:06 +0000 (15:20 -0700)]
Fix UI tests

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 agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Thu, 17 Aug 2017 20:23:20 +0000 (13:23 -0700)]
Merge remote-tracking branch 'origin/master' into gen

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.

6 years agoadded whitespace
Anthony Defranceschi [Wed, 16 Aug 2017 23:39:23 +0000 (01:39 +0200)]
added whitespace

6 years agoImplement a temp redirect for cargo docs
Carol (Nichols || Goulding) [Wed, 16 Aug 2017 19:37:29 +0000 (15:37 -0400)]
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.

6 years agoFix typo in doc
adrian5 [Wed, 16 Aug 2017 22:46:30 +0000 (00:46 +0200)]
Fix typo in doc

6 years agoAuto merge of #43838 - eddyb:stable-rvalue-promotion, r=arielb1
bors [Wed, 16 Aug 2017 21:00:21 +0000 (21:00 +0000)]
Auto merge of #43838 - eddyb:stable-rvalue-promotion, r=arielb1

Stabilize rvalue promotion to 'static.

Closes #38865.

Documentation PR at rust-lang-nursery/reference#98.

6 years agoE0106: field lifetimes
Anthony Defranceschi [Wed, 16 Aug 2017 20:49:18 +0000 (22:49 +0200)]
E0106: field lifetimes

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

6 years agoUpdate the books for next release
steveklabnik [Wed, 16 Aug 2017 20:08:08 +0000 (16:08 -0400)]
Update the books for next release

6 years agoUpdate jemalloc to 4.5.0
arthurprs [Wed, 16 Aug 2017 20:05:45 +0000 (22:05 +0200)]
Update jemalloc to 4.5.0

6 years agoFix merge conflicts
Alex Crichton [Wed, 16 Aug 2017 20:05:48 +0000 (13:05 -0700)]
Fix merge conflicts

6 years agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Wed, 16 Aug 2017 18:33:10 +0000 (11:33 -0700)]
Merge remote-tracking branch 'origin/master' into gen

6 years agoAuto merge of #43884 - kennytm:fix-43881-do-not-test-i586-msvc, r=alexcrichton
bors [Wed, 16 Aug 2017 18:24:59 +0000 (18:24 +0000)]
Auto merge of #43884 - kennytm:fix-43881-do-not-test-i586-msvc, r=alexcrichton

Stop testing `i586-pc-windows-msvc` on AppVeyor.

Fixes #43881. Reduces AppVeyor test time back to ~2 hours on average.

The i586 libstd was never tested before Aug 13th, so this PR brings the situation back to the previous status-quo.

6 years agoStabilize rvalue promotion to 'static.
Eduard-Mihai Burtescu [Sun, 13 Aug 2017 08:46:49 +0000 (11:46 +0300)]
Stabilize rvalue promotion to 'static.

6 years agoFix merge conflict
Alex Crichton [Wed, 16 Aug 2017 17:27:20 +0000 (10:27 -0700)]
Fix merge conflict

6 years agoMerge remote-tracking branch 'origin/master' into gen
Alex Crichton [Wed, 16 Aug 2017 17:03:47 +0000 (10:03 -0700)]
Merge remote-tracking branch 'origin/master' into gen

6 years agoAuto merge of #43108 - pnkfelix:mir-borrowck3c, r=arielb1
bors [Wed, 16 Aug 2017 15:36:00 +0000 (15:36 +0000)]
Auto merge of #43108 - pnkfelix:mir-borrowck3c, r=arielb1

MIR borrow check (under debug flag)

Here is the current state of MIR borrow check.

It consists of (1.) some refactoring, (2.) a dataflow analysis to identify the borrows themselves, and (3.) a mir "transform" that does the borrow check itself based on the aforementioned dataflow results.

(There's also a drive-by fix to dataflow that I can factor into a separate PR if necessary. Interestingly I could not find a way to observe the bug outside of MIR borrowck.)

To be clear, this branch is not ready to be used as the default borrow check. Thus the code is guarded: To get mir-borrowck to run, you need to either supply an attribute `#[rustc_mir_borrowck]` or a debug flag `-Z borrowck-mir`.

Here are the main issues with the current MIR borrowck as it stands in this PR:

 * No Notes emitted yet, just errors. (So the feedback is definitely inferior compared to AST borrowck today)
 * Lvalue rendering differs between Ast and Mir. (Mostly minor, but replacement of field names with indices is very bad; big priority for me to fix ASAP.)
 * Lots of ICEs (presumably because some MIR operations used here have well-formedness assumptions that are violated in borrowck-broken code)
 * Conflates lots of cases that are distinguished by AST-borrowck
 * Conflates "uninitialized" with "moved" (special case of previous bullet, one that I think should be fixed ASAP)

 (I am hoping to fix as many of the above issues as I can in the near term, but I also would like to land this even if they are *not* all fixed, because the rebasing effort is getting to be a real drag.)

6 years agoDocument that std::hash::Hasher::finish() does not reset the hasher.
Martin Hoffmann [Wed, 16 Aug 2017 15:02:39 +0000 (17:02 +0200)]
Document that std::hash::Hasher::finish() does not reset the hasher.

6 years agoEat open paren when parsing list
Seiichi Uchida [Wed, 16 Aug 2017 14:40:06 +0000 (23:40 +0900)]
Eat open paren when parsing list

6 years agoMoved mir-borrowck pass down to where comments say it should be.
Felix S. Klock II [Wed, 16 Aug 2017 10:36:58 +0000 (12:36 +0200)]
Moved mir-borrowck pass down to where comments say it should be.

Added two fixmes: The `SimplifyBranches` pass cannot stay where it is,
and `BorrowckMir` should be a query, not a pass. But I am going to
leave those changes to a future PR.

6 years agoAddress review comment: `StatementKind::StorageDead` has an effect (running dtors...
Felix S. Klock II [Mon, 14 Aug 2017 12:42:17 +0000 (14:42 +0200)]
Address review comment: `StatementKind::StorageDead` has an effect (running dtors) relevant to borrowck.

6 years agoCleanup: Every `BitDenotation` is a `DataflowOperator`, so build that in.
Felix S. Klock II [Wed, 5 Jul 2017 13:14:12 +0000 (15:14 +0200)]
Cleanup: Every `BitDenotation` is a `DataflowOperator`, so build that in.

Post-rebase: ariel confirmed `SetDiscriminant` should indeed be a mutate.

6 years agoAdded some documentation for the `struct BlockSets` in `rustc_mir::dataflow`.
Felix S. Klock II [Wed, 5 Jul 2017 13:11:23 +0000 (15:11 +0200)]
Added some documentation for the `struct BlockSets` in `rustc_mir::dataflow`.

6 years agoMIR based borrow check (opt-in).
Felix S. Klock II [Wed, 5 Jul 2017 12:52:18 +0000 (14:52 +0200)]
MIR based borrow check (opt-in).

One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute
to opt into MIR based borrow checking.

Note that regardless of whether one opts in or not, AST-based borrow
check will still run as well.  The errors emitted from AST-based
borrow check will include a "(Ast)" suffix in their error message,
while the errors emitted from MIR-based borrow check will include a
"(Mir)" suffix.

post-rebase: removed check for intra-statement mutual conflict;
replaced with assertion checking that at most one borrow is generated
per statement.

post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.

6 years agoFactored `MoveData` construction code into `builder` submodule.
Felix S. Klock II [Tue, 4 Jul 2017 13:57:55 +0000 (15:57 +0200)]
Factored `MoveData` construction code into `builder` submodule.

6 years agoMove `DataFlowState::{each_bit,interpret_set}` method definitions to parent module.
Felix S. Klock II [Tue, 4 Jul 2017 13:12:11 +0000 (15:12 +0200)]
Move `DataFlowState::{each_bit,interpret_set}` method definitions to parent module.

Refactored `each_bit`, which traverses a `IdxSet`, so that the bulk of
its implementation lives in `rustc_data_structures`.

6 years agoremove now unnecessary constraint on BitDenotation for `fn do_dataflow`.
Felix S. Klock II [Tue, 4 Jul 2017 11:16:01 +0000 (13:16 +0200)]
remove now unnecessary constraint on BitDenotation for `fn do_dataflow`.

6 years agoMigrated some code out of `dataflow::drop_flag_effects` and into its parent module.
Felix S. Klock II [Tue, 4 Jul 2017 10:38:48 +0000 (12:38 +0200)]
Migrated some code out of `dataflow::drop_flag_effects` and into its parent module.

(This code is more general purpose than just supporting drop flag elaboration.)

6 years agoAdded dataflow analysis for `Borrows`.
Felix S. Klock II [Mon, 3 Jul 2017 16:40:20 +0000 (18:40 +0200)]
Added dataflow analysis for `Borrows`.

post-rebase: addressed review comment: rename `loc_map`/`location_map` and `rgn_map`/`region_map`.

post-rebase: remove now unnecessary `mut` decl.

post-rebase: address comments: bind iterator expr, and alpha-rename `loc`/`location` and `idx`/`index`.