Commit Graph

67296 Commits

Author SHA1 Message Date
kennytm
034cd20f52
Exclude impl Trait functions from everybody_loops.
Fixes #43869.
2017-08-15 14:35:43 +08:00
John Kåre Alsaker
17197c660c Remove fixme 2017-08-15 07:55:06 +02:00
bors
f6a30bd37b Auto merge of #43859 - arielb1:nonfree-block-live, r=nagisa
emit StorageLive for box temporaries

We started emitting StorageDead, so we better emit the corrseponding
StorageLive to avoid problems.

cc #43772 solson/miri#303
2017-08-15 04:32:17 +00:00
Murarth
618ac89d25 Add method String::retain
Behaves like `Vec::retain`, accepting a predicate `FnMut(char) -> bool`
and reducing the string to only characters for which the predicate
returns `true`.
2017-08-14 20:42:26 -07:00
Alex Crichton
b6b9690a76 Fix merge conflicts with gen branch 2017-08-14 20:12:13 -07:00
Alex Crichton
22ebcaca16 Choose another error code 2017-08-14 19:38:32 -07:00
Alex Crichton
1413253a41 Merge remote-tracking branch 'origin/master' into gen 2017-08-14 19:36:13 -07:00
bors
df806275c7 Auto merge of #43872 - frewsxcv:rollup, r=frewsxcv
Rollup of 6 pull requests

- Successful merges: #43756, #43790, #43846, #43848, #43862, #43868
- Failed merges:
2017-08-15 01:43:12 +00:00
steveklabnik
2c6cf22a30 Remove plugins chapter
we don't want to support plugins
2017-08-14 20:33:30 -04:00
Corey Farwell
1259db2fa4 Rollup merge of #43868 - lukaramu:issue-43866, r=steveklabnik
Add missing newline in Deref docs to fix rendering

Fixes #43866.

(Verified locally.)

r? @steveklabnik
2017-08-14 20:28:48 -04:00
Corey Farwell
a3a59a1711 Rollup merge of #43862 - QuietMisdreavus:get-in-line-autohide, r=GuillaumeGomez
rustdoc: put auto-hidden docblock labels in line with the toggle

before:

