We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f863638 commit cacabefCopy full SHA for cacabef
tests/ui/autoref-autoderef/autoderef-box-no-add.rs
@@ -1,3 +1,10 @@
1
+//! Tests that auto-dereferencing does not allow addition of `Box<isize>` values.
2
+//!
3
+//! This test ensures that `Box<isize>` fields in structs (`Clam` and `Fish`) are not
4
+//! automatically dereferenced to `isize` during addition operations, as `Box<isize>`
5
+//! does not implement the `Add` trait. Attempts to add `Box<isize>` values should
6
+//! result in a compile error.
7
+
8
struct Clam {
9
x: Box<isize>,
10
y: Box<isize>,
0 commit comments