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 COM authoring diagnostics #3036

Open
kennykerr opened this issue May 13, 2024 · 0 comments
Open

Improve COM authoring diagnostics #3036

kennykerr opened this issue May 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kennykerr
Copy link
Collaborator

kennykerr commented May 13, 2024

The interface and implement macros, while powerful, suffer from the fact that they have no contextual information. They can only parse the tokens provided to them and don't necessarily know what those types and paths refer to. There are two areas where I think we might be able to practically improve upon the existing experience:

  • Detect non-copyable types used in interface macro. Such types, specifically with a Drop implementation, can't be used on the ABI/FFI boundary as it violates calling convention rules. This is currently not detected but I suspect we can force a compiler error by checking for copyability.

  • When declaring an interface to implement with the implement macro, all the necessary features must be enabled both for the interface itself and the implementation trait. I'm hoping we can provide a more helpful error message when features are simply missing, perhaps using the new diagnostics attributes feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant