We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eabd85 commit 395e453Copy full SHA for 395e453
src/librustc/middle/trans/glue.rs
@@ -111,17 +111,14 @@ pub fn get_drop_glue_type(ccx: &CrateContext, t: ty::t) -> ty::t {
111
return ty::mk_i8();
112
}
113
match ty::get(t).sty {
114
- ty::ty_box(typ) if !ty::type_needs_drop(tcx, typ) =>
115
- ty::mk_box(tcx, ty::mk_i8()),
116
-
117
ty::ty_uniq(typ) if !ty::type_needs_drop(tcx, typ)
118
&& ty::type_is_sized(tcx, typ) => {
119
let llty = sizing_type_of(ccx, typ);
120
// `Box<ZeroSizeType>` does not allocate.
121
if llsize_of_alloc(ccx, llty) == 0 {
122
ty::mk_i8()
123
} else {
124
- ty::mk_uniq(tcx, ty::mk_i8())
+ t
125
126
127
_ => t
0 commit comments