|
| 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 | +#![crate_name = "foo"] |
| 12 | + |
| 13 | +// @has foo/struct.Foo0.html |
| 14 | +pub struct Foo0; |
| 15 | + |
| 16 | +impl Foo0 { |
| 17 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.1: fn_with_doc' |
| 18 | + // @has - 'fn_with_doc short' |
| 19 | + // @has - 'fn_with_doc full' |
| 20 | + /// fn_with_doc short |
| 21 | + /// |
| 22 | + /// fn_with_doc full |
| 23 | + #[deprecated(since = "1.0.1", note = "fn_with_doc")] |
| 24 | + pub fn fn_with_doc() {} |
| 25 | + |
| 26 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.2: fn_without_doc' |
| 27 | + #[deprecated(since = "1.0.2", note = "fn_without_doc")] |
| 28 | + pub fn fn_without_doc() {} |
| 29 | +} |
| 30 | + |
| 31 | +pub trait Bar { |
| 32 | + /// fn_empty_with_doc short |
| 33 | + /// |
| 34 | + /// fn_empty_with_doc full |
| 35 | + #[deprecated(since = "1.0.3", note = "fn_empty_with_doc")] |
| 36 | + fn fn_empty_with_doc(); |
| 37 | + |
| 38 | + #[deprecated(since = "1.0.4", note = "fn_empty_without_doc")] |
| 39 | + fn fn_empty_without_doc(); |
| 40 | + |
| 41 | + /// fn_def_with_doc short |
| 42 | + /// |
| 43 | + /// fn_def_with_doc full |
| 44 | + #[deprecated(since = "1.0.5", note = "fn_def_with_doc")] |
| 45 | + fn fn_def_with_doc() {} |
| 46 | + |
| 47 | + #[deprecated(since = "1.0.6", note = "fn_def_without_doc")] |
| 48 | + fn fn_def_without_doc() {} |
| 49 | + |
| 50 | + /// fn_def_def_with_doc short |
| 51 | + /// |
| 52 | + /// fn_def_def_with_doc full |
| 53 | + #[deprecated(since = "1.0.7", note = "fn_def_def_with_doc")] |
| 54 | + fn fn_def_def_with_doc() {} |
| 55 | + |
| 56 | + #[deprecated(since = "1.0.8", note = "fn_def_def_without_doc")] |
| 57 | + fn fn_def_def_without_doc() {} |
| 58 | +} |
| 59 | + |
| 60 | +// @has foo/struct.Foo1.html |
| 61 | +pub struct Foo1; |
| 62 | + |
| 63 | +impl Bar for Foo1 { |
| 64 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.3: fn_empty_with_doc' |
| 65 | + // @has - 'fn_empty_with_doc_impl short' |
| 66 | + // @has - 'fn_empty_with_doc_impl full' |
| 67 | + /// fn_empty_with_doc_impl short |
| 68 | + /// |
| 69 | + /// fn_empty_with_doc_impl full |
| 70 | + fn fn_empty_with_doc() {} |
| 71 | + |
| 72 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.4: fn_empty_without_doc' |
| 73 | + fn fn_empty_without_doc() {} |
| 74 | + |
| 75 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.5: fn_def_with_doc' |
| 76 | + // @has - 'fn_def_with_doc_impl short' |
| 77 | + // @has - 'fn_def_with_doc_impl full' |
| 78 | + /// fn_def_with_doc_impl short |
| 79 | + /// |
| 80 | + /// fn_def_with_doc_impl full |
| 81 | + fn fn_def_with_doc() {} |
| 82 | + |
| 83 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.6: fn_def_without_doc' |
| 84 | + fn fn_def_without_doc() {} |
| 85 | + |
| 86 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc' |
| 87 | + // @has - 'fn_def_def_with_doc short' |
| 88 | + // @!has - 'fn_def_def_with_doc full' |
| 89 | + |
| 90 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc' |
| 91 | +} |
| 92 | + |
| 93 | +// @has foo/struct.Foo2.html |
| 94 | +pub struct Foo2; |
| 95 | + |
| 96 | +impl Bar for Foo2 { |
| 97 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.3: fn_empty_with_doc' |
| 98 | + // @has - 'fn_empty_with_doc short' |
| 99 | + // @!has - 'fn_empty_with_doc full' |
| 100 | + fn fn_empty_with_doc() {} |
| 101 | + |
| 102 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.4: fn_empty_without_doc' |
| 103 | + // @has - 'fn_empty_without_doc_impl short' |
| 104 | + // @has - 'fn_empty_without_doc_impl full' |
| 105 | + /// fn_empty_without_doc_impl short |
| 106 | + /// |
| 107 | + /// fn_empty_without_doc_impl full |
| 108 | + fn fn_empty_without_doc() {} |
| 109 | + |
| 110 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.5: fn_def_with_doc' |
| 111 | + // @has - 'fn_def_with_doc short' |
| 112 | + // @!has - 'fn_def_with full' |
| 113 | + fn fn_def_with_doc() {} |
| 114 | + |
| 115 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.6: fn_def_without_doc' |
| 116 | + // @has - 'fn_def_without_doc_impl short' |
| 117 | + // @has - 'fn_def_without_doc_impl full' |
| 118 | + /// fn_def_without_doc_impl short |
| 119 | + /// |
| 120 | + /// fn_def_without_doc_impl full |
| 121 | + fn fn_def_without_doc() {} |
| 122 | + |
| 123 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc' |
| 124 | + // @has - 'fn_def_def_with_doc short' |
| 125 | + // @!has - 'fn_def_def_with_doc full' |
| 126 | + |
| 127 | + // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc' |
| 128 | +} |
0 commit comments