Skip to content

Commit 5aba1b2

Browse files
committed
---
yaml --- r: 273724 b: refs/heads/beta c: d0f74b6 h: refs/heads/master
1 parent 554f32d commit 5aba1b2

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 0e3a2c01679f1b86df01c739ce8299c687e5c7b6
26+
refs/heads/beta: d0f74b605942849b647b0e262fbda1969bd73c2a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustdoc/clean/mod.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,18 +1892,11 @@ impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> {
18921892
Item {
18931893
source: Span::empty(),
18941894
name: Some(field.name.clean(cx)),
1895-
attrs: Vec::new(),
1895+
attrs: cx.tcx().get_attrs(field.did).clean(cx),
18961896
visibility: Some(field.vis),
1897-
// FIXME: this is not accurate, we need an id for
1898-
// the specific field but we're using the id
1899-
// for the whole variant. Thus we read the
1900-
// stability from the whole variant as well.
1901-
// Struct variants are experimental and need
1902-
// more infrastructure work before we can get
1903-
// at the needed information here.
1904-
def_id: self.did,
1905-
stability: get_stability(cx, self.did),
1906-
deprecation: get_deprecation(cx, self.did),
1897+
def_id: field.did,
1898+
stability: get_stability(cx, field.did),
1899+
deprecation: get_deprecation(cx, field.did),
19071900
inner: StructFieldItem(
19081901
TypedStructField(field.unsubst_ty().clean(cx))
19091902
)
@@ -1916,7 +1909,7 @@ impl<'tcx> Clean<Item> for ty::VariantDefData<'tcx, 'static> {
19161909
name: Some(self.name.clean(cx)),
19171910
attrs: inline::load_attrs(cx, cx.tcx(), self.did),
19181911
source: Span::empty(),
1919-
visibility: Some(hir::Public),
1912+
visibility: Some(hir::Inherited),
19201913
def_id: self.did,
19211914
inner: VariantItem(Variant { kind: kind }),
19221915
stability: get_stability(cx, self.did),

branches/beta/src/test/rustdoc/issue-32395.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414

1515
// @has variant_struct/enum.Foo.html
1616
// @!has - 'pub qux'
17+
// @!has - 'pub Bar'
1718
extern crate variant_struct;
1819

1920
// @has issue_32395/enum.Foo.html
2021
// @!has - 'pub qux'
22+
// @!has - 'pub Bar'
2123
pub use variant_struct::Foo;

0 commit comments

Comments
 (0)