Skip to content

Commit 3b2ed14

Browse files
committed
Auto merge of #21877 - dotdash:less_auto_deref, r=alexcrichton
2 parents 3d072a1 + a3d2d35 commit 3b2ed14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_trans/trans/expr.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
194194
// a different region or mutability, but we don't care here. It might
195195
// also be just in case we need to unsize. But if there are no nested
196196
// adjustments then it should be a no-op).
197-
Some(ty::AutoPtr(_, _, None)) if adj.autoderefs == 1 => {
197+
Some(ty::AutoPtr(_, _, None)) |
198+
Some(ty::AutoUnsafe(_, None)) if adj.autoderefs == 1 => {
198199
match datum.ty.sty {
199200
// Don't skip a conversion from Box<T> to &T, etc.
200201
ty::ty_rptr(..) => {

0 commit comments

Comments
 (0)