Mazdak Farrokhzad
83b74f2aad
Rollup merge of #61438 - estebank:generics-span, r=varkor
...
Point at individual type args on arg count mismatch
- Point at individual type arguments on arg count mismatch
- Make generics always have a valid span, even when there are no args
- Explain that `impl Trait` introduces an implicit type argument
Fix #55991 .
2019-06-02 15:23:49 +02:00
Mazdak Farrokhzad
5599985caa
Rollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb
...
codegen: change `$6d$` to `$u6d$`
This changes a mistake introduced in #61195 where the mangling
workaround used was incorrect, resolving [this comment](https://github.com/rust-lang/rust/pull/61195#discussion_r289597707 ) from @eddyb.
r? @eddyb
2019-06-02 15:23:47 +02:00
Mazdak Farrokhzad
c748c7b3fe
Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb
...
Fix some issues with `unwrap_usize` instead of `assert_usize`
Fixes https://github.com/rust-lang/rust/issues/61337 .
Fixes https://github.com/rust-lang/rust/issues/61341 .
Fixes https://github.com/rust-lang/rust/issues/61422 .
r? @eddyb
2019-06-02 15:23:46 +02:00
Fabian Drinck
9583398923
Fix typo in AsRef doc
2019-06-02 14:12:06 +02:00
bors
4c7bb8b0d9
Auto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov
...
rustc: remove Res::Upvar.
By keeping track of the current "`body_owner`" (the `DefId` of the current fn/closure/const/etc.) in several passes, `Res::Upvar` and `hir::Upvar` don't need to contain contextual information about the closure.
By leveraging [`indexmap`](https://docs.rs/indexmap ), the list of upvars for a given closure can now also be queried, to check whether a local variable is a closure capture, and so `Res::Upvar` can be merged with `Res::Local`.
And finally, the `tcx.upvars(...)` query now collects upvars from HIR, without relying on `rustc_resolve`.
r? @petrochenkov cc @varkor @davidtwco
2019-06-02 11:46:13 +00:00
Ralf Jung
823ffaa834
update comments
2019-06-02 10:36:18 +02:00
Ralf Jung
2ba7e776b6
FIXME
2019-06-02 10:36:18 +02:00
Ralf Jung
222ed9f571
fix indentation
2019-06-02 10:36:18 +02:00
Ralf Jung
0f96dd51c5
turn comments into doc-comments
2019-06-02 10:36:18 +02:00
Ralf Jung
6dd9389008
fix comments
2019-06-02 10:36:18 +02:00
Ralf Jung
77be06b7ed
no longer assume that there is a default tag: give the machine the chance to tag all allocations
2019-06-02 10:36:18 +02:00
0x1793d1
b3fdde431b
Fix missing semicolon in doc
...
A semicolon is missing in the examples of compile_error.
Macros that expand to items must be delimited with braces or followed by a semicolon.
2019-06-02 10:23:33 +02:00
Ralf Jung
2726a91cca
cache tag for vtable; fn_alloc's don't have a stack nor tag
2019-06-02 10:21:00 +02:00
bors
538e17a3fd
Auto merge of #61384 - varkor:fmin-fmax-llvm-opt, r=alexcrichton
...
Update LLVM to include fmin/fmax optimisations
This will enable us to test if the optimisation issues mentioned in https://github.com/rust-lang/rust/issues/18384 really are fixed. Unfortunately, using the intrinsics immediately is problematic due to the libcore/libstd split (see https://github.com/rust-lang/rust/issues/50145 ).
2019-06-02 04:10:25 +00:00
Esteban Küber
eb73b73b8d
Suggest using as_ref
on *const T
2019-06-01 19:49:20 -07:00
Esteban Küber
31918d6eef
review comments: use param kind type to identify impl Trait
2019-06-01 19:30:13 -07:00
bors
aa5bd03892
Auto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppe
...
rustc_codegen_llvm: a couple builder niceties.
r? @nagisa cc @sunfishcode @rkruppe
2019-06-02 01:12:36 +00:00
varkor
e82cd9528c
Add regression test for #61422
2019-06-02 01:55:46 +01:00
varkor
5a2410a07c
Add error for pattern-matching on arrays without a fixed size
2019-06-02 01:55:46 +01:00
varkor
21551359a5
Use assert_usize
instead of unwrap_usize
in several places
2019-06-02 01:55:44 +01:00
varkor
c2b663c666
Fix unwrapping usize issue with transparent MaybeUnit array wrapper
2019-06-02 01:50:06 +01:00
Chris Gregory
7feeaf0d27
Add test
2019-06-01 19:14:09 -05:00
Chris Gregory
2a3b29ef97
Add anonymous lifetime to Place parameter
2019-06-01 19:06:22 -05:00
Chris Gregory
0a6a5c81ac
Move debug statement into statement visitor
2019-06-01 19:05:18 -05:00
Chris Gregory
a39fffea22
Add self parameter
2019-06-01 19:05:08 -05:00
Chris Gregory
c25b3df3e5
Elide lifetimes not used
...
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-06-01 16:50:15 -07:00
Chris Gregory
911d205b1f
On TerminatorKind::DropAndReplace still handle unused_mut correctly
2019-06-01 18:42:59 -05:00
Esteban Küber
3d0eae18c6
Tweak wording when encountering fn
call in pattern
2019-06-01 16:27:35 -07:00
Esteban Küber
e420f4410b
Account for cases where we can find the type arg name, but the local name is _
2019-06-01 15:33:31 -07:00
Esteban Küber
9616b333b2
review comment: tweak wording
2019-06-01 14:47:15 -07:00
Esteban Küber
e275f2caf6
Extend docstring
2019-06-01 14:13:57 -07:00
bors
03ee55bb1c
Auto merge of #61436 - Manishearth:clippyup, r=Manishearth
...
Update clippy
r? @ghost
2019-06-01 18:58:54 +00:00
Esteban Küber
0754c84611
Explain that impl Trait
introduces an implicit type argument
2019-06-01 11:35:54 -07:00
Eduard-Mihai Burtescu
25d6834493
rustc_codegen_llvm: replace fn noname()
with const UNNAMED
.
2019-06-01 21:13:08 +03:00
Eduard-Mihai Burtescu
268e64641f
rustc_codegen_llvm: pretty up a few builder methods with a macro.
2019-06-01 21:12:42 +03:00
Manish Goregaokar
16bc2c2c5e
Update clippy
2019-06-01 10:50:55 -07:00
Eduard-Mihai Burtescu
f7a4c9d7b5
rustc: collect upvars from HIR, instead of during name resolution.
2019-06-01 20:44:05 +03:00
Esteban Küber
28859472f7
Point at individual type arguments on arg count mismatch
2019-06-01 10:35:31 -07:00
Eduard-Mihai Burtescu
648b4d884d
rustc_resolve: never push ClosureRibKind
to label_ribs
.
2019-06-01 20:28:59 +03:00
Eduard-Mihai Burtescu
ed1bbbb545
rustc: remove Res::Upvar.
2019-06-01 20:28:48 +03:00
Eduard-Mihai Burtescu
340b91e2ff
rustc: remove has_parent
from hir::Upvar
.
2019-06-01 19:17:23 +03:00
Eduard-Mihai Burtescu
a0ca2a2deb
rustc: track the body owner in liveness.
2019-06-01 19:17:23 +03:00
Eduard-Mihai Burtescu
b13d0407d4
rustc: remove closure ID from Res::Upvar.
2019-06-01 19:17:23 +03:00
Eduard-Mihai Burtescu
1768030791
rustc: track the body owner DefId in MC and EUV.
2019-06-01 19:17:23 +03:00
Eduard-Mihai Burtescu
961fe5479f
rustc: use indexmap instead of a plain vector for upvars.
2019-06-01 19:17:22 +03:00
bors
afaf976371
Auto merge of #61350 - RalfJung:alloc, r=oli-obk
...
light refactoring of global AllocMap
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind.
* rename the methods that allocate stuff to have consistent names.
Cc @oli-obk
2019-06-01 16:06:11 +00:00
Eduard-Mihai Burtescu
9fe0052e54
rustc: remove the closure ID from hir::Upvar's parent field.
2019-06-01 19:01:09 +03:00
Eduard-Mihai Burtescu
4b9670a245
rustc: remove the index field from Res::Upvar.
2019-06-01 19:01:09 +03:00
Eduard-Mihai Burtescu
26e61dd826
rustc: replace Res in hir::Upvar with only Local/Upvar data.
2019-06-01 19:01:09 +03:00
bors
cd3f21bc7d
Auto merge of #61388 - Amanieu:hashbrown4, r=alexcrichton
...
Bump hashbrown to 0.4.0
Fixes #61357
This also includes rust-lang/hashbrown#80 .
2019-06-01 11:10:11 +00:00