Skip to content

Conversation

@taiki-e
Copy link
Member

@taiki-e taiki-e commented Oct 23, 2020

Fix Send/Sync impls and add PhantomData<&'a mut U> to tell the compiler that the guard is own a &mut U.

This is technically a breaking change, but the code failed to compile by this change is unsound, so this breakage should be acceptable.

Fixes #2239

@taiki-e taiki-e merged commit cfb827a into rust-lang:master Oct 23, 2020
@taiki-e taiki-e deleted the mutex-map branch October 23, 2020 17:13
@taiki-e taiki-e mentioned this pull request Oct 23, 2020
@taiki-e taiki-e added the A-lock Area: futures::lock label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lock Area: futures::lock

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MappedMutexGuard Send/Sync bound is unsound

2 participants