rustc: Fix mutability checking when dereferencing a region-annotated pointer
This commit is contained in:
parent
4e3e13302d
commit
b12588a197
@ -18,13 +18,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
|
||||
let ds = [], t = t;
|
||||
loop {
|
||||
alt ty::get(t).struct {
|
||||
ty::ty_box(mt) {
|
||||
ds += [@{mutbl: mt.mutbl == m_mutbl,
|
||||
kind: unbox(false),
|
||||
outer_t: t}];
|
||||
t = mt.ty;
|
||||
}
|
||||
ty::ty_uniq(mt) {
|
||||
ty::ty_box(mt) | ty::ty_uniq(mt) | ty::ty_rptr(_, mt) {
|
||||
ds += [@{mutbl: mt.mutbl == m_mutbl,
|
||||
kind: unbox(false),
|
||||
outer_t: t}];
|
||||
|
Loading…
x
Reference in New Issue
Block a user