Skip to content

Commit 5903163

Browse files
committed
Remove duplicate Trait::auto field
It was exactly the same as `is_auto`.
1 parent 9b2b02a commit 5903163

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/librustdoc/clean/inline.rs

-2
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,13 @@ crate fn build_external_trait(cx: &DocContext<'_>, did: DefId) -> clean::Trait {
193193
let trait_items =
194194
cx.tcx.associated_items(did).in_definition_order().map(|item| item.clean(cx)).collect();
195195

196-
let auto_trait = cx.tcx.trait_def(did).has_auto_impl;
197196
let predicates = cx.tcx.predicates_of(did);
198197
let generics = (cx.tcx.generics_of(did), predicates).clean(cx);
199198
let generics = filter_non_trait_generics(did, generics);
200199
let (generics, supertrait_bounds) = separate_supertrait_bounds(generics);
201200
let is_spotlight = load_attrs(cx, did).clean(cx).has_doc_flag(sym::spotlight);
202201
let is_auto = cx.tcx.trait_is_auto(did);
203202
clean::Trait {
204-
auto: auto_trait,
205203
unsafety: cx.tcx.trait_def(did).unsafety,
206204
generics,
207205
items: trait_items,

src/librustdoc/clean/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,6 @@ impl Clean<Item> for doctree::Trait<'_> {
10241024
stability: cx.stability(self.id),
10251025
deprecation: cx.deprecation(self.id).clean(cx),
10261026
kind: TraitItem(Trait {
1027-
auto: self.is_auto.clean(cx),
10281027
unsafety: self.unsafety,
10291028
items: self.items.iter().map(|ti| ti.clean(cx)).collect(),
10301029
generics: self.generics.clean(cx),

src/librustdoc/clean/types.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,6 @@ impl GetDefId for FnRetTy {
10261026

10271027
#[derive(Clone, Debug)]
10281028
crate struct Trait {
1029-
crate auto: bool,
10301029
crate unsafety: hir::Unsafety,
10311030
crate items: Vec<Item>,
10321031
crate generics: Generics,

src/librustdoc/html/render/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2759,7 +2759,7 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait,
27592759
}
27602760
write_loading_content(w, "</div>");
27612761

2762-
if t.auto {
2762+
if t.is_auto {
27632763
write_small_section_header(
27642764
w,
27652765
"synthetic-implementors",
@@ -2790,7 +2790,7 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait,
27902790
);
27912791
write_loading_content(w, "</div>");
27922792

2793-
if t.auto {
2793+
if t.is_auto {
27942794
write_small_section_header(
27952795
w,
27962796
"synthetic-implementors",
@@ -4454,7 +4454,7 @@ fn sidebar_trait(buf: &mut Buffer, it: &clean::Item, t: &clean::Trait) {
44544454
sidebar.push_str(&sidebar_assoc_items(it));
44554455

44564456
sidebar.push_str("<a class=\"sidebar-title\" href=\"#implementors\">Implementors</a>");
4457-
if t.auto {
4457+
if t.is_auto {
44584458
sidebar.push_str(
44594459
"<a class=\"sidebar-title\" \
44604460
href=\"#synthetic-implementors\">Auto Implementors</a>",

0 commit comments

Comments
 (0)