Skip to content

Rollup of 19 pull requests #43802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ba53f95
E0122: clarify wording
RalfJung Jul 12, 2017
5067ef2
fix line lengths
RalfJung Jul 12, 2017
5b30cc1
Detect relative urls in tidy check
ruuda Aug 3, 2017
0f924b8
add test
arshiamufti Aug 4, 2017
608863d
Only allow long relative urls after a link label
ruuda Aug 4, 2017
b298a58
Update String Deref to explain why using &String does not always work
natboehm Aug 4, 2017
94f7511
test MIR validation statements in closures
RalfJung Aug 5, 2017
970c780
Reexport all SyntaxExtension variants
oli-obk Aug 7, 2017
49310a9
Stop using URL shortener in docs
ollie27 Aug 7, 2017
2a62b91
Update explanation of deref coercion
natboehm Aug 7, 2017
43760a4
Encode proper spans in crate metadata.
ibabushkin Aug 8, 2017
6c0f2aa
fix assertion - trait object pointers don't have infinite fields
Gankra Aug 8, 2017
cf7f305
Ignore tests that fail on stage1
MaloJaffre Aug 8, 2017
40f5b30
Update solution to add using `&*` as well as `as_str()`
natboehm Aug 8, 2017
8ac4336
Improve headers linking
GuillaumeGomez Aug 8, 2017
fac6ce7
Fix trait name `Deref`
natboehm Aug 8, 2017
21a707e
explain that the example is indeed UB, but that's okay
RalfJung Aug 8, 2017
e5261c0
rustdoc: Fix broken CSS in search results
ollie27 Aug 9, 2017
445c08d
fix a typo
ubsan Aug 9, 2017
8c311e5
Fix typo in unicode char definition
mattico Aug 10, 2017
27d7e61
Fix typo corersponding -> corresponding
prisme60 Aug 10, 2017
645117f
Add missing links on File struct docs
GuillaumeGomez Aug 10, 2017
9e25984
Add missing links in ReadDir docs
GuillaumeGomez Aug 10, 2017
ac0ee51
Add missing links in io::Error docs
GuillaumeGomez Aug 10, 2017
592bdc3
Add missing links in io module docs
GuillaumeGomez Aug 10, 2017
972d67c
Add missing links for Error docs
GuillaumeGomez Aug 10, 2017
4b80d59
Fix broken links in Arc documentation
j-browne Aug 10, 2017
47cb3c5
Fix some typos
Eijebong Aug 10, 2017
ea5be96
Fix some more typos, this time words that are duplicated.
Eijebong Aug 10, 2017
b617200
Improve enum variants display
GuillaumeGomez Aug 10, 2017
0a70336
Rollup merge of #43176 - RalfJung:explain, r=eddyb
MaloJaffre Aug 11, 2017
36d143f
Rollup merge of #43632 - ruuda:allow-long-relative-urls, r=Mark-Simul…
MaloJaffre Aug 11, 2017
9dba107
Rollup merge of #43650 - RalfJung:mir-validate, r=arielb1
MaloJaffre Aug 11, 2017
37511aa
Rollup merge of #43712 - oli-obk:cfg, r=arielb1
MaloJaffre Aug 11, 2017
6da6697
Rollup merge of #43715 - ollie27:docs_long_link, r=QuietMisdreavus
MaloJaffre Aug 11, 2017
bbceeed
Rollup merge of #43721 - natboehm:patch-1, r=steveklabnik
MaloJaffre Aug 11, 2017
c4356a3
Rollup merge of #43739 - ibabushkin:master, r=eddyb
MaloJaffre Aug 11, 2017
399ed06
Rollup merge of #43741 - Gankro:fix-assert, r=eddyb
MaloJaffre Aug 11, 2017
3dabf4f
Rollup merge of #43744 - MaloJaffre:stage1-test, r=Mark-Simulacrum
MaloJaffre Aug 11, 2017
3f6ce8e
Rollup merge of #43747 - GuillaumeGomez:fix-css, r=QuietMisdreavus
MaloJaffre Aug 11, 2017
0ea8e0e
Rollup merge of #43752 - arshiamufti:union-test, r=estebank
MaloJaffre Aug 11, 2017
a529391
Rollup merge of #43760 - ollie27:rustdoc_search_css, r=GuillaumeGomez
MaloJaffre Aug 11, 2017
38535b5
Rollup merge of #43773 - ubsan:patch-1, r=eddyb
MaloJaffre Aug 11, 2017
dd7285f
Rollup merge of #43779 - mattico:fix-unicode-typo, r=aidanhs
MaloJaffre Aug 11, 2017
0814eb9
Rollup merge of #43783 - prisme60:prisme60-typo, r=Mark-Simulacrum
MaloJaffre Aug 11, 2017
f4fe270
Rollup merge of #43791 - GuillaumeGomez:file-docs, r=QuietMisdreavus
MaloJaffre Aug 11, 2017
09b794c
Rollup merge of #43793 - j-browne:master, r=steveklabnik
MaloJaffre Aug 11, 2017
84d6b0d
Rollup merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,i…
MaloJaffre Aug 11, 2017
bf5966e
Rollup merge of #43795 - GuillaumeGomez:improve-variants-doc-style, r…
MaloJaffre Aug 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/liballoc/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn size_align<T>() -> (usize, usize) {
///
/// (Note however that layouts are *not* required to have positive
/// size, even though many allocators require that all memory
/// requeusts have positive size. A caller to the `Alloc::alloc`
/// requests have positive size. A caller to the `Alloc::alloc`
/// method must either ensure that conditions like this are met, or
/// use specific allocators with looser requirements.)
#[derive(Clone, Debug, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// # Cloning references
///
/// Creating a new reference from an existing reference counted pointer is done using the
/// `Clone` trait implemented for [`Arc<T>`][`arc`] and [`Weak<T>`][`weak`].
/// `Clone` trait implemented for [`Arc<T>`][arc] and [`Weak<T>`][weak].
///
/// ```
/// use std::sync::Arc;
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl<K, V> InternalNode<K, V> {

/// An owned pointer to a node. This basically is either `Box<LeafNode<K, V>>` or
/// `Box<InternalNode<K, V>>`. However, it contains no information as to which of the two types
/// of nodes is acutally behind the box, and, partially due to this lack of information, has no
/// of nodes is actually behind the box, and, partially due to this lack of information, has no
/// destructor.
struct BoxedNode<K, V> {
ptr: Unique<LeafNode<K, V>>
Expand Down Expand Up @@ -264,7 +264,7 @@ impl<K, V> Root<K, V> {
// correct variance.
/// A reference to a node.
///
/// This type has a number of paramaters that controls how it acts:
/// This type has a number of parameters that controls how it acts:
/// - `BorrowType`: This can be `Immut<'a>` or `Mut<'a>` for some `'a` or `Owned`.
/// When this is `Immut<'a>`, the `NodeRef` acts roughly like `&'a Node`,
/// when this is `Mut<'a>`, the `NodeRef` acts roughly like `&'a mut Node`,
Expand Down
34 changes: 32 additions & 2 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ use boxed::Box;
/// # Deref
///
/// `String`s implement [`Deref`]`<Target=str>`, and so inherit all of [`str`]'s
/// methods. In addition, this means that you can pass a `String` to any
/// methods. In addition, this means that you can pass a `String` to a
/// function which takes a [`&str`] by using an ampersand (`&`):
///
/// ```
Expand All @@ -160,8 +160,38 @@ use boxed::Box;
///
/// This will create a [`&str`] from the `String` and pass it in. This
/// conversion is very inexpensive, and so generally, functions will accept
/// [`&str`]s as arguments unless they need a `String` for some specific reason.
/// [`&str`]s as arguments unless they need a `String` for some specific
/// reason.
///
/// In certain cases Rust doesn't have enough information to make this
/// conversion, known as `Deref` coercion. In the following example a string
/// slice `&'a str` implements the trait `TraitExample`, and the function
/// `example_func` takes anything that implements the trait. In this case Rust
/// would need to make two implicit conversions, which Rust doesn't have the
/// means to do. For that reason, the following example will not compile.
///
/// ```compile_fail,E0277
/// trait TraitExample {}
///
/// impl<'a> TraitExample for &'a str {}
///
/// fn example_func<A: TraitExample>(example_arg: A) {}
///
/// fn main() {
/// let example_string = String::from("example_string");
/// example_func(&example_string);
/// }
/// ```
///
/// There are two options that would work instead. The first would be to
/// change the line `example_func(&example_string);` to
/// `example_func(example_string.as_str());`, using the method `as_str()`
/// to explicitly extract the string slice containing the string. The second
/// way changes `example_func(&example_string);` to
/// `example_func(&*example_string);`. In this case we are dereferencing a
/// `String` to a `str`, then referencing the `str` back to `&str`. The
/// second way is more idiomatic, however both work to do the conversion
/// explicitly rather than relying on the implicit conversion.
///
/// # Representation
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ unsafe impl<A, B> TrustedLen for Zip<A, B>
/// Now consider this twist where we add a call to `rev`. This version will
/// print `('c', 1), ('b', 2), ('a', 3)`. Note that the letters are reversed,
/// but the values of the counter still go in order. This is because `map()` is
/// still being called lazilly on each item, but we are popping items off the
/// still being called lazily on each item, but we are popping items off the
/// back of the vector now, instead of shifting them from the front.
///
/// ```rust
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ pub trait Extend<A> {
/// In a similar fashion to the [`Iterator`] protocol, once a
/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again
/// may or may not ever return `Some` again. `next()` and `next_back()` are
/// interchangable for this purpose.
/// interchangeable for this purpose.
///
/// [`Iterator`]: trait.Iterator.html
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/dec2flt/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ pub fn algorithm_m<T: RawFloat>(f: &Big, e: i16) -> T {
round_by_remainder(v, rem, q, z)
}

/// Skip over most AlgorithmM iterations by checking the bit length.
/// Skip over most Algorithm M iterations by checking the bit length.
fn quick_start<T: RawFloat>(u: &mut Big, v: &mut Big, k: &mut i16) {
// The bit length is an estimate of the base two logarithm, and log(u / v) = log(u) - log(v).
// The estimate is off by at most 1, but always an under-estimate, so the error on log(u)
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ops/unsize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use marker::Unsize;
/// Such an impl can only be written if `Foo<T>` has only a single non-phantomdata
/// field involving `T`. If the type of that field is `Bar<T>`, an implementation
/// of `CoerceUnsized<Bar<U>> for Bar<T>` must exist. The coercion will work by
/// by coercing the `Bar<T>` field into `Bar<U>` and filling in the rest of the fields
/// coercing the `Bar<T>` field into `Bar<U>` and filling in the rest of the fields
/// from `Foo<T>` to create a `Foo<U>`. This will effectively drill down to a pointer
/// field and coerce that.
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/tests/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ assume_usize_width! {
);
}

/// Conversinos where neither the min nor the max of $source can be represented by
/// Conversions where neither the min nor the max of $source can be represented by
/// $target, but max/min of the target can be represented by the source.
macro_rules! test_impl_try_from_signed_to_unsigned_err {
($fn_name:ident, $source:ty, $target:ty) => {
Expand Down
2 changes: 1 addition & 1 deletion src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl fmt::Display for TokenStream {

/// `quote!(..)` accepts arbitrary tokens and expands into a `TokenStream` describing the input.
/// For example, `quote!(a + b)` will produce a expression, that, when evaluated, constructs
/// constructs the `TokenStream` `[Word("a"), Op('+', Alone), Word("b")]`.
/// the `TokenStream` `[Word("a"), Op('+', Alone), Word("b")]`.
///
/// Unquoting is done with `$`, and works by taking the single next ident as the unquoted term.
/// To quote `$` itself, use `$$`.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/specialize/specialization_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use util::nodemap::{DefIdMap, FxHashMap};
///
/// - Parent extraction. In particular, the graph can give you the *immediate*
/// parents of a given specializing impl, which is needed for extracting
/// default items amongst other thigns. In the simple "chain" rule, every impl
/// default items amongst other things. In the simple "chain" rule, every impl
/// has at most one parent.
pub struct Graph {
// all impls have a parent; the "root" impls have as their parent the def_id
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/adjustment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use ty::subst::Substs;
/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is
/// `false`.
///
/// 2. A thin-to-fat coercon involves unsizing the underlying data. We start
/// 2. A thin-to-fat coercion involves unsizing the underlying data. We start
/// with a thin pointer, deref a number of times, unsize the underlying data,
/// then autoref. The 'unsize' phase may change a fixed length array to a
/// dynamically sized one, a concrete object to a trait object, or statically
Expand All @@ -52,7 +52,7 @@ use ty::subst::Substs;
/// that case, we have the pointer we need coming in, so there are no
/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation.
/// At some point, of course, `Box` should move out of the compiler, in which
/// case this is analogous to transformating a struct. E.g., Box<[i32; 4]> ->
/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> ->
/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`.
#[derive(Clone, RustcEncodable, RustcDecodable)]
pub struct Adjustment<'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2197,8 +2197,8 @@ impl<'a, 'tcx> TyLayout<'tcx> {
let tcx = cx.tcx();

let ptr_field_type = |pointee: Ty<'tcx>| {
assert!(i < 2);
let slice = |element: Ty<'tcx>| {
assert!(i < 2);
if i == 0 {
tcx.mk_mut_ptr(element)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/stable_hasher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl<W> Hasher for StableHasher<W> {


/// Something that implements `HashStable<CTX>` can be hashed in a way that is
/// stable across multiple compiliation sessions.
/// stable across multiple compilation sessions.
pub trait HashStable<CTX> {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut CTX,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ pub fn source_name(input: &Input) -> String {
/// This is a somewhat higher level controller than a Session - the Session
/// controls what happens in each phase, whereas the CompileController controls
/// whether a phase is run at all and whether other code (from outside the
/// the compiler) is run between phases.
/// compiler) is run between phases.
///
/// Note that if compilation is set to stop and a callback is provided for a
/// given entry point, the callback is called before compilation is stopped.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
Entry {
kind: EntryKind::Mod(self.lazy(&data)),
visibility: self.lazy(&ty::Visibility::from_hir(vis, id, tcx)),
span: self.lazy(&md.inner),
span: self.lazy(&tcx.def_span(def_id)),
attributes: self.encode_attributes(attrs),
children: self.lazy_seq(md.item_ids.iter().map(|item_id| {
tcx.hir.local_def_id(item_id.id).index
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/dataflow/impls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<'a, 'tcx: 'a> HasMoveData<'tcx> for DefinitelyInitializedLvals<'a, 'tcx> {
/// you if an l-value *might* be uninitialized at a given point in the
/// control flow. But `MovingOutStatements` also includes the added
/// data of *which* particular statement causing the deinitialization
/// that the borrow checker's error meessage may need to report.
/// that the borrow checker's error message may need to report.
#[allow(dead_code)]
pub struct MovingOutStatements<'a, 'tcx: 'a> {
tcx: TyCtxt<'a, 'tcx, 'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/hair/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub enum StmtKind<'tcx> {

/// The Hair trait implementor translates their expressions (`&'tcx H::Expr`)
/// into instances of this `Expr` enum. This translation can be done
/// basically as lazilly or as eagerly as desired: every recursive
/// basically as lazily or as eagerly as desired: every recursive
/// reference to an expression in this enum is an `ExprRef<'tcx>`, which
/// may in turn be another instance of this enum (boxed), or else an
/// untranslated `&'tcx H::Expr`. Note that instances of `Expr` are very
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pub fn compare_simd_types<'a, 'tcx>(
/// adjustment.
///
/// The `old_info` argument is a bit funny. It is intended for use
/// in an upcast, where the new vtable for an object will be drived
/// in an upcast, where the new vtable for an object will be derived
/// from the old one.
pub fn unsized_info<'ccx, 'tcx>(ccx: &CrateContext<'ccx, 'tcx>,
source: Ty<'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/dropck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use util::nodemap::FxHashSet;

use syntax_pos::Span;

/// check_drop_impl confirms that the Drop implementation identfied by
/// check_drop_impl confirms that the Drop implementation identified by
/// `drop_impl_did` is not any more specialized than the type it is
/// attached to (Issue #8142).
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/constrained_type_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn identify_constrained_type_params<'tcx>(tcx: ty::TyCtxt,

/// Order the predicates in `predicates` such that each parameter is
/// constrained before it is used, if that is possible, and add the
/// paramaters so constrained to `input_parameters`. For example,
/// parameters so constrained to `input_parameters`. For example,
/// imagine the following impl:
///
/// impl<T: Debug, U: Iterator<Item=T>> Trait for U
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,9 +1525,9 @@ static BAR: _ = "test"; // error, explicitly write out the type instead
"##,

E0122: r##"
An attempt was made to add a generic constraint to a type alias. While Rust will
allow this with a warning, it will not currently enforce the constraint.
Consider the example below:
An attempt was made to add a generic constraint to a type alias. This constraint
is entirely ignored. For backwards compatibility, Rust still allows this with a
warning. Consider the example below:

```
trait Foo{}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/variance/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub struct Constraint<'a> {
pub variance: &'a VarianceTerm<'a>,
}

/// To build constriants, we visit one item (type, trait) at a time
/// To build constraints, we visit one item (type, trait) at a time
/// and look at its contents. So e.g. if we have
///
/// struct Foo<T> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/clean/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ fn build_static(cx: &DocContext, did: DefId, mutable: bool) -> clean::Static {

/// A trait's generics clause actually contains all of the predicates for all of
/// its associated types as well. We specifically move these clauses to the
/// associated types instead when displaying, so when we're genering the
/// associated types instead when displaying, so when we're generating the
/// generics for the trait itself we need to be sure to remove them.
/// We also need to remove the implied "recursive" Self: Trait bound.
///
Expand Down
44 changes: 22 additions & 22 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2141,8 +2141,8 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,

if !types.is_empty() {
write!(w, "
<h2 id='associated-types' class='section-header'>
<a href='#associated-types'>Associated Types</a>
<h2 id='associated-types' class='small-section-header'>
Associated Types<a href='#associated-types' class='anchor'></a>
</h2>
<div class='methods'>
")?;
Expand All @@ -2154,8 +2154,8 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,

if !consts.is_empty() {
write!(w, "
<h2 id='associated-const' class='section-header'>
<a href='#associated-const'>Associated Constants</a>
<h2 id='associated-const' class='small-section-header'>
Associated Constants<a href='#associated-const' class='anchor'></a>
</h2>
<div class='methods'>
")?;
Expand All @@ -2168,8 +2168,8 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
// Output the documentation for each function individually
if !required.is_empty() {
write!(w, "
<h2 id='required-methods' class='section-header'>
<a href='#required-methods'>Required Methods</a>
<h2 id='required-methods' class='small-section-header'>
Required Methods<a href='#required-methods' class='anchor'></a>
</h2>
<div class='methods'>
")?;
Expand All @@ -2180,8 +2180,8 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
}
if !provided.is_empty() {
write!(w, "
<h2 id='provided-methods' class='section-header'>
<a href='#provided-methods'>Provided Methods</a>
<h2 id='provided-methods' class='small-section-header'>
Provided Methods<a href='#provided-methods' class='anchor'></a>
</h2>
<div class='methods'>
")?;
Expand All @@ -2196,8 +2196,8 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,

let cache = cache();
write!(w, "
<h2 id='implementors' class='section-header'>
<a href='#implementors'>Implementors</a>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
")?;
Expand Down Expand Up @@ -2436,8 +2436,8 @@ fn item_struct(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
}).peekable();
if let doctree::Plain = s.struct_type {
if fields.peek().is_some() {
write!(w, "<h2 id='fields' class='fields section-header'>
<a href='#fields'>Fields</a></h2>")?;
write!(w, "<h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2>")?;
for (field, ty) in fields {
let id = derive_id(format!("{}.{}",
ItemType::StructField,
Expand Down Expand Up @@ -2485,8 +2485,8 @@ fn item_union(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
}
}).peekable();
if fields.peek().is_some() {
write!(w, "<h2 id='fields' class='fields section-header'>
<a href='#fields'>Fields</a></h2>")?;
write!(w, "<h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2>")?;
for (field, ty) in fields {
write!(w, "<span id='{shortty}.{name}' class=\"{shortty}\"><code>{name}: {ty}</code>
</span>",
Expand Down Expand Up @@ -2558,8 +2558,8 @@ fn item_enum(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,

document(w, cx, it)?;
if !e.variants.is_empty() {
write!(w, "<h2 id='variants' class='variants section-header'>
<a href='#variants'>Variants</a></h2>\n")?;
write!(w, "<h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>\n")?;
for variant in &e.variants {
let id = derive_id(format!("{}.{}",
ItemType::Variant,
Expand Down Expand Up @@ -2831,16 +2831,16 @@ fn render_assoc_items(w: &mut fmt::Formatter,
let render_mode = match what {
AssocItemRender::All => {
write!(w, "
<h2 id='methods' class='section-header'>
<a href='#methods'>Methods</a>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
")?;
RenderMode::Normal
}
AssocItemRender::DerefFor { trait_, type_, deref_mut_ } => {
write!(w, "
<h2 id='deref-methods' class='section-header'>
<a href='#deref-methods'>Methods from {}&lt;Target = {}&gt;</a>
<h2 id='deref-methods' class='small-section-header'>
Methods from {}&lt;Target = {}&gt;<a href='#deref-methods' class='anchor'></a>
</h2>
", trait_, type_)?;
RenderMode::ForDeref { mut_: deref_mut_ }
Expand All @@ -2865,8 +2865,8 @@ fn render_assoc_items(w: &mut fmt::Formatter,
render_deref_methods(w, cx, impl_, containing_item, has_deref_mut)?;
}
write!(w, "
<h2 id='implementations' class='section-header'>
<a href='#implementations'>Trait Implementations</a>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
")?;
for i in &traits {
Expand Down
Loading