![image](https://user-images.githubusercontent.com/5217170/29279951-0cf21d86-80df-11e7-86d5-bfd76c5df429.png)

after:

![image](https://user-images.githubusercontent.com/5217170/29279962-18479ce2-80df-11e7-952a-d22cb03965e5.png)

(images taken from `std::heap::AllocErr`)
2017-08-14 20:28:47 -04:00
Corey Farwell
5edcf9bc11 Rollup merge of #43848 - frewsxcv:frewsxcv-stack-size, r=QuietMisdreavus
Rewrite/reorganize docs for stack size/thread names for spawned threads.

* Moves docs about stack size and thread naming from `Builder` to the
  `std::thread` module
* Adds more links to the new module-level documentation
* Mentions the 2 MiB stack size default, but indicate it's subject to
  change

Fixes https://github.com/rust-lang/rust/issues/43805.
2017-08-14 20:28:46 -04:00
Corey Farwell
c2009536ac Rollup merge of #43846 - frewsxcv:frewsxcv-mailmap, r=Mark-Simulacrum
Remove my mailmap entry.

I no longer want this mailmap entry for myself.
2017-08-14 20:28:45 -04:00
Corey Farwell
b1bdf13e6b Rollup merge of #43790 - steveklabnik:rustdoc-passes, r=QuietMisdreavus
Write the "passes" chapter of the rustdoc book

cc #42322

r? @rust-lang/docs
2017-08-14 20:28:44 -04:00
Corey Farwell
337389741f Rollup merge of #43756 - sfackler:instant-nondecreasing, r=alexcrichton
Instant is monotonically nondecreasing

We don't want to guarantee that `Instant::now() != Instant::now()` is
always true since that depends on the speed of the processor and the
resolution of the clock.
2017-08-14 20:28:43 -04:00
bors
56fe3b2ad0 Auto merge of #43858 - arielb1:escaping-default, r=eddyb
remove the "defaulted unit" type bit during writeback

The defaulted unit bit is only relevant for the surrounding inference
context, and can cause trouble, including spurious lints and ICEs,
outside of it.

Fixes #43853.

r? @eddyb
2017-08-14 22:44:09 +00:00
Jeremy Soller
1cc33c07fa Move Redox Dockerfile to disabled directory :( 2017-08-14 15:46:43 -06:00
Jeremy Soller
a3d9c36720 Use scripts to reduce code size 2017-08-14 15:45:54 -06:00
Jeremy Soller
9a76934cea Add redox build to cross 2017-08-14 15:45:54 -06:00
Jeremy Soller
6d8520d638 Add Redox Dockerfile 2017-08-14 15:45:54 -06:00
lukaramu
879107f1a8 Add missing newline in Deref docs to fix rendering
Fixes #43866.
2017-08-14 22:12:33 +02:00
Guillaume Gomez
3af0e4a2ad Remove useless help part 2017-08-14 21:56:55 +02:00
bors
df511d5548 Auto merge of #43826 - kennytm:fix-43796-mis-calculated-spans, r=petrochenkov
Fix "Mis-calculated spans" errors from `-Z save-analysis` + refactoring

Removed the path span extraction methods from `SpanUtils`:

* spans_with_brackets
* spans_for_path_segments
* spans_for_ty_params

Use the `span` fields in `PathSegment` and `TyParam` instead.

(Note that since it processes `ast::Path` not a qualified path (`hir::QPath` / `ast::QSelf`), UFCS path will be flattened: `<Foo as a:🅱️:c::Trait>::D::E::F::g` will be seen as `a:🅱️:c::Trait::D::E::F::g`.)

Fix #43796. Close #41478.

r? @nrc
2017-08-14 19:55:20 +00:00
steveklabnik
7a5ee171c3 Write the "passes" chapter of the rustdoc book
cc #42322
2017-08-14 15:10:56 -04:00
Corey Farwell
659460191d Indicate which stack size option has precedence. 2017-08-14 15:03:31 -04:00
Guillaume Gomez
20167abe90 Add help for static method invalid use 2017-08-14 20:56:54 +02:00
steveklabnik
f7b3610b25 link to the rustdoc book from the main docs 2017-08-14 13:58:21 -04:00
steveklabnik
372414ce38 start building the rustdoc book 2017-08-14 13:56:41 -04:00
bors
f1ca76c497 Auto merge of #43574 - notriddle:master, r=sfackler
Implement `RefCell::replace` and `RefCell::swap`

Tracking issue: #43570
2017-08-14 17:05:02 +00:00
QuietMisdreavus
1f9d032b38 rustdoc: put auto-hidden docblock labels in line with the toggle 2017-08-14 10:54:24 -05:00
bors
0d12553320 Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1
Use hir::ItemLocalId as keys in TypeckTables.

This PR makes `TypeckTables` use `ItemLocalId` instead of `NodeId` as key. This is needed for incremental compilation -- for stable hashing and for being able to persist and reload these tables. The PR implements the most important part of https://github.com/rust-lang/rust/issues/40303.

Some notes on the implementation:
* The PR adds the `HirId` to HIR nodes where needed (`Expr`, `Local`, `Block`, `Pat`) which obviates the need to store a `NodeId -> HirId` mapping in crate metadata. Thanks @eddyb for the suggestion! In the future the `HirId` should completely replace the `NodeId` in HIR nodes.
* Before something is read or stored in one of the various `TypeckTables` subtables, the entry's key is validated via the new `TypeckTables::validate_hir_id()` method. This makes sure that we are not mixing information from different items in a single table.

That last part could be made a bit nicer by either (a) new-typing the table-key and making `validate_hir_id()` the only way to convert a `HirId` to the new-typed key, or (b) just encapsulate sub-table access a little better. This PR, however, contents itself with not making things significantly worse.

Also, there's quite a bit of switching around between `NodeId`, `HirId`, and `DefIndex`. These conversions are cheap except for `HirId -> NodeId`, so if the valued reviewer finds such an instance in a performance critical place, please let me know.

Ideally we convert more and more code from `NodeId` to `HirId` in the future so that there are no more `NodeId`s after HIR lowering anywhere. Then the amount of switching should be minimal again.

r? @eddyb, maybe?
2017-08-14 14:15:06 +00:00
scalexm
d58b40e16b Use an helper struct 2017-08-14 15:07:22 +02:00
scalexm
e1f1798ba9 Handle unwinding, use a loop for arrays 2017-08-14 15:07:21 +02:00
scalexm
df7be435d3 Optimize clone shim for Copy types 2017-08-14 15:07:21 +02:00
scalexm
4e4e55aa77 Rename BuiltinShim -> CloneShim 2017-08-14 15:07:21 +02:00
scalexm
91aa99607f Do not store ty 2017-08-14 15:07:21 +02:00
scalexm
91e99a3215 Add a test 2017-08-14 15:07:21 +02:00
scalexm
f55dafee7e Remove dummy lang items 2017-08-14 15:07:21 +02:00
scalexm
0c3ac648f8 Make Clone a lang item and generate builtin impls.
Fixes #28229.
Fixes #24000.
2017-08-14 15:07:21 +02:00
Michael Woerister
3b92b97bfb Fix unused variable warnings in builds disabled debug-assertions. 2017-08-14 14:56:35 +02:00
John Kåre Alsaker
b045c201b2 Use a DepNode for the generator signature 2017-08-14 14:11:35 +02:00
bors
d49b730157 Auto merge of #43857 - michaelwoerister:fix-impl-trait-closure-vis, r=eddyb
Mark closures return via impl-trait as reachable.

This should fix some of the open `impl trait` issues, like #40839, #43135, and #35870.

r? @eddyb
2017-08-14 11:28:12 +00:00
Ariel Ben-Yehuda
e3495b2cfa emit StorageLive for box temporaries
We started emitting StorageDead, so we better emit the corrseponding
StorageLive to avoid problems.
2017-08-14 14:10:05 +03:00
Ariel Ben-Yehuda
a3a06b1677 remove the "defaulted unit" type bit during writeback
The defaulted unit bit is only relevant for the surrounding inference
context, and can cause trouble, including spurious lints and ICEs,
outside of it.

Fixes #43853.
2017-08-14 13:25:16 +03:00
kennytm
60377e48f0
save-analysis: Remove path span extraction methods from SpanUtils
Use the `span` field in PathSegment and TyParam instead.

Fix #43796. Close #41478.
2017-08-14 18:14:49 +08:00
Michael Woerister
f2df18579b Mark closures return via impl-trait as reachable. 2017-08-14 12:04:52 +02:00
Michael Woerister
6fd7d8586c Fix some merge fallout. 2017-08-14 11:21:34 +02:00
bors
b1ff235490 Auto merge of #43856 - sfackler:no-inline-debug, r=alexcrichton
Don't inline debug methods

The inner methods aren't inlined, so this puts more pressure on LLVM for
literally no benefit.

Closes #43843
2017-08-14 07:50:36 +00:00
John Kåre Alsaker
eff2884e5f Make generator interior types deterministic 2017-08-14 07:23:35 +02:00
bors
bae4fafdfb Auto merge of #43844 - arielb1:literally-nonstandard, r=eddyb
ast_validation: forbid "nonstandard" literal patterns

Since #42886, macros can create "nonstandard" PatKind::Lit patterns,
that contain path expressions instead of the usual literal expr. These
can cause trouble, including ICEs.

We *could* map these nonstandard patterns to PatKind::Path patterns
during HIR lowering, but that would be much effort for little gain, and
I think is too risky for beta. So let's just forbid them during AST
validation.

Fixes #43250.

beta-nominating because regression.
r? @eddyb
2017-08-14 05:05:06 +00:00