Skip to content

Commit

Permalink
Fix failing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Oct 24, 2022
1 parent 8ecbb7e commit 30b5223
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/let_underscore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ declare_lint! {
/// scope.
///
/// ### Example
/// ```
/// ```rust
/// struct SomeStruct;
/// impl Drop for SomeStruct {
/// fn drop(&mut self) {
Expand Down
14 changes: 9 additions & 5 deletions compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,23 @@ declare_lint! {
///
/// ### Example
///
/// ```
/// ```rust
/// trait Duh {}
///
/// impl Duh for i32 {}
///
/// trait Trait {
/// type Assoc: Send;
/// type Assoc: Duh;
/// }
///
/// struct Struct;
///
/// impl Trait for Struct {
/// type Assoc = i32;
/// impl<F: Duh> Trait for F {
/// type Assoc = F;
/// }
///
/// fn test() -> impl Trait<Assoc = impl Sized> {
/// Struct
/// 42
/// }
/// ```
///
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ declare_lint! {
///
/// ### Example
///
/// ```
/// ```rust
/// #[warn(unused_tuple_struct_fields)]
/// struct S(i32, i32, i32);
/// let s = S(1, 2, 3);
Expand Down Expand Up @@ -1154,7 +1154,7 @@ declare_lint! {
///
/// ### Example
///
/// ```compile_fail
/// ```rust,compile_fail
/// #[repr(packed)]
/// pub struct Foo {
/// field1: u64,
Expand Down Expand Up @@ -2615,7 +2615,7 @@ declare_lint! {
///
/// ### Example
///
/// ```compile_fail
/// ```rust,compile_fail
/// # #![allow(unused)]
/// enum E {
/// A,
Expand Down Expand Up @@ -3986,7 +3986,7 @@ declare_lint! {
///
/// ### Example
///
/// ```
/// ```rust
/// #![allow(test_unstable_lint)]
/// ```
///
Expand Down

0 comments on commit 30b5223

Please sign in to comment.