From 2fca10d3906a31b26031a6e44419ce8c563f0a9f Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 9 Apr 2019 14:26:37 -0700 Subject: [PATCH] Remove unused link references. Verified the output is the same except for the one link in `macros.md` that I corrected. --- src/attributes/testing.md | 2 -- src/crates-and-source-files.md | 2 -- src/destructors.md | 1 - src/expressions.md | 10 ---------- src/expressions/block-expr.md | 2 -- src/expressions/closure-expr.md | 1 - src/expressions/loop-expr.md | 1 - src/expressions/match-expr.md | 4 ---- src/expressions/method-call-expr.md | 1 - src/expressions/struct-expr.md | 1 - src/glossary.md | 1 - src/interior-mutability.md | 1 - src/items/associated-items.md | 3 --- src/items/constant-items.md | 1 - src/items/enumerations.md | 1 - src/items/extern-crates.md | 2 -- src/items/external-blocks.md | 2 -- src/items/functions.md | 2 -- src/items/implementations.md | 1 - src/items/modules.md | 1 - src/items/traits.md | 2 -- src/lifetime-elision.md | 2 -- src/macro-ambiguity.md | 1 - src/macros.md | 4 +--- src/paths.md | 6 ------ src/procedural-macros.md | 3 --- src/subtyping.md | 2 -- src/tokens.md | 3 --- src/unsafety.md | 1 - 29 files changed, 1 insertion(+), 63 deletions(-) diff --git a/src/attributes/testing.md b/src/attributes/testing.md index 066943377bae7..54e05a5f55add 100644 --- a/src/attributes/testing.md +++ b/src/attributes/testing.md @@ -87,5 +87,3 @@ fn mytest() { [`Termination`]: ../std/process/trait.Termination.html [`test` conditional compilation option]: conditional-compilation.html#test [attributes]: attributes.html -[trait or lifetime bounds]: trait-bounds.html -[where clauses]: items/generics.html#where-clauses diff --git a/src/crates-and-source-files.md b/src/crates-and-source-files.md index ccb94a2f3dd7c..d21655cbeecdd 100644 --- a/src/crates-and-source-files.md +++ b/src/crates-and-source-files.md @@ -163,12 +163,10 @@ or `-` (U+002D) characters. [`extern crate`]: items/extern-crates.html [`std`]: ../std/index.html [`std::prelude::v1`]: ../std/prelude/index.html -[`use` declaration]: items/use-declarations.html [attribute]: attributes.html [attributes]: attributes.html [function]: items/functions.html [module]: items/modules.html [module path]: paths.html [trait or lifetime bounds]: trait-bounds.html -[unit]: types.html#tuple-types [where clauses]: items/generics.html#where-clauses diff --git a/src/destructors.md b/src/destructors.md index 1f0055f94b3f2..49a8613221ec1 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -89,5 +89,4 @@ variable or field from being dropped automatically. [closure]: types/closure.html [Trait objects]: types/trait-object.html [`std::ptr::drop_in_place`]: ../std/ptr/fn.drop_in_place.html -[`std::mem::forget`]: ../std/mem/fn.forget.html [`std::mem::ManuallyDrop`]: ../std/mem/struct.ManuallyDrop.html diff --git a/src/expressions.md b/src/expressions.md index f30eb37c1b1b6..006a892796615 100644 --- a/src/expressions.md +++ b/src/expressions.md @@ -283,17 +283,13 @@ They are never allowed before: [block expressions]: expressions/block-expr.html [call expressions]: expressions/call-expr.html -[closure expressions]: expressions/closure-expr.html [enum variant]: expressions/enum-variant-expr.html [field]: expressions/field-expr.html [functional update]: expressions/struct-expr.html#functional-update-syntax -[grouped]: expressions/grouped-expr.html [`if let`]: expressions/if-expr.html#if-let-expressions -[literals]: expressions/literal-expr.html [match]: expressions/match-expr.html [method-call]: expressions/method-call-expr.html [paths]: expressions/path-expr.html -[range expressions]: expressions/range-expr.html [struct]: expressions/struct-expr.html [tuple expressions]: expressions/tuple-expr.html [`while let`]: expressions/loop-expr.html#predicate-pattern-loops @@ -301,16 +297,11 @@ They are never allowed before: [array expressions]: expressions/array-expr.html [array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions -[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators [assign]: expressions/operator-expr.html#assignment-expressions [borrow]: expressions/operator-expr.html#borrow-operators -[cast]: expressions/operator-expr.html#type-cast-expressions [comparison]: expressions/operator-expr.html#comparison-operators [compound assignment]: expressions/operator-expr.html#compound-assignment-expressions [deref]: expressions/operator-expr.html#the-dereference-operator -[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators -[negation]: expressions/operator-expr.html#negation-operators -[overflow]: expressions/operator-expr.html#overflow [destructors]: destructors.html [interior mutability]: interior-mutability.html @@ -323,7 +314,6 @@ They are never allowed before: [let]: statements.html#let-statements [let statement]: statements.html#let-statements [Mutable `static` items]: items/static-items.html#mutable-statics -[const contexts]: const_eval.html [scrutinee]: glossary.html#scrutinee [slice]: types/slice.html [statement]: statements.html diff --git a/src/expressions/block-expr.md b/src/expressions/block-expr.md index aa1b124c07b7e..3175127c8733c 100644 --- a/src/expressions/block-expr.md +++ b/src/expressions/block-expr.md @@ -140,8 +140,6 @@ fn is_unix_platform() -> bool { [array expressions]: expressions/array-expr.html [call expressions]: expressions/call-expr.html [enum variant]: expressions/enum-variant-expr.html -[expression attributes]: expressions.html#expression-attributes -[expression]: expressions.html [function]: items/functions.html [inner attributes]: attributes.html [method]: items/associated-items.html#methods diff --git a/src/expressions/closure-expr.md b/src/expressions/closure-expr.md index e61d67f98d119..d02a4fd456758 100644 --- a/src/expressions/closure-expr.md +++ b/src/expressions/closure-expr.md @@ -74,7 +74,6 @@ ten_times(move |j| println!("{}, {}", word, j)); [_Expression_]: expressions.html [_BlockExpression_]: expressions/block-expr.html [_TypeNoBounds_]: types.html#type-expressions -[_FunctionParameters_]: items/functions.html [_Pattern_]: patterns.html [_Type_]: types.html#type-expressions [`let` binding]: statements.html#let-statements diff --git a/src/expressions/loop-expr.md b/src/expressions/loop-expr.md index 7a2ae18634cb9..98c9d14b46cc3 100644 --- a/src/expressions/loop-expr.md +++ b/src/expressions/loop-expr.md @@ -282,7 +282,6 @@ and the `loop` must have a type compatible with each `break` expression. `break` without an expression is considered identical to `break` with expression `()`. -[IDENTIFIER]: identifiers.html [LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels [_BlockExpression_]: expressions/block-expr.html [_Expression_]: expressions.html diff --git a/src/expressions/match-expr.md b/src/expressions/match-expr.md index eb672fac69dc4..e5c8dbb0d9058 100644 --- a/src/expressions/match-expr.md +++ b/src/expressions/match-expr.md @@ -147,11 +147,7 @@ expressions]. [_Pattern_]: patterns.html [pattern]: patterns.html -[Identifier Patterns]: patterns.html#identifier-patterns [Inner attributes]: attributes.html -[Struct Patterns]: patterns.html#struct-patterns -[Tuple Struct Patterns]: patterns.html#tuplestruct-patterns -[Tuple Patterns]: patterns.html#tuple-patterns [Range Pattern]: patterns.html#range-patterns [attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions [binding mode]: patterns.html#binding-modes diff --git a/src/expressions/method-call-expr.md b/src/expressions/method-call-expr.md index fd150c352a19c..1b90d742a78d2 100644 --- a/src/expressions/method-call-expr.md +++ b/src/expressions/method-call-expr.md @@ -101,7 +101,6 @@ method and you'll be fine. [_Expression_]: expressions.html [_PathExprSegment_]: paths.html#paths-in-expressions [visible]: visibility-and-privacy.html -[array]: types/array.html [trait objects]: types/trait-object.html [disambiguate call]: expressions/call-expr.html#disambiguating-function-calls [disambiguating function call syntax]: expressions/call-expr.html#disambiguating-function-calls diff --git a/src/expressions/struct-expr.md b/src/expressions/struct-expr.md index ac278eb0b016b..be29bfdac2ece 100644 --- a/src/expressions/struct-expr.md +++ b/src/expressions/struct-expr.md @@ -151,7 +151,6 @@ expressions]. [loop]: expressions/loop-expr.html [match]: expressions/match-expr.html [parentheses]: http://localhost:3000/expressions/grouped-expr.html -[path]: paths.html [struct]: items/structs.html [union]: items/unions.html [visible]: visibility-and-privacy.html diff --git a/src/glossary.md b/src/glossary.md index 8f0eab906713e..bea591a34fc07 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -163,7 +163,6 @@ or unintended computation; or platform-specific results. [associated item]: #associated-item [enums]: items/enumerations.html [free item]: #free-item -[function]: items/functions.html [implementation]: items/implementations.html [implementations]: items/implementations.html [inherent implementation]: items/implementations.html#inherent-implementations diff --git a/src/interior-mutability.md b/src/interior-mutability.md index 55f3caf48b283..74324e30e542b 100644 --- a/src/interior-mutability.md +++ b/src/interior-mutability.md @@ -22,7 +22,6 @@ across threads. [shared reference]: types/pointer.html#shared-references- [ub]: behavior-considered-undefined.html -[`std::mem::transmute`]: ../std/mem/fn.transmute.html [`std::cell::UnsafeCell`]: ../std/cell/struct.UnsafeCell.html [`std::cell::RefCell`]: ../std/cell/struct.RefCell.html [`std::sync::atomic`]: ../std/sync/atomic/index.html diff --git a/src/items/associated-items.md b/src/items/associated-items.md index 9223a74614e05..a8bdcbf8646c0 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -336,13 +336,11 @@ fn main() { [`Box`]: special-types-and-traits.html#boxt [`Pin

`]: special-types-and-traits.html#pinp [`Rc`]: special-types-and-traits.html#rct -[trait]: items/traits.html [traits]: items/traits.html [type aliases]: items/type-aliases.html [inherent implementations]: items/implementations.html#inherent-implementations [identifier]: identifiers.html [identifier pattern]: patterns.html#identifier-patterns -[trait object]: types/trait-object.html [implementations]: items/implementations.html [type]: types.html#type-expressions [constants]: items/constant-items.html @@ -350,5 +348,4 @@ fn main() { [functions]: items/functions.html [function item]: types/function-item.html [method call operator]: expressions/method-call-expr.html -[block]: expressions/block-expr.html [path]: paths.html diff --git a/src/items/constant-items.md b/src/items/constant-items.md index ac3c0ebd44c01..a398fe9bf1d18 100644 --- a/src/items/constant-items.md +++ b/src/items/constant-items.md @@ -62,7 +62,6 @@ fn create_and_drop_zero_with_destructor() { [constant value]: const_eval.html#constant-expressions [static lifetime elision]: lifetime-elision.html#static-lifetime-elision -[`Drop`]: special-types-and-traits.html#drop [IDENTIFIER]: identifiers.html [_Type_]: types.html#type-expressions [_Expression_]: expressions.html diff --git a/src/items/enumerations.md b/src/items/enumerations.md index 0dc8064ccd91d..258795503bfa5 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -140,7 +140,6 @@ enum ZeroVariants {} [enumerated type]: types/enum.html [`mem::discriminant`]: ../std/mem/fn.discriminant.html [numeric cast]: expressions/operator-expr.html#semantics -[`repr` attribute]: attributes.html#ffi-attributes [constant expression]: const_eval.html#constant-expressions [default representation]: type-layout.html#the-default-representation [primitive representation]: type-layout.html#primitive-representations diff --git a/src/items/extern-crates.md b/src/items/extern-crates.md index f2c3be5ff57de..ebd93f2ce7b52 100644 --- a/src/items/extern-crates.md +++ b/src/items/extern-crates.md @@ -106,10 +106,8 @@ crate to access only its macros. [RFC 940]: https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md [`macro_use` attribute]: macros-by-example.html#the-macro_use-attribute [`alloc`]: https://doc.rust-lang.org/alloc/ -[`crate::`]: paths.html#crate [`no_implicit_prelude`]: items/modules.html#prelude-items [`no_std`]: crates-and-source-files.html#preludes-and-no_std [`proc_macro`]: https://doc.rust-lang.org/proc_macro/ -[`self::`]: paths.html#self [`test`]: https://doc.rust-lang.org/test/ [use declarations]: items/use-declarations.html diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index d265619990a4c..7ff995bd87287 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -166,8 +166,6 @@ extern { [IDENTIFIER]: identifiers.html [WebAssembly module]: https://webassembly.github.io/spec/core/syntax/modules.html [_Abi_]: items/functions.html -[_FunctionParam_]: items/functions.html -[_FunctionParameters_]: items/functions.html [_FunctionReturnType_]: items/functions.html [_Generics_]: items/generics.html [_InnerAttribute_]: attributes.html diff --git a/src/items/functions.md b/src/items/functions.md index 33d71806d453b..b798ae72af839 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -217,9 +217,7 @@ attributes macros. [STRING_LITERAL]: tokens.html#string-literals [_BlockExpression_]: expressions/block-expr.html [_Generics_]: items/generics.html -[_InnerAttribute_]: attributes.html [_Pattern_]: patterns.html -[_Statement_]: statements.html [_Type_]: types.html#type-expressions [_WhereClause_]: items/generics.html#where-clauses [const context]: const_eval.html#const-context diff --git a/src/items/implementations.md b/src/items/implementations.md index f06e6b49fa4d9..84317ea5b8243 100644 --- a/src/items/implementations.md +++ b/src/items/implementations.md @@ -202,7 +202,6 @@ attributes must come before any associated items. That attributes that have meaning here are [`cfg`], [`deprecated`], [`doc`], and [the lint check attributes]. -[IDENTIFIER]: identifiers.html [_ConstantItem_]: items/constant-items.html [_Function_]: items/functions.html [_Generics_]: items/generics.html diff --git a/src/items/modules.md b/src/items/modules.md index 6784edfc3685a..87b8f07d12d78 100644 --- a/src/items/modules.md +++ b/src/items/modules.md @@ -141,7 +141,6 @@ The built-in attributes that have meaning on a function are [`cfg`], [_InnerAttribute_]: attributes.html [_Item_]: items.html -[_OuterAttribute_]: attributes.html [`#[macro_use]`]: macros-by-example.html#the-macro_use-attribute [`cfg`]: conditional-compilation.html [`deprecated`]: attributes/diagnostics.html#the-deprecated-attribute diff --git a/src/items/traits.md b/src/items/traits.md index 9e1a524f21fd6..5a60856fca9b2 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -208,7 +208,6 @@ trait T { [WildcardPattern]: patterns.html#wildcard-pattern [_BlockExpression_]: expressions/block-expr.html [_Expression_]: expressions.html -[_FunctionParam_]: items/functions.html [_FunctionQualifiers_]: items/functions.html [_FunctionReturnType_]: items/functions.html [_Generics_]: items/generics.html @@ -221,7 +220,6 @@ trait T { [_WhereClause_]: items/generics.html#where-clauses [bounds]: trait-bounds.html [trait object]: types/trait-object.html -[explicit]: expressions/operator-expr.html#type-cast-expressions [RFC 255]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md [associated items]: items/associated-items.html [method]: items/associated-items.html#methods diff --git a/src/lifetime-elision.md b/src/lifetime-elision.md index e2414d13cbee5..a90f38aec8a6e 100644 --- a/src/lifetime-elision.md +++ b/src/lifetime-elision.md @@ -173,9 +173,7 @@ const RESOLVED_STATIC: &dyn Fn(&Foo, &Bar) -> &Baz = .. [constant]: items/constant-items.html [function item]: types/function-item.html [function pointer]: types/function-pointer.html -[implementation]: items/implementations.html [RFC 599]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md [RFC 1156]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md [static]: items/static-items.html [trait object]: types/trait-object.html -[type aliases]: items/type-aliases.html diff --git a/src/macro-ambiguity.md b/src/macro-ambiguity.md index 89bd27787e9f6..1e0f3e26bd053 100644 --- a/src/macro-ambiguity.md +++ b/src/macro-ambiguity.md @@ -269,7 +269,6 @@ LAST(M), defined by case analysis on M itself (a sequence of token-trees): LAST(`uu ...`). ### Examples of FIRST and LAST -[examples-of-first-and-last]: #examples-of-first-and-last Below are some examples of FIRST and LAST. (Note in particular how the special ε element is introduced and diff --git a/src/macros.md b/src/macros.md index 55da4eb33d7af..42caaa1d78828 100644 --- a/src/macros.md +++ b/src/macros.md @@ -21,7 +21,7 @@ There are two ways to define new macros: >    | `{` _TokenTree_\* `}` > > _TokenTree_ :\ ->    [_Token_]_except delimiters_ | _DelimTokenTree_ +>    [_Token_]_except [delimiters]_ | _DelimTokenTree_ > > _MacroInvocationSemi_ :\ >       [_SimplePath_] `!` `(` _TokenTree_\* `)` `;`\ @@ -91,13 +91,11 @@ example!(); [_SimplePath_]: paths.html#simple-paths [_Token_]: tokens.html [associated items]: items/associated-items.html -[compiler plugins]: ../unstable-book/language-features/plugin.html [delimiters]: tokens.html#delimiters [expressions]: expressions.html [items]: items.html [`macro_rules`]: macros-by-example.html [patterns]: patterns.html [statements]: statements.html -[tokens]: tokens.html [types]: types.html [visibility qualifiers]: visibility-and-privacy.html diff --git a/src/paths.md b/src/paths.md index f363b6399214a..db432a8604181 100644 --- a/src/paths.md +++ b/src/paths.md @@ -357,21 +357,15 @@ mod without { // ::without [_Type_]: types.html#type-expressions [item]: items.html [variable]: variables.html -[identifiers]: identifiers.html [implementations]: items/implementations.html -[modules]: items/modules.html [use declarations]: items/use-declarations.html [IDENTIFIER]: identifiers.html [`use`]: items/use-declarations.html [attributes]: attributes.html -[enum]: items/enumerations.html [expressions]: expressions.html [macro transcribers]: macros-by-example.html [macros]: macros-by-example.html [patterns]: patterns.html -[struct]: items/structs.html -[trait implementation]: items/implementations.html#trait-implementations [trait implementations]: items/implementations.html#trait-implementations [traits]: items/traits.html -[union]: items/unions.html [visibility]: visibility-and-privacy.html diff --git a/src/procedural-macros.md b/src/procedural-macros.md index 5c522c35cef30..d779f4b9d60a5 100644 --- a/src/procedural-macros.md +++ b/src/procedural-macros.md @@ -278,7 +278,6 @@ fn invoke4() {} [attribute]: attributes.html [attributes]: attributes.html [block]: expressions/block-expr.html -[custom attributes]: attributes.html [crate type]: linkage.html [derive macro helper attributes]: #derive-macro-helper-attributes [enum]: items/enumerations.html @@ -287,10 +286,8 @@ fn invoke4() {} [item declaration statements]: statements.html#item-declarations [items]: items.html [function]: items/functions.html -[macro]: macros.html [module]: items/modules.html [modules]: items/modules.html -[procedural macro tutorial]: ../book/2018-edition/appendix-04-macros.html#procedural-macros-for-custom-derive [public]: visibility-and-privacy.html [struct]: items/structs.html [union]: items/unions.html diff --git a/src/subtyping.md b/src/subtyping.md index 6a9c5e26a9f1d..3723b180cc1ed 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -82,8 +82,6 @@ struct Variance<'a, 'b, T, U: 'a> { } ``` -[coercions]: type-coercions.html [function pointers]: types/function-pointer.html [Higher-ranked]: ../nomicon/hrtb.html -[lifetime bound]: types/trait-object.html#trait-object-lifetime-bounds [trait objects]: types/trait-object.html diff --git a/src/tokens.md b/src/tokens.md index 2f772dfcf8e89..1962f3f97af8c 100644 --- a/src/tokens.md +++ b/src/tokens.md @@ -577,7 +577,6 @@ them are referred to as "token trees" in [macros]. The three types of brackets [Inferred types]: types/inferred.html -[Operator expressions]: expressions/operator-expr.html [Range patterns]: patterns.html#range-patterns [Reference patterns]: patterns.html#reference-patterns [Subpattern binding]: patterns.html#identifier-patterns @@ -590,7 +589,6 @@ them are referred to as "token trees" in [macros]. The three types of brackets [closures]: expressions/closure-expr.html [comparison]: expressions/operator-expr.html#comparison-operators [compound]: expressions/operator-expr.html#compound-assignment-expressions -[constant items]: items/constant-items.html [dereference]: expressions/operator-expr.html#the-dereference-operator [extern]: items/external-blocks.html [field]: expressions/field-expr.html @@ -611,7 +609,6 @@ them are referred to as "token trees" in [macros]. The three types of brackets [references]: types/pointer.html [sized]: trait-bounds.html#sized [struct expressions]: expressions/struct-expr.html -[tokens]: #tokens [trait bounds]: trait-bounds.html [tuple index]: expressions/tuple-expr.html#tuple-indexing-expressions [tuple structs]: items/structs.html diff --git a/src/unsafety.md b/src/unsafety.md index 160fe3ee34497..31a10f9a849d6 100644 --- a/src/unsafety.md +++ b/src/unsafety.md @@ -12,7 +12,6 @@ Rust: - Calling an unsafe function (including an intrinsic or foreign function). - Implementing an [unsafe trait]. -[`Copy`]: special-types-and-traits.html#copy [`union`]: items/unions.html [mutable]: items/static-items.html#mutable-statics [external]: items/external-blocks.html