]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/extern-method.rs
Rollup merge of #87354 - Wind-River:2021_master, r=kennytm
[rust.git] / src / test / rustdoc / extern-method.rs
1 // aux-build:rustdoc-extern-method.rs
2 // ignore-cross-compile
3
4 #![feature(unboxed_closures)]
5
6 extern crate rustdoc_extern_method as foo;
7
8 // @has extern_method/trait.Foo.html //pre "pub trait Foo"
9 // @has - '//*[@id="tymethod.foo"]//h4[@class="code-header"]' 'extern "rust-call" fn foo'
10 // @has - '//*[@id="method.foo_"]//h4[@class="code-header"]' 'extern "rust-call" fn foo_'
11 pub use foo::Foo;
12
13 // @has extern_method/trait.Bar.html //pre "pub trait Bar"
14 pub trait Bar {
15     // @has - '//*[@id="tymethod.bar"]//h4[@class="code-header"]' 'extern "rust-call" fn bar'
16     extern "rust-call" fn bar(&self, _: ());
17     // @has - '//*[@id="method.bar_"]//h4[@class="code-header"]' 'extern "rust-call" fn bar_'
18     extern "rust-call" fn bar_(&self, _: ()) { }
19 }