Fixes for #8625 to prevent assigning to `&mut` in borrowed or aliasable locations. The old code was insufficient in that it failed to catch bizarre cases like `& &mut &mut`.
r? @pnkfelix
sp: span,
defn: ast::def)
-> ty_param_bounds_and_ty {
-
match defn {
- ast::def_arg(nid, _) | ast::def_local(nid, _) | ast::def_self(nid, _) |
+ ast::def_arg(nid, _) | ast::def_local(nid, _) | ast::def_self(nid) |
ast::def_binding(nid, _) => {
let typ = fcx.local_ty(sp, nid);
return no_params(typ);