Fix failing examples
This commit is contained in:
parent
8ecbb7e39a
commit
30b522365b
3 changed files with 14 additions and 10 deletions
|
@ -11,7 +11,7 @@ declare_lint! {
|
||||||
/// scope.
|
/// scope.
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```
|
/// ```rust
|
||||||
/// struct SomeStruct;
|
/// struct SomeStruct;
|
||||||
/// impl Drop for SomeStruct {
|
/// impl Drop for SomeStruct {
|
||||||
/// fn drop(&mut self) {
|
/// fn drop(&mut self) {
|
||||||
|
|
|
@ -26,19 +26,23 @@ declare_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```rust
|
||||||
|
/// trait Duh {}
|
||||||
|
///
|
||||||
|
/// impl Duh for i32 {}
|
||||||
|
///
|
||||||
/// trait Trait {
|
/// trait Trait {
|
||||||
/// type Assoc: Send;
|
/// type Assoc: Duh;
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// struct Struct;
|
/// struct Struct;
|
||||||
///
|
///
|
||||||
/// impl Trait for Struct {
|
/// impl<F: Duh> Trait for F {
|
||||||
/// type Assoc = i32;
|
/// type Assoc = F;
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// fn test() -> impl Trait<Assoc = impl Sized> {
|
/// fn test() -> impl Trait<Assoc = impl Sized> {
|
||||||
/// Struct
|
/// 42
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
|
@ -605,7 +605,7 @@ declare_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```rust
|
||||||
/// #[warn(unused_tuple_struct_fields)]
|
/// #[warn(unused_tuple_struct_fields)]
|
||||||
/// struct S(i32, i32, i32);
|
/// struct S(i32, i32, i32);
|
||||||
/// let s = S(1, 2, 3);
|
/// let s = S(1, 2, 3);
|
||||||
|
@ -1154,7 +1154,7 @@ declare_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```compile_fail
|
/// ```rust,compile_fail
|
||||||
/// #[repr(packed)]
|
/// #[repr(packed)]
|
||||||
/// pub struct Foo {
|
/// pub struct Foo {
|
||||||
/// field1: u64,
|
/// field1: u64,
|
||||||
|
@ -2615,7 +2615,7 @@ declare_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```compile_fail
|
/// ```rust,compile_fail
|
||||||
/// # #![allow(unused)]
|
/// # #![allow(unused)]
|
||||||
/// enum E {
|
/// enum E {
|
||||||
/// A,
|
/// A,
|
||||||
|
@ -3986,7 +3986,7 @@ declare_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```rust
|
||||||
/// #![allow(test_unstable_lint)]
|
/// #![allow(test_unstable_lint)]
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue