Commit Graph

81037 Commits

Author SHA1 Message Date
Niko Matsakis 5c603e8752 convert tests of `BitVector` to use `BitVector<usize>` 2018-07-26 16:32:13 +03:00
Niko Matsakis fe34c90458 patch up mir-opt tests 2018-07-26 15:12:04 +03:00
Niko Matsakis 687f2526fb move mir_check_* to ui tests, add adjusted references 2018-07-26 08:21:35 +03:00
Niko Matsakis 9f09127f4d fix reference file 2018-07-26 06:21:44 +03:00
Niko Matsakis 118cad13a5 ignore code example in comment 2018-07-25 23:57:59 +03:00
Niko Matsakis 21e4a0834e Nit: improve comment in hr-fn-aau-eq-abu.rs 2018-07-25 16:40:43 +03:00
Niko Matsakis 3171cbe986 Nit: improve Binders comment in `relate_tys` 2018-07-25 16:38:50 +03:00
Niko Matsakis d85a7da8fe Nit: fix Debug impl of `PlaceholderIndex` 2018-07-25 16:37:05 +03:00
Niko Matsakis e43096ff05 [nit] remove outdated comment 2018-07-25 16:36:40 +03:00
Niko Matsakis 0d918a8575 improve heuristics for what makes an interesting constraint 2018-07-25 16:36:03 +03:00
Niko Matsakis 76991ea237 [WIP] debug logs in error-reporting 2018-07-25 16:19:16 +03:00
Niko Matsakis fa69e2183a [3f0fb4f7] improve comment on `to_location` 2018-07-25 16:18:37 +03:00
Niko Matsakis 2acc3e7ce1 add regression test for #48071
Fixes #48071
2018-07-25 06:38:38 +03:00
Niko Matsakis d9afd2bb38 introduce new subtyping 2018-07-25 06:38:22 +03:00
Niko Matsakis b913df06f2 remove `num_universal_regions` etc from RegionValueElements 2018-07-25 06:38:22 +03:00
Niko Matsakis 2584216364 represent `LivenessValues` with a specialized type 2018-07-25 06:38:22 +03:00
Niko Matsakis 2fda456ddf extract `region_value_str` helper 2018-07-25 06:38:21 +03:00
Niko Matsakis f277b394af generate extra liveness constraints before regioncx is created 2018-07-25 06:38:21 +03:00
Niko Matsakis 92786a48f8 consolidate and use `find_sub_region_live_at` for everything
remove the old blame system
2018-07-25 06:38:21 +03:00
Niko Matsakis 078220daa8 extract a `best_blame_constraint` helper 2018-07-25 06:38:21 +03:00
Niko Matsakis 9ba4d33e43 rewrite the "constraint graph search" to use a BFS instead of a DFS
This way we find the shortest path without having to sort etc
2018-07-25 06:38:21 +03:00
Niko Matsakis 4fce59f0fd remove unnecessary `blame_span` from `report_region_errors` 2018-07-25 06:38:20 +03:00
Niko Matsakis 52c94e9dec remove inefficiency for adding all points 2018-07-25 06:38:20 +03:00
Niko Matsakis 7c74518f50 SparseBitMatrix: add `insert_all` and `add_all` methods 2018-07-25 06:38:20 +03:00
Niko Matsakis 71fef95e76 SparseBitMatrix: add `ensure_row` helper fn 2018-07-25 06:38:20 +03:00
Niko Matsakis 3f0fb4f7d8 split into two matrices 2018-07-25 06:38:19 +03:00
Niko Matsakis 40498bae65 simplify `NLLRegionVariableOrigin` 2018-07-25 06:38:19 +03:00
Niko Matsakis 145155dc96 parameterize `BitVector` and `BitMatrix` by their index types 2018-07-25 06:38:19 +03:00
Niko Matsakis a54401ebcc implement `Step` for `Idx` types
This way, we can iterate over a `Range<T>` where `T: Idx`
2018-07-25 00:11:31 +03:00
bors f498e4ec1b Auto merge of #51587 - mark-i-m:at_most_once_rep_2018, r=alexcrichton
2018 edition `?` Kleene operator

This is my first attempt at implementing the migration lint + 2018 behavior as discussed in #48075

r? @nikomatsakis
2018-07-24 15:11:56 +00:00
bors 6a3db033ad Auto merge of #52597 - oli-obk:promotion_simplify, r=nagisa
Promoteds are statics and statics have a place, not just a value

r? @eddyb

This makes everything around promoteds a little simpler
2018-07-24 13:10:06 +00:00
bors a1e6bcb208 Auto merge of #52189 - cuviper:static-box-leak, r=bluss
doc: Clarify the lifetime returned by `Box::leak`

