Skip to content

Commit d281620

Browse files
Avi-D-coderJacob Hughes
authored and
Jacob Hughes
committed
Test removing unstable default parameter
1 parent a73e7d0 commit d281620

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/ui/stability-attribute/auxiliary/unstable_generic_param.rs

+12
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,15 @@ impl<T> Box2<T, System> {
109109
Self { ptr: &mut t, alloc: System {} }
110110
}
111111
}
112+
113+
#[stable(feature = "stable_test_feature", since = "1.0.0")]
114+
pub struct Box3<T> {
115+
ptr: *mut T,
116+
}
117+
118+
impl<T> Box3<T> {
119+
#[stable(feature = "stable_test_feature", since = "1.0.0")]
120+
pub fn new(mut t: T) -> Self {
121+
Self { ptr: &mut t }
122+
}
123+
}

src/test/ui/stability-attribute/generics-default-stability.rs

+2
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,6 @@ fn main() {
115115

116116
let _: Box2<isize, System> = Box2::new(1); // ok
117117
let _: Box2<isize> = Box2::new(1); // ok
118+
119+
let _: Box3<isize> = Box3::new(1); // ok
118120
}

0 commit comments

Comments
 (0)