Skip to content

Commit a80c4a7

Browse files
authored
Merge pull request #1589 from ehuss/idioms
Sync denied lints with upstream
2 parents f0f6155 + 82c9d5f commit a80c4a7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mdbook-spec/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rust_2018_idioms, unused_lifetimes)]
2+
13
use mdbook::book::{Book, Chapter};
24
use mdbook::errors::Error;
35
use mdbook::preprocess::{CmdPreprocessor, Preprocessor, PreprocessorContext};

mdbook-spec/src/std_links.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fn collect_markdown_links(chapter: &Chapter) -> Vec<Link<'_>> {
145145
// Broken links are collected so that you can write something like
146146
// `[std::option::Option]` which in pulldown_cmark's eyes is a broken
147147
// link. However, that is the normal syntax for rustdoc.
148-
let broken_link = |broken_link: BrokenLink| {
148+
let broken_link = |broken_link: BrokenLink<'_>| {
149149
broken_links.push(Link {
150150
link_type: broken_link.link_type,
151151
// Necessary due to lifetime issues.
@@ -205,7 +205,7 @@ fn collect_markdown_links(chapter: &Chapter) -> Vec<Link<'_>> {
205205
/// generate intra-doc links on them.
206206
///
207207
/// The output will be in the given `tmp` directory.
208-
fn run_rustdoc(tmp: &TempDir, chapter_links: &HashMap<&PathBuf, Vec<Link>>) {
208+
fn run_rustdoc(tmp: &TempDir, chapter_links: &HashMap<&PathBuf, Vec<Link<'_>>>) {
209209
let src_path = tmp.path().join("a.rs");
210210
// Allow redundant since there could some in-scope things that are
211211
// technically not necessary, but we don't care about (like

0 commit comments

Comments
 (0)