Skip to content

Commit 76ce7a0

Browse files
Add test for ?const and ? on the same bound
1 parent eabd51a commit 76ce7a0

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![feature(const_trait_bound_opt_out)]
2+
#![allow(incomplete_features)]
3+
4+
struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
5+
//~^ ERROR `?const` and `?` are mutually exclusive
6+
//~| ERROR `?const` on trait bounds is not yet implemented
7+
8+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: `?const` and `?` are mutually exclusive
2+
--> $DIR/with-maybe-sized.rs:4:13
3+
|
4+
LL | struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
5+
| ^^^^^^^^^^^^^
6+
7+
error: `?const` on trait bounds is not yet implemented
8+
--> $DIR/with-maybe-sized.rs:4:13
9+
|
10+
LL | struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
11+
| ^^^^^^^^^^^^^
12+
13+
error: aborting due to 2 previous errors
14+

0 commit comments

Comments
 (0)