82017b8416
Exit with a fatal error, instead of recording a non-fatal error, when we encounter an impl method that's static when its corresponding trait method isn't (or vice versa). This is because code later on in the typechecker will expect the staticness of the two methods to be consistent and ICE otherwise. r=nmatsakis Closes #3969
11 lines
164 B
Rust
11 lines
164 B
Rust
|
|
trait foo {
|
|
static fn bar();
|
|
}
|
|
|
|
impl int: foo {
|
|
fn bar() {} //~ ERROR method `bar` is declared as static in its trait, but not in its impl
|
|
}
|
|
|
|
fn main() {}
|