106330 Commits

Author SHA1 Message Date
Esteban Küber
cb6dfeaf61 Suggest ?Sized on type parameters 2020-02-02 11:53:10 -08:00
Esteban Küber
542130bde9 add tests for structured suggestion 2020-02-02 11:53:10 -08:00
Esteban Küber
a52ec87a17 Use more appropriate spans on object unsafe traits and provide structured suggestions when possible 2020-02-02 11:53:10 -08:00
Esteban Küber
413bfa4b98 Wording changes to object unsafe trait errors
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02 11:53:10 -08:00
Esteban Küber
3ca1c5d5b5 Point at Sized requirements
Make #47990 easier to understand
2020-02-02 11:53:10 -08:00
Esteban Küber
06fea92356 review comments 2020-02-02 11:53:10 -08:00
Esteban Küber
132921bc52 Remove duplicated code 2020-02-02 11:53:10 -08:00
Esteban Küber
144e259445 Slight rewording of diagnostic message 2020-02-02 11:53:10 -08:00
Esteban Küber
6870f79e9c Use more accurate failed predicate spans 2020-02-02 11:53:09 -08:00
Esteban Küber
8d48597b76 Point at return type obligations instead of at fn ident 2020-02-02 11:52:34 -08:00
Esteban Küber
972ae5afe5 Point at the Sized obligation in where clauses 2020-02-02 11:52:34 -08:00
Esteban Küber
4b2f1db6e4 Tweak Self: Sized restriction diagnostic output 2020-02-02 11:52:34 -08:00
Esteban Küber
d137b7ac11 review comments 2020-02-02 11:52:34 -08:00
Esteban Küber
0eb29d1a44 fix test 2020-02-02 11:52:34 -08:00
Esteban Küber
d72bcdb42c When object unsafe trait uses itself in associated item suggest using Self 2020-02-02 11:52:34 -08:00
Esteban Küber
1c9242f83f Point at Sized bound 2020-02-02 11:52:34 -08:00
Esteban Küber
fca5c64abd Point at arguments or output when fn obligations come from them, or ident when they don't 2020-02-02 11:52:33 -08:00
Ralf Jung
ee60158440 add raw-addr-of variant to mir_raw_fat_ptr 2020-02-02 20:51:24 +01:00
bors
f43c34a134 Auto merge of #68774 - RalfJung:miri, r=RalfJung
bump Miri

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

Cc @oli-obk r? @ghost
2020-02-02 16:58:49 +00:00
Guillaume Gomez
019ca55b45
Clean up E0263 explanation 2020-02-02 15:28:18 +01:00
Ralf Jung
8c5bec103f bump Miri 2020-02-02 14:51:30 +01:00
bors
994e5e7465 Auto merge of #68771 - Centril:rollup-zllcup9, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #68733 (Update option.rs)
 - #68760 (Issue error on `compile-fail` header in UI test)
 - #68763 (Do not suggest duplicate bounds)
 - #68764 (parser: syntactically allow `self` in all `fn` contexts)
 - #68769 (parser: avoid re-wrapping NtItem)

Failed merges:

r? @ghost
2020-02-02 13:16:43 +00:00
Mazdak Farrokhzad
011fb23c58
Rollup merge of #68769 - Centril:unwrap, r=petrochenkov
parser: avoid re-wrapping NtItem

r? @petrochenkov
2020-02-02 14:15:53 +01:00
Mazdak Farrokhzad
5951cd3dda
Rollup merge of #68764 - Centril:self-semantic, r=petrochenkov
parser: syntactically allow `self` in all `fn` contexts

Part of https://github.com/rust-lang/rust/pull/68728.

`self` parameters are now *syntactically* allowed as the first parameter irrespective of item context (and in function pointers). Instead, semantic validation (`ast_validation`) is used.

r? @petrochenkov
2020-02-02 14:15:52 +01:00
Mazdak Farrokhzad
2e1790dda1
Rollup merge of #68763 - JohnTitor:do-not-sugg-dup-bounds, r=estebank
Do not suggest duplicate bounds

Fixes #68205
Fixes #68695

r? @estebank
2020-02-02 14:15:51 +01:00
Mazdak Farrokhzad
3a7f1edd81
Rollup merge of #68760 - Tyg13:compile_fail_ui_test, r=Centril
Issue error on `compile-fail` header in UI test

Fixes #68732

r? @Centril
2020-02-02 14:15:49 +01:00
Mazdak Farrokhzad
f2cc0cc09d
Rollup merge of #68733 - cata0309:patch-1, r=Dylan-DPC
Update option.rs

