Skip to content

False positive type mismatch on unsizing structs #15133

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

Closed
HKalbasi opened this issue Jun 25, 2023 · 2 comments
Closed

False positive type mismatch on unsizing structs #15133

HKalbasi opened this issue Jun 25, 2023 · 2 comments
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@HKalbasi
Copy link
Member

#[derive(Debug)]
struct MyWrapper<T: ?Sized>(T);

fn x() {
    let x = &MyWrapper([1u8, 2, 3]);
    let y: &MyWrapper<[u8]> = x; // expected MyWrapper<[u8]> found MyWrapper<[u8; 3]>
}
@HKalbasi HKalbasi added C-bug Category: bug A-ty type system / type inference / traits / method resolution labels Jun 25, 2023
@Veykril
Copy link
Member

Veykril commented Jun 25, 2023

I think this is #13864?

@HKalbasi
Copy link
Member Author

Yes that's it.

@HKalbasi HKalbasi closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants