File tree 3 files changed +14
-10
lines changed
3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ declare_lint! {
11
11
/// scope.
12
12
///
13
13
/// ### Example
14
- /// ```
14
+ /// ```rust
15
15
/// struct SomeStruct;
16
16
/// impl Drop for SomeStruct {
17
17
/// fn drop(&mut self) {
Original file line number Diff line number Diff line change @@ -26,19 +26,23 @@ declare_lint! {
26
26
///
27
27
/// ### Example
28
28
///
29
- /// ```
29
+ /// ```rust
30
+ /// trait Duh {}
31
+ ///
32
+ /// impl Duh for i32 {}
33
+ ///
30
34
/// trait Trait {
31
- /// type Assoc: Send ;
35
+ /// type Assoc: Duh ;
32
36
/// }
33
37
///
34
38
/// struct Struct;
35
39
///
36
- /// impl Trait for Struct {
37
- /// type Assoc = i32 ;
40
+ /// impl<F: Duh> Trait for F {
41
+ /// type Assoc = F ;
38
42
/// }
39
43
///
40
44
/// fn test() -> impl Trait<Assoc = impl Sized> {
41
- /// Struct
45
+ /// 42
42
46
/// }
43
47
/// ```
44
48
///
Original file line number Diff line number Diff line change @@ -605,7 +605,7 @@ declare_lint! {
605
605
///
606
606
/// ### Example
607
607
///
608
- /// ```
608
+ /// ```rust
609
609
/// #[warn(unused_tuple_struct_fields)]
610
610
/// struct S(i32, i32, i32);
611
611
/// let s = S(1, 2, 3);
@@ -1154,7 +1154,7 @@ declare_lint! {
1154
1154
///
1155
1155
/// ### Example
1156
1156
///
1157
- /// ```compile_fail
1157
+ /// ```rust, compile_fail
1158
1158
/// #[repr(packed)]
1159
1159
/// pub struct Foo {
1160
1160
/// field1: u64,
@@ -2615,7 +2615,7 @@ declare_lint! {
2615
2615
///
2616
2616
/// ### Example
2617
2617
///
2618
- /// ```compile_fail
2618
+ /// ```rust, compile_fail
2619
2619
/// # #![allow(unused)]
2620
2620
/// enum E {
2621
2621
/// A,
@@ -3986,7 +3986,7 @@ declare_lint! {
3986
3986
///
3987
3987
/// ### Example
3988
3988
///
3989
- /// ```
3989
+ /// ```rust
3990
3990
/// #![allow(test_unstable_lint)]
3991
3991
/// ```
3992
3992
///
You can’t perform that action at this time.
0 commit comments