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

Incorrect characters in insta snapshots #102

Open
tamasfe opened this issue Sep 4, 2022 · 3 comments
Open

Incorrect characters in insta snapshots #102

tamasfe opened this issue Sep 4, 2022 · 3 comments
Labels

Comments

@tamasfe
Copy link
Member

tamasfe commented Sep 4, 2022

Weird characters appear seemingly randomly in formatter output snapshots that I haven't been able to reproduce outside tests.

image

@tamasfe tamasfe added E-Unknown tests A-fmt Area: Formatter labels Sep 4, 2022
@tamasfe
Copy link
Member Author

tamasfe commented Sep 4, 2022

I suspected that it was an use-after-free error due to the way handle strings in the formatter:

// SAFETY: we guarantee that the syntax token

But miri does not complain about it.

@schungx
Copy link
Collaborator

schungx commented Sep 5, 2022

I suspected that it was an use-after-free error due to the way handle strings in the formatter:

I wonder how this can happen with Rust... Is it unsafe code?

@tamasfe
Copy link
Member Author

tamasfe commented Sep 5, 2022

I suspected that it was an use-after-free error due to the way handle strings in the formatter:

I wonder how this can happen with Rust... Is it unsafe code?

Yes, what I linked is unsafe :). But it appears to be correct and isn't the cause.

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

No branches or pull requests

2 participants