bevyengine / bevyengine/bevy

bevy_utils::default abbreviation lacks warning

Open
#8,879 8 comments 2 reactions 0 assignees View on GitHub
A-Utils C-Bug S-Blocked
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.10.1

## What you did

```rust
struct SomeStruct;
impl Default for SomeStruct {
fn default() -> Self {
Self {
// ...fields,
..default()
}
}
}
```

## What went wrong

The previous code overflows the stack without warning.

## Additional information

If `..Default::default()` is used instead of `..default()`, the function gives a warning `function cannot return without recursing`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.