rust/tests/ui/issues/issue-7575.rs

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

18 lines
250 B
Rust
Raw Normal View History

//@ run-pass
2024-02-07 02:42:01 +00:00
trait Foo { //~ WARN trait `Foo` is never used
fn new() -> bool { false }
fn dummy(&self) { }
}
trait Bar {
fn new(&self) -> bool { true }
}
impl Bar for isize {}
impl Foo for isize {}
fn main() {
2015-01-25 21:05:03 +00:00
assert!(1.new());
}