Skip to content

Commit 6a49e82

Browse files
committed
moved renamed docs formatted stderr | class-method-missing.rs
1 parent d25ce1c commit 6a49e82

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

tests/ui/class-method-missing.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//! Ensures trait implementations provide all required methods.
2+
3+
trait Animal {
4+
fn eat(&self);
5+
}
6+
7+
struct Cat {
8+
meows: usize,
9+
}
10+
11+
impl Animal for Cat {
12+
//~^ ERROR not all trait items implemented, missing: `eat`
13+
}
14+
15+
fn cat(in_x: usize) -> Cat {
16+
Cat { meows: in_x }
17+
}
18+
19+
fn main() {
20+
let nyan = cat(0);
21+
}

tests/ui/class-method-missing.stderr renamed to tests/ui/traits/trait-impl-missing-method.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0046]: not all trait items implemented, missing: `eat`
2-
--> $DIR/class-method-missing.rs:9:1
2+
--> $DIR/trait-impl-missing-method.rs:11:1
33
|
4-
LL | fn eat(&self);
5-
| -------------- `eat` from trait
4+
LL | fn eat(&self);
5+
| -------------- `eat` from trait
66
...
77
LL | impl Animal for Cat {
88
| ^^^^^^^^^^^^^^^^^^^ missing `eat` in implementation

0 commit comments

Comments
 (0)