Test removing unstable default parameter

This commit is contained in:
Avi Dessauer 2020-07-12 21:02:47 -04:00 committed by Jacob Hughes
parent a73e7d0a4d
commit d281620d8f
2 changed files with 14 additions and 0 deletions

View File

@ -109,3 +109,15 @@ impl<T> Box2<T, System> {
Self { ptr: &mut t, alloc: System {} }
}
}
#[stable(feature = "stable_test_feature", since = "1.0.0")]
pub struct Box3<T> {
ptr: *mut T,
}
impl<T> Box3<T> {
#[stable(feature = "stable_test_feature", since = "1.0.0")]
pub fn new(mut t: T) -> Self {
Self { ptr: &mut t }
}
}

View File

@ -115,4 +115,6 @@ fn main() {
let _: Box2<isize, System> = Box2::new(1); // ok
let _: Box2<isize> = Box2::new(1); // ok
let _: Box3<isize> = Box3::new(1); // ok
}