rust/tests/ui/traits/impl-can-not-have-untraitful-items.rs

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

10 lines
267 B
Rust
Raw Normal View History

trait A { }
impl A for isize {
const BAR: () = (); //~ ERROR const `BAR` is not a member of trait `A`
type Baz = (); //~ ERROR type `Baz` is not a member of trait `A`
fn foo(&self) { } //~ ERROR method `foo` is not a member of trait `A`
}
fn main() { }