Files
rust/tests/ui/methods/trait-method-resolution-7575.rs

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

19 lines
299 B
Rust
Raw Normal View History

2025-07-13 16:56:31 -04:00
// https://github.com/rust-lang/rust/issues/7575
//@ run-pass
2024-02-07 10:42:01 +08: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 22:05:03 +01:00
assert!(1.new());
}