Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

jakobhellermann
Copy link
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
Copy link
Member

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

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.

Copy link
Contributor

@PROMETHIA-27 PROMETHIA-27 left a comment

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
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 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