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

Wrong 'unexpected close delimiter' (not clear why) #46642

Closed
mqudsi opened this issue Dec 10, 2017 · 1 comment
Closed

Wrong 'unexpected close delimiter' (not clear why) #46642

mqudsi opened this issue Dec 10, 2017 · 1 comment

Comments

@mqudsi
Copy link
Contributor

mqudsi commented Dec 10, 2017

The following code returns an error about 'unexpected close delimiter' even though all braces and parentheses are matched correctly:

#![feature(conservative_impl_trait)]

extern crate futures;
extern crate tokio_core;
use futures::future::{self};
use futures::future::*;
use tokio_core::reactor::Core;

fn main() {
    let mut core = Core::new().expect("Failed to initialize tokio_core reactor!");

    let f = create_future();

    core.run(f).unwrap();
}

fn create_future() -> Result<()>
    return future::ok(());
}
@mqudsi mqudsi changed the title Wrong 'unexpected close delimiter' when Ok() is used in return type declaration Wrong 'unexpected close delimiter' (not clear why) Dec 10, 2017
@petrochenkov
Copy link
Contributor

Something is missing after Result<()>, an opening {.

@mqudsi mqudsi closed this as completed Dec 10, 2017
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

No branches or pull requests

2 participants