rust/tests/ui/object-safety/assoc_const_bounds.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
269 B
Rust
Raw Normal View History

trait Foo<T> {
const BAR: bool
where //~ ERROR: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found keyword `where`
Self: Sized;
}
trait Cake {}
impl Cake for () {}
fn foo(_: &dyn Foo<()>) {}
fn bar(_: &dyn Foo<i32>) {}
fn main() {}