Skip to content

Commit ea60f45

Browse files
committed
fixed doc errors regarding inline module and invalid extern crate call
1 parent a9550d5 commit ea60f45

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

clippy_lints/src/items_before_use.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ declare_clippy_lint! {
1818
///
1919
/// ### Example
2020
/// ```no_run
21-
/// mod my_module;
22-
/// extern crate some_crate;
21+
/// mod my_module {
22+
/// fn rand() {}
23+
/// };
24+
/// extern crate rustc_driver;
2325
///
2426
/// fn foo() {}
2527
/// use std::collections::HashMap;
@@ -29,8 +31,10 @@ declare_clippy_lint! {
2931
/// ```
3032
/// Use instead:
3133
/// ```no_run
32-
/// mod my_module;
33-
/// extern crate some_crate;
34+
/// mod my_module {
35+
/// fn rand2() {}
36+
/// };
37+
/// extern crate rustc_hir;
3438
/// use std::collections::HashMap;
3539
/// use std::vec::Vec;
3640
///

0 commit comments

Comments
 (0)