`Box::leak` mentions that it can return a `'static` reference, but it
wasn't immediately clear to me why it doesn't always do so.  This is
because of the `T: 'a` constraint needed to form a valid reference, and
in general we want to be more flexible than requiring `T: 'static`.
This patch tries to clarify the relationship between `T` and `'a`.
2018-07-24 10:46:21 +00:00
bors a2af8667b1 Auto merge of #52646 - ljedrz:single_char_pattern, r=michaelwoerister
Change single char str patterns to chars

A `char` is faster.
2018-07-24 08:24:11 +00:00
bors baba5007bf Auto merge of #52655 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

Successful merges:

 - #52538 (Remove obsolete flags in the i586_musl Dockerfile)
 - #52548 (Cursor: update docs to clarify Cursor only works with in-memory buffers)
 - #52605 (Do not suggest using `to_owned()` on `&str += &str`)
 - #52621 (Fix color detection for Windows msys terminals.)
 - #52622 (Use MultiSpan in E0707 and E709)
 - #52627 (Compile rustc before building tests for rustdoc)
 - #52637 (Don't use NonNull::dangling as sentinel value in Rc, Arc)
 - #52640 (Forget Waker when cloning LocalWaker)
 - #52641 (Simplify 2 functions in rustc_mir/dataflow)
 - #52642 (Replace a few expect+format combos with unwrap_or_else+panic)

Failed merges:

r? @ghost
2018-07-24 03:01:11 +00:00
mark 10ee0f68a6 Allow by default, fix tests 2018-07-23 21:55:51 -05:00
mark 6cb09ccf9f dump lints _after_ parsing macros 2018-07-23 21:55:51 -05:00
mark b206aedb1b make it a migration lint 2018-07-23 21:55:51 -05:00
mark 5d872727e0 Fix test and errors 2018-07-23 21:54:43 -05:00
mark 63c2d06a0d update nightly book 2018-07-23 21:54:43 -05:00
mark 8eb4941e30 Implement 2015 vs 2018 `?` kleene op + test 2018-07-23 21:54:43 -05:00
mark 2a7ae04a68 Extend ParseSess to support buffering lints 2018-07-23 21:54:43 -05:00
kennytm 3efc612a93
Rollup merge of #52642 - ljedrz:expect_fun_call, r=Mark-Simulacrum
Replace a few expect+format combos with unwrap_or_else+panic

That way the error strings won't be created if the related errors are not triggered.
2018-07-24 09:50:00 +08:00
kennytm 378ef99eb3
Rollup merge of #52641 - ljedrz:mir_dataflow_misc, r=cramertj
Simplify 2 functions in rustc_mir/dataflow

- `graphviz::outgoing`: the `enumerate` only provides indices; use a range instead
- `DataflowState::interpret_set`: change a push loop to an iterator and remove the `each_bit` helper function
2018-07-24 09:49:59 +08:00
kennytm b3c9fe2537
Rollup merge of #52640 - Thomasdezeeuw:fix-localwaker-clone, r=cramertj
Forget Waker when cloning LocalWaker

Since NonNull is Copy the inner field of the cloned Waker was copied for
use in the new LocalWaker, however this left Waker to be dropped. Which
means that when cloning LocalWaker would also erroneously call drop_raw.

This change forgets the Waker, rather then dropping it, leaving the
inner field to be used by the returned LocalWaker.

Closes #52629.
2018-07-24 09:49:58 +08:00
kennytm 3af372ad57
Rollup merge of #52637 - RalfJung:rc, r=joshtriplett
Don't use NonNull::dangling as sentinel value in Rc, Arc

Instead, rely on alignment and use usize::MAX as sentinel.

Cc #52508

r? @joshtriplett
2018-07-24 09:49:56 +08:00
kennytm 4084f0ee8a
Rollup merge of #52627 - Mark-Simulacrum:rustdoc-test-correct, r=alexcrichton
Compile rustc before building tests for rustdoc

r? @alexcrichton
2018-07-24 09:49:55 +08:00
kennytm 291a62064c
Rollup merge of #52622 - estebank:lifetime-multispan, r=nikomatsakis
Use MultiSpan in E0707 and E709
2018-07-24 09:49:54 +08:00
kennytm 85bb13c232
Rollup merge of #52621 - ehuss:atty-fix, r=alexcrichton
Fix color detection for Windows msys terminals.

Updates atty to pull in the fix softprops/atty#28.  Closes rust-lang/cargo#5724.
2018-07-24 09:49:53 +08:00
kennytm 5b7e3a1746
Rollup merge of #52605 - estebank:str-plus-eq, r=oli-obk
Do not suggest using `to_owned()` on `&str += &str`

 - Don't provide incorrect suggestion for `&str += &str` (fix #52410)
 - On `&str + String` suggest `&str.to_owned() + &String` as a single suggestion
2018-07-24 09:49:52 +08:00
kennytm a98c19e24b
Rollup merge of #52548 - tko:cursor-doc, r=sfackler
Cursor: update docs to clarify Cursor only works with in-memory buffers

Reduce misconceptions about Cursor being more general than it really is.

Fixes: #52470
2018-07-24 09:49:50 +08:00