rust/tests/rustdoc-json/traits/has_body.rs

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

22 lines
792 B
Rust
Raw Permalink Normal View History

//@ has "$.index[?(@.name=='Foo')]"
2021-01-23 20:37:56 -05:00
pub trait Foo {
//@ is "$.index[?(@.name=='no_self')].inner.function.has_body" false
2021-01-23 20:37:56 -05:00
fn no_self();
//@ is "$.index[?(@.name=='move_self')].inner.function.has_body" false
2021-01-23 20:37:56 -05:00
fn move_self(self);
//@ is "$.index[?(@.name=='ref_self')].inner.function.has_body" false
2021-01-23 20:37:56 -05:00
fn ref_self(&self);
//@ is "$.index[?(@.name=='no_self_def')].inner.function.has_body" true
2021-01-23 20:37:56 -05:00
fn no_self_def() {}
//@ is "$.index[?(@.name=='move_self_def')].inner.function.has_body" true
2021-01-23 20:37:56 -05:00
fn move_self_def(self) {}
//@ is "$.index[?(@.name=='ref_self_def')].inner.function.has_body" true
2021-01-23 20:37:56 -05:00
fn ref_self_def(&self) {}
}
pub trait Bar: Clone {
//@ is "$.index[?(@.name=='method')].inner.function.has_body" false
2021-01-23 20:37:56 -05:00
fn method(&self, param: usize);
}