Skip to content

Commit 77374a9

Browse files
committed
Add failing test
1 parent 3f1a186 commit 77374a9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ui/misnamed_getters.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ impl B {
8585
}
8686
}
8787

88+
struct C {
89+
inner: Box<A>,
90+
}
91+
impl C {
92+
unsafe fn a(&self) -> &u8 {
93+
&self.inner.b
94+
}
95+
unsafe fn a_mut(&mut self) -> &mut u8 {
96+
&mut self.inner.b
97+
}
98+
}
99+
88100
fn main() {
89101
// test code goes here
90102
}

0 commit comments

Comments
 (0)