3 ms·
It does not require any use of the unsafe keyword. See the playground link containing a demonstration of the issue: https://play.rust-lang.org/?version=stable&
by TheDong 7y ago
It does not require any use of the unsafe keyword.
See the playground link containing a demonstration of the issue: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=70b7b28b690e0020f52695b9e086f5c2 https://play.rust-lang.org/?version=stable&mode=debug&editio...
The 'unsafe' keyword in the internals post is referring to the stdlib implementation of Pin. The stdlib's use of unsafe is supposed to uphold safety guarantees for all functions that aren't exposed as unsafe, and the stdlib failed the guarantee here, thus allowing a soundness bug without the user using 'unsafe' anywhere.