Skip to content

[Merged by Bors] - relax Sized bounds around change detection types - #5917

Closed
jakobhellermann wants to merge 3 commits into
bevyengine:mainfrom
jakobhellermann:relax-sized-change-detetion
Closed

jakobhellermann wants to merge 3 commits into
bevyengine:mainfrom
jakobhellermann:relax-sized-change-detetion

Conversation

@jakobhellermann

Copy link
Copy Markdown
Contributor

Objective

I wanted to run the code

let reflect_resource: ReflectResource = ...;
let value: Mut<dyn Reflect> = reflect_resource.reflect(world);
value.deref();
// ^ ERROR: deref method doesn't exist because `dyn Reflect` doesnt satisfy `: Sized`.

Solution

Relax Sized bounds in all the methods and trait implementations for Mut and friends.

@jakobhellermann jakobhellermann added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events A-Reflection Runtime information about types labels Sep 8, 2022

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objection to this, and I trust the compiler.

@PROMETHIA-27 PROMETHIA-27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 9, 2022
@alice-i-cecile

Copy link
Copy Markdown
Member

bors r+

bors Bot pushed a commit that referenced this pull request Sep 9, 2022
# Objective

I wanted to run the code
```rust
let reflect_resource: ReflectResource = ...;
let value: Mut<dyn Reflect> = reflect_resource.reflect(world);
value.deref();
// ^ ERROR: deref method doesn't exist because `dyn Reflect` doesnt satisfy `: Sized`.
```

## Solution

Relax `Sized` bounds in all the methods and trait implementations for `Mut` and friends.
@bors

bors Bot commented Sep 9, 2022

Copy link
Copy Markdown

@bors bors Bot changed the title relax Sized bounds around change detection types [Merged by Bors] - relax Sized bounds around change detection types Sep 9, 2022
@bors bors Bot closed this Sep 9, 2022
@jakobhellermann
jakobhellermann deleted the relax-sized-change-detetion branch September 11, 2022 09:56
nicopap pushed a commit to nicopap/bevy that referenced this pull request Sep 12, 2022
# Objective

I wanted to run the code
```rust
let reflect_resource: ReflectResource = ...;
let value: Mut<dyn Reflect> = reflect_resource.reflect(world);
value.deref();
// ^ ERROR: deref method doesn't exist because `dyn Reflect` doesnt satisfy `: Sized`.
```

## Solution

Relax `Sized` bounds in all the methods and trait implementations for `Mut` and friends.
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

I wanted to run the code
```rust
let reflect_resource: ReflectResource = ...;
let value: Mut<dyn Reflect> = reflect_resource.reflect(world);
value.deref();
// ^ ERROR: deref method doesn't exist because `dyn Reflect` doesnt satisfy `: Sized`.
```

## Solution

Relax `Sized` bounds in all the methods and trait implementations for `Mut` and friends.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

I wanted to run the code
```rust
let reflect_resource: ReflectResource = ...;
let value: Mut<dyn Reflect> = reflect_resource.reflect(world);
value.deref();
// ^ ERROR: deref method doesn't exist because `dyn Reflect` doesnt satisfy `: Sized`.
```

## Solution

Relax `Sized` bounds in all the methods and trait implementations for `Mut` and friends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants