Skip to content

Commit 2883fe2

Browse files
committed
Add unsafe_destructor_blind_to_params attr to Vec and TypedArena.
Necessary for `rustc` to bootstrap. Note that this is not sufficient for `make check`.
1 parent 3ff9137 commit 2883fe2

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/libarena/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@
3838
#![feature(ptr_as_ref)]
3939
#![feature(raw)]
4040
#![feature(staged_api)]
41+
#![feature(unsafe_destructor_blind_to_params)]
4142
#![cfg_attr(test, feature(test))]
4243

44+
// SNAP ba0e1cd
45+
#![allow(unused_features)]
46+
// SNAP ba0e1cd
47+
#![allow(unused_attributes)]
48+
4349
extern crate alloc;
4450

4551
use std::cell::{Cell, RefCell};
@@ -512,6 +518,7 @@ impl<T> TypedArena<T> {
512518
}
513519

514520
impl<T> Drop for TypedArena<T> {
521+
#[unsafe_destructor_blind_to_params]
515522
fn drop(&mut self) {
516523
unsafe {
517524
// Determine how much was filled.

src/libcollections/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#![allow(trivial_casts)]
3131
#![cfg_attr(test, allow(deprecated))] // rand
3232

33+
// SNAP ba0e1cd
34+
#![allow(unused_features)]
35+
// SNAP ba0e1cd
36+
#![allow(unused_attributes)]
37+
3338
#![feature(alloc)]
3439
#![feature(box_patterns)]
3540
#![feature(box_raw)]
@@ -59,6 +64,7 @@
5964
#![feature(unboxed_closures)]
6065
#![feature(unicode)]
6166
#![feature(unique)]
67+
#![feature(unsafe_destructor_blind_to_params)]
6268
#![feature(unsafe_no_drop_flag, filling_drop)]
6369
#![feature(utf8_error)]
6470
#![cfg_attr(test, feature(rand, test))]

src/libcollections/vec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,7 @@ impl<T: Ord> Ord for Vec<T> {
16511651

16521652
#[stable(feature = "rust1", since = "1.0.0")]
16531653
impl<T> Drop for Vec<T> {
1654+
#[unsafe_destructor_blind_to_params]
16541655
fn drop(&mut self) {
16551656
// This is (and should always remain) a no-op if the fields are
16561657
// zeroed (when moving out, because of #[unsafe_no_drop_flag]).

0 commit comments

Comments
 (0)