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

Adding str support back #369

Merged
merged 7 commits into from
Nov 28, 2023
Merged

Conversation

robertbastian
Copy link
Collaborator

@robertbastian robertbastian commented Nov 22, 2023

Diplomat will generate C++ docs that say invalid UTF-8 is UB. However, this is not inline documentation, so I'm not super happy with this.

#57

macro/src/lib.rs Show resolved Hide resolved
Type::Slice(hir::Slice::Str(_, hir::StringEncoding::UnvalidatedUtf8)) => {
Type::Slice(hir::Slice::Str(
_,
hir::StringEncoding::UnvalidatedUtf8 | hir::StringEncoding::Utf8,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we should emit docs, yes?

Copy link
Contributor

Choose a reason for hiding this comment

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

or are we relying on cpp2's lack of docs? if so we should have an issue filed for that and note that str validity should be added

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was assuming we'll continue using the current cpp docs for cpp2?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, cpp2 has a different structure.

@robertbastian robertbastian merged commit a0586ac into rust-diplomat:main Nov 28, 2023
5 checks passed
@robertbastian robertbastian deleted the unsafestr branch November 28, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants