Commit Graph

109492 Commits

Author SHA1 Message Date
Ralf Jung
39e189d3bd bless tests 2020-03-30 20:26:48 +02:00
Ralf Jung
2117817cfd Miri stacktrace: record span inside frame, not call-site span 2020-03-30 20:15:56 +02:00
bors
2113659479 Auto merge of #70574 - matthiaskrgr:submodule_upd, r=Centril
submodules: update clippy from 70b93aab to e170c849

Changes:
````
rustup  https://github.com/rust-lang/rust/pull/70536
Rustup to https://github.com/rust-lang/rust/pull/70449
readme: move "how to run single lint" instructions to "Allowing/denying lints" section.
git attribute macros not allowed in submodules
Deprecate REPLACE_CONSTS lint
Bump itertools
````

Fixes #70554
2020-03-30 17:54:18 +00:00
Jonas Schievink
12d9f4efaf Assert that the trait ref does not need inference 2020-03-30 19:48:32 +02:00
Jonas Schievink
b00ba382e0 Use query instead of impl_is_default fn 2020-03-30 19:48:32 +02:00
Jonas Schievink
e8910f51d8 Sync Instance::resolve with the projection code 2020-03-30 19:46:15 +02:00
Jonas Schievink
103771ce57 Add a test 2020-03-30 19:44:21 +02:00
Jonas Schievink
49ba323c8d spec. graph: track defining and finalizing impls 2020-03-30 19:44:21 +02:00
Jonas Schievink
a1e7495a41 Simplify NodeItem
The generic parameter is unused, and so is `map`
2020-03-30 19:38:26 +02:00
Bastian Kauschke
a3df1db8ee update tests, improve variable names 2020-03-30 19:34:16 +02:00
Bastian Kauschke
40c5eefdcd add test for array len inference 2020-03-30 19:13:47 +02:00
Bastian Kauschke
7f12561135
dedup docs
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-30 19:09:59 +02:00
Julien Philippon
32103b127f Correct long error message according to reviews 2020-03-30 19:02:01 +02:00
Tomasz Miąsko
6582299cdd Document ThreadSanitizer in unstable-book 2020-03-30 18:45:01 +02:00
Russell Cohen
20e21902bb Clean up redudant conditions and match exprs 2020-03-30 12:39:40 -04:00
Bastian Kauschke
50ab77384e infer arr len from pattern 2020-03-30 18:13:14 +02:00
Matthias Krüger
eef8e4814a submodules: update clippy from 70b93aab to e170c849
Changes:
````
rustup  https://github.com/rust-lang/rust/pull/70536
Rustup to https://github.com/rust-lang/rust/pull/70449
readme: move "how to run single lint" instructions to "Allowing/denying lints" section.
git attribute macros not allowed in submodules
Deprecate REPLACE_CONSTS lint
Bump itertools
````

Fixes #70554
2020-03-30 17:58:14 +02:00
Nikhil Benesch
ac478f2f61
Optimize strip_prefix and strip_suffix with str patterns
Constructing a Searcher in strip_prefix and strip_suffix is
unnecessarily slow when the pattern is a fixed-length string. Add
strip_prefix and strip_suffix methods to the Pattern trait, and add
optimized implementations of these methods in the str implementation.
The old implementation is retained as the default for these methods.
2020-03-30 11:10:21 -04:00
bors
9a12971da5 Auto merge of #70568 - Dylan-DPC:rollup-em6vnpx, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #70479 (avoid creating unnecessary reference in Windows Env iterator)
 - #70546 (Polonius: update to 0.12.1, fix more move errors false positives, update test expectations)
 - #70559 (fix BTreeMap test compilation with Miri)
 - #70567 (Fix broken link in README)

Failed merges:

r? @ghost
2020-03-30 14:25:34 +00:00
Dylan DPC
aaa8aa3181
Rollup merge of #70567 - JOE1994:patch-3, r=Centril
Fix broken link in README

