2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2024-02-07 10:42:01 +08:00
|
|
|
trait Str { fn foo(&self) {} } //~ WARN method `foo` is never used
|
2015-03-30 11:00:05 -07:00
|
|
|
impl Str for str {}
|
|
|
|
impl<'a, S: ?Sized> Str for &'a S where S: Str {}
|
|
|
|
|
2014-12-07 15:22:06 +00:00
|
|
|
fn main() {
|
2019-05-28 14:47:21 -04:00
|
|
|
let _: &dyn Str = &"x";
|
2014-12-07 15:22:06 +00:00
|
|
|
}
|