blob: 479037be852f494ebae236373cb6fef201d6a5fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
#![feature(negative_bounds)]
#![feature(sized_hierarchy)]
use std::marker::MetaSized;
fn foo<T: !MetaSized>() {}
fn bar<T: !Sized + MetaSized>() {
foo::<T>();
//~^ ERROR the trait bound `T: !MetaSized` is not satisfied
}
fn main() {
foo::<()>();
//~^ ERROR the trait bound `(): !MetaSized` is not satisfied
foo::<str>();
//~^ ERROR the trait bound `str: !MetaSized` is not satisfied
}
|