File tree 1 file changed +2
-12
lines changed
1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -169,22 +169,12 @@ mod mut_ptr;
169
169
/// i.e., you do not usually have to worry about such issues unless you call `drop_in_place`
170
170
/// manually.
171
171
#[ stable( feature = "drop_in_place" , since = "1.8.0" ) ]
172
- #[ inline( always) ]
173
- pub unsafe fn drop_in_place < T : ?Sized > ( to_drop : * mut T ) {
174
- real_drop_in_place ( & mut * to_drop)
175
- }
176
-
177
- // The real `drop_in_place` -- the one that gets called implicitly when variables go
178
- // out of scope -- should have a safe reference and not a raw pointer as argument
179
- // type. When we drop a local variable, we access it with a pointer that behaves
180
- // like a safe reference; transmuting that to a raw pointer does not mean we can
181
- // actually access it with raw pointers.
182
172
#[ lang = "drop_in_place" ]
183
173
#[ allow( unconditional_recursion) ]
184
- unsafe fn real_drop_in_place < T : ?Sized > ( to_drop : & mut T ) {
174
+ pub unsafe fn drop_in_place < T : ?Sized > ( to_drop : * mut T ) {
185
175
// Code here does not matter - this is replaced by the
186
176
// real drop glue by the compiler.
187
- real_drop_in_place ( to_drop)
177
+ drop_in_place ( to_drop)
188
178
}
189
179
190
180
/// Creates a null raw pointer.
You can’t perform that action at this time.
0 commit comments