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

thread 'main' panicked at 'called Option::unwrap() on a None value', /checkout/src/libcore/option.rs:323 #236

Closed
crazyjin opened this issue Mar 20, 2017 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@crazyjin
Copy link

#git clone https://github.com/SergioBenitez/rocket
#cd rocket/examples/hello_world
#cargo run
thread 'main' panicked at 'called Option::unwrap() on a None value', /checkout/src/libcore/option.rs:323
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
stack backtrace:
0: cargo::version
at /checkout/src/libcore/macros.rs:21
at /checkout/cargo/src/cargo/lib.rs:263
1: cargo::ops::registry::http_handle
at /checkout/cargo/src/cargo/ops/registry.rs:227
2: <cargo::sources::registry::remote::RemoteRegistry<'cfg> as cargo::sources::registry::RegistryData>::update_index
at /checkout/cargo/src/cargo/sources/registry/remote.rs:63
3: cargo::sources::registry::RegistrySource::do_update
at /checkout/cargo/src/cargo/sources/registry/mod.rs:309
4: <cargo::sources::registry::RegistrySource<'cfg> as cargo::core::source::Source>::update
at /checkout/cargo/src/cargo/sources/registry/mod.rs:353
5: cargo::core::registry::PackageRegistry::ensure_loaded
at /checkout/cargo/src/cargo/core/registry.rs:191
at /checkout/cargo/src/cargo/util/errors.rs:58
at /checkout/cargo/src/cargo/core/registry.rs:180
at /checkout/cargo/src/cargo/core/registry.rs:141
6: <cargo::core::registry::PackageRegistry<'cfg> as cargo::core::registry::Registry>::query
at /checkout/cargo/src/cargo/core/registry.rs:339
7: <&'a mut I as core::iter::iterator::Iterator>::next
at /checkout/cargo/src/cargo/core/resolver/mod.rs:859
at /checkout/cargo/src/cargo/core/resolver/mod.rs:832
at /checkout/src/libcore/ops.rs:2654
at /checkout/src/libcore/option.rs:383
at /checkout/src/libcore/iter/mod.rs:999
at /checkout/src/libcore/result.rs:1087
at /checkout/src/libcore/iter/iterator.rs:2197
8: cargo::core::resolver::activate
at /checkout/src/libcollections/vec.rs:1653
at /checkout/src/libcollections/vec.rs:1566
at /checkout/src/libcore/result.rs:1104
at /checkout/src/libcore/iter/iterator.rs:1221
at /checkout/cargo/src/cargo/core/resolver/mod.rs:831
at /checkout/cargo/src/cargo/core/resolver/mod.rs:340
9: cargo::core::resolver::activate_deps_loop
at /checkout/cargo/src/cargo/core/resolver/mod.rs:457
10: cargo::core::resolver::resolve
at /checkout/cargo/src/cargo/core/resolver/mod.rs:280
11: cargo::ops::resolve::resolve_with_previous
at /checkout/cargo/src/cargo/ops/resolve.rs:225
12: cargo::ops::resolve::resolve_with_registry
at /checkout/cargo/src/cargo/ops/resolve.rs:88
13: cargo::ops::resolve::resolve_ws_precisely
at /checkout/cargo/src/cargo/ops/resolve.rs:43
14: cargo::ops::cargo_compile::compile_ws
at /checkout/cargo/src/cargo/ops/cargo_compile.rs:177
15: cargo::ops::cargo_compile::compile_with_exec
at /checkout/cargo/src/cargo/ops/cargo_compile.rs:153
16: cargo::ops::cargo_run::run
at /checkout/cargo/src/cargo/ops/cargo_compile.rs:141
at /checkout/cargo/src/cargo/ops/cargo_run.rs:55
17: cargo::try_execute_builtin_command
at /checkout/cargo/src/bin/run.rs:108
at /checkout/cargo/src/cargo/lib.rs:128
at /checkout/cargo/src/bin/cargo.rs:259
18: cargo::execute
at /checkout/cargo/src/bin/cargo.rs:223
19: cargo::call_main_without_stdin
at /checkout/cargo/src/cargo/lib.rs:128
20: cargo::main
at /checkout/cargo/src/bin/cargo.rs:91
at /checkout/cargo/src/bin/cargo.rs:84

#rustc --version
rustc 1.17.0-nightly (a559452b0 2017-03-17)

@Eijebong
Copy link
Contributor

That was a regression in rust/cargo. There is a second one though that impacts rocket, see #235

@SergioBenitez
Copy link
Member

Rust nightly 2017-03-17 shipped with a bug in cargo (rust-lang/cargo#3844), resulting in what you see there. Rust nightly 2017-03-18 shipped with a bug in rustc (rust-lang/rust#40663, fixed in rust-lang/rust#40664, discussed in #235) that affected Rocket. The last fully working nightly release is 2017-03-16. Use rustup default nightly-2017-03-16 to switch to this version. Once the rustc bug has been fixed, a new version of Rocket will be released. At this point, you'll need to switch to the latest nightly via rustup default nightly.

Closing this as a "duplicate" of #235.

@SergioBenitez SergioBenitez added the duplicate This issue or pull request already exists label Mar 20, 2017
@crazyjin
Copy link
Author

@SergioBenitez @Eijebong Thank you for all your work on rocket. I swithed to the last nightly-2017-03-16 and problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants