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
Mazdak Farrokhzad
bd318be05d
move_ref_pattern: change pov in diagnostics & add binding names
2020-02-02 17:58:15 +01:00
Mazdak Farrokhzad
8d4973f587
move_ref_pattern: don't ICE on unreachable 2xby-move conflicts
2020-02-02 16:07:51 +01: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
0253f868ca
move_ref_pattern: adjust error index
2020-02-02 14:13:07 +01:00
Mazdak Farrokhzad
d984f127f6
move_ref_patterns: introduce tests
...
bindings_after_at: harden tests
2020-02-02 14:13:07 +01:00
Mazdak Farrokhzad
7af9ff3e69
introduce #![feature(move_ref_pattern)]
2020-02-02 14:13:07 +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
Jonas Schievink
9fa46fe153
Teach dropck about resume arguments
2020-02-02 13:20:58 +01:00
Jonas Schievink
aae0f543cf
No resume argument in the drop shim
2020-02-02 13:20:58 +01:00
Jonas Schievink
3bb8ecb512
Adjust mir-opt tests to new yield
lowering
2020-02-02 13:20:58 +01:00
Jonas Schievink
7a9709b08a
Fix bootstrap rustc build
2020-02-02 13:20:58 +01:00
Jonas Schievink
4ee857c4c3
Add test for E0628 (too many generator parameters)
2020-02-02 13:20:57 +01:00
Jonas Schievink
fca614eb57
Add tests for generator resume arguments
2020-02-02 13:20:57 +01:00
Jonas Schievink
5b2059b257
Fix error message on type mismatch in generator
...
Instead of "closure is expected to take 0 arguments"
we now get the expected type mismatch error.
2020-02-02 13:20:57 +01:00
Jonas Schievink
3c22e51e7f
Make generator transform move resume arg around
...
The resume arg is passed as argument `_2` and needs to be moved to the
`Yield`s target `Place`
2020-02-02 13:20:57 +01:00
Jonas Schievink
3c069a066e
Change MIR building to fill in the resume place
...
This changes `Yield` from `as_rvalue` to `into` lowering, which could
have a possible performance impact. I could imagine special-casing
some resume types here to use a simpler lowering for them, but it's
unclear if that makes sense at this stage.
2020-02-02 13:20:57 +01:00
Jonas Schievink
f2c1468965
Add resume arg place to Yield
MIR terminator
2020-02-02 13:20:57 +01:00
Jonas Schievink
2101a1fec0
Adjust tests to type inference changes
...
This makes some error messages ungreat, but those seem to be preexisting
bugs that also apply to closures / return position `impl Trait` in
general.
2020-02-02 13:20:57 +01:00
Jonas Schievink
32005fe195
Allow 0 or 1 explicit generator parameters
2020-02-02 13:20:57 +01:00
Jonas Schievink
8a1227a67b
Infer type of yield
to be resume type
2020-02-02 13:20:57 +01:00
Jonas Schievink
25af2f66ce
Use real resume type as second argument
2020-02-02 13:20:57 +01:00
Jonas Schievink
0117033c72
Add a resume type param to the generator substs
...
...and unify it with `()` for now
2020-02-02 13:20:57 +01:00
Jonas Schievink
044fe0f558
Add a resume type parameter to Generator
2020-02-02 13:20:57 +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