for Foo {
}
/// I have warnings!
+///
+///
+///
+/// ```ignore (it's a test)
+/// let x = 12;
+/// ```
+///
+///
pub struct WarningStruct;
/// Just a normal enum.
diff --git a/tests/rustdoc-gui/warning-block.goml b/tests/rustdoc-gui/warning-block.goml
index 34207ed..b45c3ec 100644
--- a/tests/rustdoc-gui/warning-block.goml
+++ b/tests/rustdoc-gui/warning-block.goml
@@ -53,3 +53,11 @@ go-to: "file://" + |DOC_PATH| + "/test_docs/struct.WarningStruct.html"
store-position: ("#doc-warning-0", {"y": warn_div_y})
store-position: ("#doc-warning-0::before", {"y": warn_y})
assert: |warn_y| == |warn_div_y| + |default_y_pos| + 15
+
+// The tooltip of a code example inside a warning must not overlap the warning's left border.
+store-position: ("#doc-warning-3", {"x": warn_x})
+store-position: ("#doc-warning-3 .example-wrap", {"x": code_x})
+store-position: ("#doc-warning-3 .example-wrap .tooltip", {"x": tooltip_x})
+store-size: ("#doc-warning-3 .example-wrap .tooltip", {"width": tooltip_width})
+assert: |tooltip_x| > |warn_x| + 2
+assert: |tooltip_x| + |tooltip_width| < |code_x|