]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/extern-method.rs
Merge remote-tracking branch 'miri/upstream' into miri
[rust.git] / src / test / rustdoc / extern-method.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // aux-build:rustdoc-extern-method.rs
12 // ignore-cross-compile
13
14 #![feature(unboxed_closures)]
15
16 extern crate rustdoc_extern_method as foo;
17
18 // @has extern_method/trait.Foo.html //pre "pub trait Foo"
19 // @has - '//*[@id="tymethod.foo"]//code' 'extern "rust-call" fn foo'
20 // @has - '//*[@id="method.foo_"]//code' 'extern "rust-call" fn foo_'
21 pub use foo::Foo;
22
23 // @has extern_method/trait.Bar.html //pre "pub trait Bar"
24 pub trait Bar {
25     // @has - '//*[@id="tymethod.bar"]//code' 'extern "rust-call" fn bar'
26     extern "rust-call" fn bar(&self, _: ());
27     // @has - '//*[@id="method.bar_"]//code' 'extern "rust-call" fn bar_'
28     extern "rust-call" fn bar_(&self, _: ()) { }
29 }