From 41626dd8f32e2eed24a86dafdcbc575cb650d7e3 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 22 Oct 2019 17:43:03 +0700 Subject: [PATCH 1/2] build: lint-check need rust-docs component --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d8979ffe..73304507e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ -language: rust +language: shell -rust: - - nightly +before_install: + - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal -c rust-docs + - export PATH="$HOME/.cargo/bin:$PATH" install: - travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin From 5606f18b7d42d408adce7430bc6d3a8afa96e3d2 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 22 Oct 2019 17:44:48 +0700 Subject: [PATCH 2/2] chore: Add rust syntax to an example --- src/items/generics.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/items/generics.md b/src/items/generics.md index 074b5cf36..6dc8f01d0 100644 --- a/src/items/generics.md +++ b/src/items/generics.md @@ -92,10 +92,11 @@ attributes may give meaning to it. This example shows using a custom derive attribute to modify the meaning of a generic parameter. -```ignore +```rust,ignore // Assume that the derive for MyFlexibleClone declared `my_flexible_clone` as // an attribute it understands. -#[derive(MyFlexibleClone)] struct Foo<#[my_flexible_clone(unbounded)] H> { +#[derive(MyFlexibleClone)] +struct Foo<#[my_flexible_clone(unbounded)] H> { a: *const H } ```