rchaser53
d01ac0d61e
add the logic for when other_ty is FnDef
2019-04-12 23:57:06 +09:00
rchaser53
199b0bad3c
improve error messages
2019-04-12 00:27:46 +09:00
rchaser53
aeb1e39b2b
Merge remote-tracking branch 'origin/master'
2019-04-08 22:03:17 +09:00
Oliver Scherer
01e83943f9
Only run SIMD tests on x86
2019-04-07 21:46:39 +02:00
rchaser53
89eac91e05
Improvement for comparision against fn
2019-04-07 23:15:35 +09:00
Oliver Scherer
65a45dd99d
Add more regression tests for accidental promotion
2019-04-07 08:02:48 +02:00
Oliver Scherer
1f40580f62
Function arguments should never get promoted
2019-04-07 08:02:48 +02:00
bors
dec0a98c4b
Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelix
...
More restrictive 2 phase borrows - take 2
Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow.
(pnkfelix updated description)
cc #56254 , #59159
blocks PR #59114
r? @pnkfelix
cc @RalfJung @nikomatsakis
2019-04-07 00:57:13 +00:00
bors
acd8dd6a50
Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertj
...
Unsized rvalues: implement boxed closure impls. (2nd try)
This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
2019-04-05 17:45:43 +00:00
David Tolnay
cfd31fb4df
Include trailing comma in multiline Debug representation
...
This commit changes the behavior of Formatter::debug_struct,
debug_tuple, debug_list, debug_set, and debug_map to render trailing
commas in {:#?} mode, which is the dominant style in modern Rust code.
Before:
Language {
name: "Rust",
trailing_commas: false
}
After:
Language {
name: "Rust",
trailing_commas: true,
}
2019-04-05 06:45:40 -07:00
Charles Lew
812d89c87d
Fix expectations on some ui test in nll compare mode.
2019-04-05 14:47:20 +08:00
Masaki Hara
45c0b28bcb
Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.
2019-04-05 02:27:05 +08:00
Masaki Hara
4dcd6cc208
Fix failing tests.
2019-04-05 02:27:01 +08:00
Masaki Hara
e55d82c8a3
Fix expectations on some ui tests involving FnOnce.
2019-04-05 02:26:59 +08:00
Masaki Hara
480dcb403c
Add tests for boxed_closure_impls.
2019-04-05 02:26:54 +08:00
Matthew Jasper
b3f62660fe
Adjust the mutable_borrow_reservation_conflict message
...
We aren't sure if this will become an error or not yet.
2019-04-04 18:50:03 +01:00
Felix S. Klock II
800be4c07c
unit test for the lint itself, illustrating that it can be controlled by #[allow(..)] etc.
2019-04-04 18:50:02 +01:00
Felix S. Klock II
9738d7acd8
update unit test output to reflect change to lint-based diagnostic.
2019-04-04 18:50:02 +01:00
Matthew Jasper
c0c3c00c59
Update tests for restrictive two-phase borrows
2019-04-04 18:47:14 +01:00
Matthew Jasper
f8e2beb3d4
Treat two-phase borrow reservations as mutable accesses
2019-04-04 18:47:13 +01:00
bors
e43f99ce57
Auto merge of #59517 - Zoxc:new-queries, r=oli-obk
...
Move query definitions over to the proc macro
r? @oli-obk
2019-04-04 08:26:18 +00:00
Mazdak Farrokhzad
a2f3f0cdb3
Rollup merge of #59166 - seanmonstar:trait-alias-import, r=alexreg
...
resolve: collect trait aliases along with traits
It seems trait aliases weren't being collected as `TraitCandidates` in resolve, this should change that. (I can't compile the full compiler locally, so relying on CI...)
Fixes https://github.com/rust-lang/rust/issues/56485
r? @alexreg
2019-04-02 18:25:12 +02:00
Taylor Cramer
749349fc9f
Refactor async fn return type lowering
...
async fn now lowers directly to an existential type declaration
rather than reusing the `impl Trait` return type lowering.
As part of this, it lowers all argument-position elided lifetimes
using the in-band-lifetimes machinery, creating fresh parameter
names for each of them, using each lifetime parameter as a generic
argument to the generated existential type.
This doesn't currently successfully allow multiple
argument-position elided lifetimes since `existential type`
doesn't yet support multiple lifetimes where neither outlive
the other. This requires a separate fix.
2019-04-01 18:25:57 -07:00
Sean McArthur
3ccd35cd70
resolve all in scope trait aliases, then elaborate their bounds
2019-04-01 11:23:40 -07:00
Mazdak Farrokhzad
d2fd3fe957
Rollup merge of #59041 - saleemjaffer:trait_doc_comment_better_error_msg, r=pnkfelix
...
fixes rust-lang#56766
fixes #56766
2019-04-01 17:29:53 +02:00
Mazdak Farrokhzad
0d01fbaeb8
Rollup merge of #58919 - estebank:impl-trait-return-lifetime, r=pnkfelix
...
Suggest using anonymous lifetime in `impl Trait` return
Fix #48467 .
r? @nikomatsakis
2019-04-01 17:29:51 +02:00
Mazdak Farrokhzad
dffdd8f728
Rollup merge of #58805 - fabric-and-ink:redundant_import, r=petrochenkov
...
Lint for redundant imports
Add lint for redundant imports. The changes are suggested by @petrochenkov.
Closes #10178 .
2019-03-31 19:19:47 +02:00
Esteban Küber
30c247f881
Suggest using anonymous lifetime in impl Trait return without hacks
...
Fallback to `static_impl_trait` for nice error message by peeking at the
return type and the lifetime type. Point at the return type instead of
the return expr/stmt in NLL mode.
2019-03-31 09:11:47 -07:00
Mazdak Farrokhzad
fb8396da84
Rollup merge of #59574 - JohnTitor:distinguish-error-vs-warning, r=Centril
...
Distinguish message for external macros depending on error level
fixes #57716
(I picked you because assigned to this issue.)
r? @estebank
2019-03-31 16:10:38 +02:00
Mazdak Farrokhzad
61222b5731
Rollup merge of #59572 - davidtwco:issue-59508, r=varkor
...
Include bounds in generic re-ordering diagnostic
Fixes #59508 .
r? @estebank
cc @varkor
2019-03-31 16:10:37 +02:00
David Wood
0270d565d9
Only mention const generics if enabled.
...
This commit updates the generic parameter re-ordering diagnostic to only
mention const generics if the feature is enabled.
2019-03-31 00:14:21 +01:00
David Wood
3829746ef9
Include bounds in generic reordering diagnostic.
...
This commit extends the existing generic re-ordering diagnostic to
include any bounds on the generic parameter, thus producing correct
suggestions.
2019-03-31 00:14:21 +01:00
Yuki OKUSHI
45c82abf13
Distinguish depending on error level
...
Remove unnecessary comment
2019-03-31 07:51:31 +09:00
Fabian Drinck
c244c411e4
Handle glob import in redundancy check
2019-03-30 22:37:02 +01:00
Fabian Drinck
df80eae985
Change message to present tense
2019-03-30 22:37:02 +01:00
Fabian Drinck
4a619aa126
Add glob import to redundancy test
2019-03-30 22:37:02 +01:00
Fabian Drinck
0f3b1c0358
Fix tests
2019-03-30 22:37:02 +01:00
Fabian Drinck
6e7b45e12b
Replace REDUNDANT_IMPORT with UNUSED_IMPORTS
2019-03-30 22:37:02 +01:00
Fabian Drinck
f9272364bf
Edit ui tests
2019-03-30 22:37:02 +01:00
Fabian Drinck
8919894c51
Distinguish between imported and defined items
2019-03-30 22:37:02 +01:00
Fabian Drinck
d04e83fe2c
Bless tests
2019-03-30 22:37:02 +01:00
Fabian Drinck
2245d10fac
Improve warning
2019-03-30 22:37:02 +01:00
Fabian Drinck
29d68edc6e
Add lint for redundant imports
...
Co-authored-by: Stephan Schauerte <stephan.schauerte@gmail.com>
2019-03-30 22:37:02 +01:00
John Kåre Alsaker
4558068482
Update tests
2019-03-30 18:43:26 +01:00
Mazdak Farrokhzad
c9dca36a36
Rollup merge of #59463 - pnkfelix:issue-56327-skip-dyn-keyword-lint-under-macros, r=matthewjasper
...
skip dyn keyword lint under macros
This PR is following my own intuition that `rustfix` should never inject bugs into working code (even if that comes at the expense of it failing to fix things that will become bugs).
Fix #56327
2019-03-30 14:14:55 +01:00
Mazdak Farrokhzad
41e64b6c5c
Rollup merge of #59455 - estebank:borrow-sugg-shorthand-field, r=davidtwco
...
Account for short-hand field syntax when suggesting borrow
Fix #52965 .
2019-03-30 07:51:37 +01:00
Mazdak Farrokhzad
c28704c2a8
Rollup merge of #59453 - estebank:recover-tuple-parse, r=petrochenkov
...
Recover from parse error in tuple syntax
2019-03-30 07:51:36 +01:00
Mazdak Farrokhzad
d050a157a8
Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, r=petrochenkov,QuietMisdreavus
...
RFC 2008: Enum Variants
Part of #44109 . See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140 ) for previous discussion.
r? @petrochenkov
cc @nikomatsakis
2019-03-30 07:51:34 +01:00
Esteban Küber
ee2a9d93e9
Suggest using anonymous lifetime in impl Trait return
2019-03-29 13:24:29 -07:00
Esteban Küber
3592079765
revert change to test file as per review request
2019-03-29 06:41:15 -07:00