rust/tests/ui/traits/method-argument-mismatch-variance-ice-119867.rs

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

14 lines
305 B
Rust
Raw Normal View History

2024-01-12 16:33:13 +00:00
trait Deserialize {
fn deserialize(&self);
}
struct ArchivedVec<T>(T);
impl<T> Deserialize for ArchivedVec<T> {
fn deserialize(s: _) {}
//~^ ERROR: `_` is not allowed within types on item signatures
//~| ERROR: has a `&self` declaration in the trait, but not in the impl
}
fn main() {}