mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-20 04:04:29 -04:00
74e843c833
Stopped being used in CSS with
73d0f7c7b6
17 lines
333 B
Rust
17 lines
333 B
Rust
#![crate_name = "foo"]
|
|
|
|
// @has foo/fn.bar.html
|
|
// @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub const fn bar() -> '
|
|
/// foo
|
|
pub const fn bar() -> usize {
|
|
2
|
|
}
|
|
|
|
// @has foo/struct.Foo.html
|
|
// @has - '//*[@class="method"]' 'const fn new()'
|
|
pub struct Foo(usize);
|
|
|
|
impl Foo {
|
|
pub const fn new() -> Foo { Foo(0) }
|
|
}
|