diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-06-29 15:56:00 -0700 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-06-29 16:00:54 -0700 |
| commit | 900af2c6d9b21ca1b1db35b7b09b0fb59cf78b84 (patch) | |
| tree | 950dd34f3e2171a26f64072976d5d57ab43e7562 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | b1931e48a01b418b4b1ba6c747f2c99a5b10d96f (diff) | |
| download | rust-900af2c6d9b21ca1b1db35b7b09b0fb59cf78b84.tar.gz rust-900af2c6d9b21ca1b1db35b7b09b0fb59cf78b84.zip | |
lint: default methods must be called on Self to unconditionally recur.
This catches the case when a trait defines a default method that calls
itself, but on a type that isn't necessarily `Self`, e.g. there's no
reason that `T = Self` in the following, so the call isn't necessarily
recursive (`T` may override the call).
trait Bar {
fn method<T: Bar>(&self, x: &T) {
x.method(x)
}
}
Fixes #26333.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