I updated the example of the `expect` examples so they won't contain depressing sentences any more !
2020-02-02 14:15:48 +01:00
Mazdak Farrokhzad
d154bef4d3 parser: avoid re-wrapping NtItem 2020-02-02 13:55:45 +01:00
Mazdak Farrokhzad
71a6f58229 parser: address review comments re. self. 2020-02-02 13:32:37 +01:00
Matthew Jasper
a606ffdb17 Avoid exponential behaviour when relating types 2020-02-02 12:10:08 +00:00
Yuki Okushi
56ad8bcfe0 Do not suggest duplicate bounds 2020-02-02 18:38:23 +09:00
Mazdak Farrokhzad
8674efdb7c parser: move restrictions re. self to ast_validation. 2020-02-02 10:33:55 +01:00
bors
cef6894572 Auto merge of #68737 - Centril:fix-68710, r=petrochenkov
pretty: print attrs in struct expr

Fixes https://github.com/rust-lang/rust/issues/68710 by printing the attributes on struct expression fields.

r? @petrochenkov
cc @dtolnay
2020-02-02 09:19:40 +00:00
Mazdak Farrokhzad
00f0b0cd3a pretty: print attrs in struct expr 2020-02-02 09:25:54 +01:00
Friedrich von Never
b0a9e949e7
Strip unnecessary subexpression
It became unnecessary since a06baa56b95674fc626b3c3fd680d6a65357fe60 reformatted the file.
2020-02-02 15:08:46 +07:00
Tyler Lanphear
f6c3894724 compiletest: error if compile-fail header in ui test. 2020-02-02 02:08:30 -05:00
bors
0cbcb17d33 Auto merge of #68754 - JohnTitor:clippy-up, r=JohnTitor
Update Clippy

Fixes #68745

r? @ghost
2020-02-02 06:09:00 +00:00
Tyler Lanphear
9fa54e594b stdarch: update submodule. 2020-02-01 22:04:18 -05:00
bors
bc4a339064 Auto merge of #68672 - jonas-schievink:dedup-witness, r=Zoxc
Deduplicate types in the generator witness

For the `await-call-tree` benchmark this often reduces the types inside the witness from 12 to 2.
2020-02-02 03:02:41 +00:00
David Ross
410114b9d2 Add tests for issue 59191 2020-02-01 18:59:11 -08:00
David Ross
276734d6a4 Fix 59191
This adds an explicit error for when macros replace the crate root with
a non-module item.
2020-02-01 18:58:40 -08:00
Yuki Okushi
c377ed606c Fix ICE with save-analysis 2020-02-02 09:23:47 +09:00
Yuki Okushi
ae22bf9d42 Catch more ICEs 2020-02-02 09:02:54 +09:00
Yuki Okushi
632d75e057 Update Clippy 2020-02-02 08:38:28 +09:00
bors
e5b150edaf Auto merge of #68752 - JohnTitor:rollup-zz3u4xl, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #68460 (Use BufWriter for emitting MIR)
 - #68681 (Suggest path separator for single-colon typos)
 - #68688 ([docs] remind bug reporters to update nightly)
 - #68704 (Ignore `build` dir formatting)
 - #68727 (Remove a comment about pretty printer in formatting tests)
 - #68736 (Remove `Alloc` in favor of `AllocRef`)
 - #68740 (Do not suggest things named underscore)

Failed merges:

r? @ghost
2020-02-01 23:31:51 +00:00
Yuki Okushi
87bb0c4389
Rollup merge of #68740 - JohnTitor:do-not-sugg-underscore, r=Centril
Do not suggest things named underscore

Fixes #68719

r? @estebank
2020-02-02 08:30:21 +09:00
Yuki Okushi
c7332abee2
Rollup merge of #68736 - TimDiekmann:remove-alloc, r=Amanieu
Remove `Alloc` in favor of `AllocRef`

`AllocRef` was reexported as `Alloc` in #68529  in order to not break toolstate in the week before the next stable release.

r? @Amanieu
2020-02-02 08:30:19 +09:00
Yuki Okushi
1529126411
Rollup merge of #68727 - xfix:remove-comment-about-pretty-printer-in-format-tests, r=jonas-schievink
Remove a comment about pretty printer in formatting tests

rustc is now using rustfmt, not the old formatter.
2020-02-02 08:30:18 +09:00
Yuki Okushi
44dc4c2617
Rollup merge of #68704 - jonas-schievink:ignore-build-fmt, r=Mark-Simulacrum
Ignore `build` dir formatting

I've noticed that rustfmt tries to parse and check the formatting of code in `build` if `.git` is missing (which includes test artifacts and generated code). This should fix that.
2020-02-02 08:30:16 +09:00
Yuki Okushi
518ed67ab1
Rollup merge of #68688 - jbr:remind-bug-reporters-to-update-if-on-nightly, r=centril
[docs] remind bug reporters to update nightly

Hi and thanks for rust! Today I reported a bug in nightly that was already fixed, so I thought other potential bug reporters might appreciate a reminder to update before reporting.  I wasn't sure if this would apply for other channels as well.
2020-02-02 08:30:15 +09:00