We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The some code:
#![feature(arbitrary_self_types)] #![feature(maybe_uninit_extra)] #![feature(maybe_uninit_ref)] use core::cell::UnsafeCell; use core::mem::MaybeUninit; #[repr(transparent)] pub struct Uninit<T>(MaybeUninit<UnsafeCell<T>>); impl<T> Uninit<T> { pub const fn new() -> Self { Self(MaybeUninit::uninit()) } /// Init value and return owned pointer pub fn init(&mut self, value: T) -> OsBox<T> { unsafe { // Error, true line: // let inner: &mut MaybeUninit<UnsafeCell<T>> = &mut self.0; let inner: &mut MaybeUninit<UnsafeCell<T> = &mut self.0; inner.write(UnsafeCell::new(value)); // Error, true line: // OsBox::new_unchecked(inner.get_mut().get()) OsBox::new_unchecked((inner.get_mut().get()) } } } fn main() { }
The code contains two syntax error (see above):
>
(
All { and } delimiters is true.
{
}
It give many error, the first:
error: incorrect close delimiter: `}` --> src/main.rs:28:9 | 18 | unsafe { | - close delimiter possibly meant for this ... 27 | OsBox::new_unchecked((inner.get_mut().get()) | - un-closed delimiter 28 | } | ^ incorrect close delimiter
Playground version: rustc 1.37.0-nightly (2019-05-29 37d001e)
playground
The text was updated successfully, but these errors were encountered:
fae7bc7
Successfully merging a pull request may close this issue.
The some code:
The code contains two syntax error (see above):
>
(
All
{
and}
delimiters is true.It give many error, the first:
Playground version: rustc 1.37.0-nightly (2019-05-29 37d001e)
playground
The text was updated successfully, but these errors were encountered: