Skip to content

Commit ccdb280

Browse files
committed
---
yaml --- r: 273244 b: refs/heads/beta c: f6bbbe1 h: refs/heads/master
1 parent 1dbaad3 commit ccdb280

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: cf0ea786ffb884adbe68455ec0a48de9424614c7
26+
refs/heads/beta: f6bbbe10707504065d80733a6bab81f1f4586df8
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_trans/trans/common.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,13 @@ pub fn type_is_fat_ptr<'tcx>(cx: &TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
7575
}
7676
}
7777

78-
fn type_is_newtype_immediate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
79-
match ty.sty {
80-
ty::TyStruct(def, substs) => {
81-
let fields = &def.struct_variant().fields;
82-
fields.len() == 1 && {
83-
type_is_immediate(ccx, monomorphize::field_ty(ccx.tcx(), substs, &fields[0]))
84-
}
85-
}
86-
_ => false
87-
}
88-
}
89-
9078
pub fn type_is_immediate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
9179
use trans::machine::llsize_of_alloc;
9280
use trans::type_of::sizing_type_of;
9381

9482
let tcx = ccx.tcx();
9583
let simple = ty.is_scalar() ||
9684
ty.is_unique() || ty.is_region_ptr() ||
97-
type_is_newtype_immediate(ccx, ty) ||
9885
ty.is_simd();
9986
if simple && !type_is_fat_ptr(tcx, ty) {
10087
return true;

0 commit comments

Comments
 (0)