这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@folkertdev
Copy link
Member

No description provided.

@folkertdev folkertdev merged commit 0e95888 into main Sep 19, 2024
@folkertdev folkertdev deleted the copy-match-tests branch September 19, 2024 12:06
Comment on lines +179 to +181
let ptr = buf.as_mut_ptr();
unsafe {
Self::copy_chunk_unchecked::<C>(
buf.as_ptr().add(start),
buf.as_mut_ptr().add(current),
buf.as_ptr().add(end),
)
Self::copy_chunk_unchecked::<C>(ptr.add(start), ptr.add(current), ptr.add(end))
Copy link
Member Author

Choose a reason for hiding this comment

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

it is against miri rules to use the as_ptr to read from something modified by the as_mut_ptr. This is easily fixed by basing all pointers off of the mutable pointer. Because of subtyping, the mut is degrated to const when the type signatures demand it.

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