about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-11 15:32:38 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-12 08:53:59 +0000
commit85f2ecab576d3f02619b4d4976a6d7827c65ed4b (patch)
tree0217557692b284531ea689d26285e48f0df4f7db /compiler/rustc_lint/src
parent0bc2001879558ba0d51b6a246f5178853f9ff21e (diff)
downloadrust-85f2ecab576d3f02619b4d4976a6d7827c65ed4b.tar.gz
rust-85f2ecab576d3f02619b4d4976a6d7827c65ed4b.zip
Add a `fn main() {}` to a doctest to prevent the test from being wrapped in a `fn main() {}` body
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
index 6098da990c0..7aef6321eeb 100644
--- a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
+++ b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
@@ -46,6 +46,8 @@ declare_lint! {
     /// fn test() -> impl Trait<Assoc = Tait> {
     ///     42
     /// }
+    ///
+    /// fn main() {}
     /// ```
     ///
     /// {{produces}}