diff options
| author | bors <bors@rust-lang.org> | 2016-08-11 05:04:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-11 05:04:41 -0700 |
| commit | 42001edc998f3406ecc04afa48bf07ce91247b67 (patch) | |
| tree | 7c29d830bfa0ccd66f2577ef52be3a46aacab5de /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 695b3d8279e17689b988e000203ba95ffeb4a91c (diff) | |
| parent | f37bf6d367c8fb0a69f72ff49b24ad2da67ddbe5 (diff) | |
| download | rust-42001edc998f3406ecc04afa48bf07ce91247b67.tar.gz rust-42001edc998f3406ecc04afa48bf07ce91247b67.zip | |
Auto merge of #35403 - scottcarr:lvalue_refactor, r=nikomatsakis
refactor lvalue_ty to be method of lvalue Currently `Mir` (and `MirContext`) implement a method `lvalue_ty` (and actually many more `foo_ty`). But this should be a method of `Lvalue`. If you have an `lvalue` and you want to get its type, the natural thing to write is: ``` lvalue.ty() ``` Of course it needs context, but still: ``` lvalue.ty(mir, tcx) ``` Makes more sense than ``` mir.lvalue_ty(lvalue, tcx) ``` I actually think we should go a step farther and have traits so we could get the type of some value generically, but that's up for debate. The thing I'm running into a lot in the compiler is I have a value of type `Foo` and I know that there is some related type `Bar` which I can get through some combination of method calls, but it's often not as direct as I would imagine. Unless you already know the code, its not clear why you would look in `Mir` for a method to get the type of an `Lvalue`.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