Fix broken link to `rustc-dev-guide` section for `codegen`
2020-03-30 16:24:52 +02:00
Dylan DPC
298a89bff3
Rollup merge of #70559 - RalfJung:btree-test-miri, r=Mark-Simulacrum
fix BTreeMap test compilation with Miri

This got broken by https://github.com/rust-lang/rust/pull/70506
2020-03-30 16:24:51 +02:00
Dylan DPC
b99db6ee10
Rollup merge of #70546 - lqd:polonius_update, r=nikomatsakis
Polonius: update to 0.12.1, fix more move errors false positives, update test expectations

This PR:
- updates `polonius-engine` to version 0.12.1 to fix some move errors false positives
- fixes a fact generation mistake creating the other move errors false positives
- updates the test expectations for the polonius compare-mode so that all (minus the 2 OOMs) ui tests pass again (matching the [analysis doc](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) starting at case 34)

In my opinion, this is safe to rollup.

r? @nikomatsakis
2020-03-30 16:24:49 +02:00
Dylan DPC
47ffca296a
Rollup merge of #70479 - RalfJung:win-env, r=Mark-Simulacrum
avoid creating unnecessary reference in Windows Env iterator

Discovered in https://github.com/rust-lang/miri/pull/1225: the Windows `Env` iterator violates Stacked Borrows by creating an `&u16`, turning it into a raw pointer, and then accessing memory outside the range of that type.

There is no need to create a reference here in the first place, so the fix is trivial.
Cc @JOE1994
Cc https://github.com/rust-lang/unsafe-code-guidelines/issues/134
2020-03-30 16:24:44 +02:00
Youngsuk Kim
60e7473bdf
Fix broken link in README 2020-03-30 10:09:51 -04:00
Tshepang Lekhonkhobe
d6f71f0c9a remove obsolete comment
Made obsolete by b5e35b128e
2020-03-30 13:38:17 +02:00
Mazdak Farrokhzad
9f86d28537 try_resolve_as_non_binding: span_bug -> delay_span_bug 2020-03-30 13:23:26 +02:00
Ralf Jung
032d3cd553 fix BTreeMap test compilation with Miri 2020-03-30 12:04:05 +02:00
bors
a80ec3b3b1 Auto merge of #70326 - matthiaskrgr:cl1ppy_single_match, r=Centril
Use if let instead of match when only matching a single variant (clippy::single_match)

Makes code more compact and reduces nesting.
2020-03-30 09:16:21 +00:00
Matthias Krüger
9bba047c2e Use if let instead of match when only matching a single variant (clippy::single_match)
Makes code more compact and reduces nestig.
2020-03-30 10:52:29 +02:00
Mazdak Farrokhzad
96d7353678 parse_and_disallow_postfix_after_cast: account for ExprKind::Err. 2020-03-30 09:55:57 +02:00
bors
8926bb497d Auto merge of #70536 - Centril:rustc-middle, r=eddyb
Rename `librustc` to `librustc_middle`

Here we rename `librustc` to `librustc_middle`.

This crate is not nearly as large or central as it was previously and so it doesn't make much sense to give it such a central name as `librustc` ("the entry point to the compiler"). Moreover, there is already a `rustc` crate which is has the actual `fn main` of `rustc`, so having `librustc` is confusing relative to that.

r? @eddyb
2020-03-30 05:26:27 +00:00
Mazdak Farrokhzad
2a92839147 rustc -> rustc_middle part 5 -- fix tests 2020-03-30 07:21:44 +02:00
Mazdak Farrokhzad
39f06255d2 rustc -> rustc_middle part 4 -- pacify tidy 2020-03-30 07:19:55 +02:00
Mazdak Farrokhzad
1ccb0b4a02 rustc -> rustc_middle part 3 (rustfmt) 2020-03-30 07:19:55 +02:00
Mazdak Farrokhzad
0cb9e36090 rustc -> rustc_middle part 2 2020-03-30 07:16:56 +02:00
Mazdak Farrokhzad
7710f2dd5c rustc -> rustc_middle part 1 2020-03-30 07:02:56 +02:00
bors
0afdf43dc1 Auto merge of #70449 - ecstatic-morse:visit-body, r=oli-obk
Make `Visitor::visit_body` take a plain `&Body`

