Skip to content

Commit 346f268

Browse files
committed
Fix doctests
This crate has a different name in rust-lang/rust and crates.io, so we need to rename it for the doctests to pass
1 parent dab435b commit 346f268

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ impl ItemEnum {
833833
/// Get just the kind of this item, but with no further data.
834834
///
835835
/// ```rust
836-
/// # use rustdoc_json_types::{ItemKind, ItemEnum};
836+
/// # use rustdoc_types::{ItemKind, ItemEnum};
837837
/// let item = ItemEnum::ExternCrate { name: "libc".to_owned(), rename: None };
838838
/// assert_eq!(item.item_kind(), ItemKind::ExternCrate);
839839
/// ```

update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ repo="rust"
2222

2323
curl -# https://raw.githubusercontent.com/${user}/${repo}/${ref}/src/rustdoc-json-types/lib.rs \
2424
| sed '/^pub type FxHashMap.*$/d' \
25+
| sed 's/rustdoc_json_types/rustdoc_types/g' \
2526
> src/lib.rs
2627

2728
curl -# https://raw.githubusercontent.com/${user}/${repo}/${ref}/src/rustdoc-json-types/tests.rs > src/tests.rs

0 commit comments

Comments
 (0)