File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ declare_lint! {
1111 /// scope.
1212 ///
1313 /// ### Example
14- /// ```
14+ /// ```rust
1515 /// struct SomeStruct;
1616 /// impl Drop for SomeStruct {
1717 /// fn drop(&mut self) {
Original file line number Diff line number Diff line change @@ -26,19 +26,23 @@ declare_lint! {
2626 ///
2727 /// ### Example
2828 ///
29- /// ```
29+ /// ```rust
30+ /// trait Duh {}
31+ ///
32+ /// impl Duh for i32 {}
33+ ///
3034 /// trait Trait {
31- /// type Assoc: Send ;
35+ /// type Assoc: Duh ;
3236 /// }
3337 ///
3438 /// struct Struct;
3539 ///
36- /// impl Trait for Struct {
37- /// type Assoc = i32 ;
40+ /// impl<F: Duh> Trait for F {
41+ /// type Assoc = F ;
3842 /// }
3943 ///
4044 /// fn test() -> impl Trait<Assoc = impl Sized> {
41- /// Struct
45+ /// 42
4246 /// }
4347 /// ```
4448 ///
Original file line number Diff line number Diff line change @@ -605,7 +605,7 @@ declare_lint! {
605605 ///
606606 /// ### Example
607607 ///
608- /// ```
608+ /// ```rust
609609 /// #[warn(unused_tuple_struct_fields)]
610610 /// struct S(i32, i32, i32);
611611 /// let s = S(1, 2, 3);
@@ -1154,7 +1154,7 @@ declare_lint! {
11541154 ///
11551155 /// ### Example
11561156 ///
1157- /// ```compile_fail
1157+ /// ```rust, compile_fail
11581158 /// #[repr(packed)]
11591159 /// pub struct Foo {
11601160 /// field1: u64,
@@ -2615,7 +2615,7 @@ declare_lint! {
26152615 ///
26162616 /// ### Example
26172617 ///
2618- /// ```compile_fail
2618+ /// ```rust, compile_fail
26192619 /// # #![allow(unused)]
26202620 /// enum E {
26212621 /// A,
@@ -3986,7 +3986,7 @@ declare_lint! {
39863986 ///
39873987 /// ### Example
39883988 ///
3989- /// ```
3989+ /// ```rust
39903990 /// #![allow(test_unstable_lint)]
39913991 /// ```
39923992 ///
You can’t perform that action at this time.
0 commit comments