You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7853c4f
Browse filesBrowse the repository at this point in the historyBrowse files
Translate records that contain declared but not defined methods (#394)
```cpp
struct S {
int a;
void declared_but_never_defined();
];
int main() {
S s{1};
assert(s.a == 1);
}
```
S is a valid record that can be translated to Rust. This PR translates
it like this:
```rs
struct S {
a: i32
}
trait SImpl {
fn declared_but_never_defined(&self) { unimplemented!() }
}
```
The function gets a default `unimplemented` implementation. Other TU
might offer a definition for the declared-only method.
0 commit comments