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

Improve diagnostics when performing illegal any coercion (fixes #212) #213

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Dec 9, 2020

This fixes the error message showcase in #212 from:

Error: bad argument #0: expected data of type `mut_instance_fn::Foo`, but found `Foo` (at inst 2)

To:

Error: bad argument #0: cannot borrow a shared reference `&Foo` mutably as `&mut Foo` (at inst 2)

@udoprog udoprog force-pushed the any-coercion-diagnostics branch from fe93943 to cc4e384 Compare December 9, 2020 20:17
@udoprog udoprog merged commit de95a13 into main Dec 9, 2020
@udoprog udoprog deleted the any-coercion-diagnostics branch December 9, 2020 20:45
@udoprog udoprog added enhancement New feature or request changelog Issue has been added to the changelog labels Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issue has been added to the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant