--- /dev/null
+#![feature(const_trait_bound_opt_out)]
+#![allow(incomplete_features)]
+
+struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
+//~^ ERROR `?const` and `?` are mutually exclusive
+//~| ERROR `?const` on trait bounds is not yet implemented
+
+fn main() {}
--- /dev/null
+error: `?const` and `?` are mutually exclusive
+ --> $DIR/with-maybe-sized.rs:4:13
+ |
+LL | struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
+ | ^^^^^^^^^^^^^
+
+error: `?const` on trait bounds is not yet implemented
+ --> $DIR/with-maybe-sized.rs:4:13
+ |
+LL | struct S<T: ?const ?Sized>(std::marker::PhantomData<T>);
+ | ^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+