`ReadOnlyBodyAndCache` has replaced `&Body` in many parts of the code base that don't care about basic block predecessors. This includes the MIR `Visitor` trait, which I suspect resulted in many unnecessary changes in #64736. This reverts part of that PR to reduce the number of places where we need to pass a `ReadOnlyBodyAndCache`.

In the long term, we should either give `ReadOnlyBodyAndCache` more ergonomic name and replace all uses of `&mir::Body` with it at the cost of carrying an extra pointer everywhere, or use it only in places that actually need access to the predecessor cache. Perhaps there is an even nicer alternative.

r? @Nashenas88
2020-03-30 02:04:00 +00:00
Julien Philippon
8f7eb6229c Add long error code for error E0226 2020-03-30 02:51:25 +02:00
Remy Rakic
5af11d261d bless output of ui test nll/user-annotations/closure-substs.rs
Trivial diagnostics grammar change
2020-03-30 01:30:26 +02:00
Remy Rakic
82424634a3 bless output of ui test impl-trait/multiple-lifetimes/error-handling.rs
Some impl Trait fixes lead to locating more accurately the cause of
a universal region error with a user annotation
2020-03-30 01:28:27 +02:00
Remy Rakic
fcd12bd2f4 bless output of ui test closures/closure-expected-type/expect-region-supply-region.rs
trivial diagnostics grammar change
2020-03-30 01:24:52 +02:00
Remy Rakic
c73d5db21f bless output of ui test nll/outlives-suggestion-simple.rs
trivial diagnostics wording change
2020-03-30 01:22:59 +02:00
Remy Rakic
2a7644746b bless output of ui test hrtb/hrtb-perfect-forwarding.rs
trivial formatting changes
2020-03-30 01:18:27 +02:00
Remy Rakic
860f71f141 Polonius fact generation: fix path access fact location
This will fix the other move errors false positives:
emitting the fact at the start point caused accesses to be at the
same point as an initialization fact of the return place of a call
on the following block, which emitted an error.
2020-03-30 01:13:03 +02:00
Remy Rakic
df1ac67913 update polonius-engine to 0.12.1
This will fix some move errors false positives
2020-03-30 01:11:44 +02:00
bors
4911572b2d Auto merge of #70009 - estebank:sugg-bound, r=Centril
Tweak `suggest_constraining_type_param`

Some of the bound restriction structured suggestions were incorrect while others had subpar output.

The only issue left is a suggestion for an already present bound when dealing with `const`s that should be handled independently.

Fix #69983.
2020-03-29 22:50:59 +00:00
Dylan MacKenzie
538cdef64b Use & to do deref coercion for ReadOnlyBodyAndCache 2020-03-29 13:30:26 -07:00
Esteban Küber
2c71894657 Tweak suggest_constraining_type_param
Some of the bound restriction structured suggestions were incorrect
while others had subpar output.
2020-03-29 13:13:17 -07:00
bors
699f83f525 Auto merge of #70544 - Dylan-DPC:rollup-pj86j17, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #69702 (Rename TyLayout to TyAndLayout.)
 - #70539 (add test for 62220)
 - #70540 (#[link]: mention wasm_import_module instead of cfg)
 - #70541 (prohibit_generics: update has_err for consts)

Failed merges:

r? @ghost
2020-03-29 19:43:24 +00:00
Dylan DPC
800ed0cd5d
Rollup merge of #70541 - lcnr:patch-1, r=varkor
prohibit_generics: update has_err for consts

r? @eddyb
2020-03-29 21:23:55 +02:00