Closed
Description
Pushed my code to https://github.com/bjorn3/goodgame_empire_import/tree/ice.
I also added a comment with the line I changed before I got a ICE.
$ cargo test
Compiling goodgame_empire_import v0.1.1 (~/Documents/goodgame_empire_import)
error[E0308]: match arms have incompatible types
--> src/data.rs:36:17
|
36 | match v {
| _________________^ starting here...
37 | | 0 => World::Grass,
38 | | 1 => World::Sand,
39 | | 2 => World::Ice,
40 | | 3 => World::Fire,
41 | | 4 => World::SpecialEvent,
42 | | _ => panic!("Unrecognized world number {}", v),
43 | | }
| |_________________^ ...ending here: expected enum `std::result::Result`, found enum `data::World`
|
= note: expected type `_`
found type `data::World`
note: match arm with an incompatible type
--> src/data.rs:37:26
|
37 | 0 => World::Grass,
| ^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/data.rs:46:79
|
46 | fn expecting(&self, expecting: &mut fmt::Formatter) -> fmt::Result{
| _______________________________________________________________________________^ starting here...
47 | |
48 | | }
| |_____________^ ...ending here: expected enum `std::result::Result`, found ()
|
= note: expected type `std::result::Result<(), std::fmt::Error>`
found type `()`
error[E0308]: match arms have incompatible types
--> src/data.rs:36:17
|
36 | match v {
| _________________^ starting here...
37 | | 0 => World::Grass,
38 | | 1 => World::Sand,
39 | | 2 => World::Ice,
40 | | 3 => World::Fire,
41 | | 4 => World::SpecialEvent,
42 | | _ => panic!("Unrecognized world number {}", v),
43 | | }
| |_________________^ ...ending here: expected enum `std::result::Result`, found enum `data::World`
|
= note: expected type `_`
found type `data::World`
note: match arm with an incompatible type
--> src/data.rs:37:26
|
37 | 0 => World::Grass,
| ^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/data.rs:46:79
|
46 | fn expecting(&self, expecting: &mut fmt::Formatter) -> fmt::Result{
| _______________________________________________________________________________^ starting here...
47 | |
48 | | }
| |_____________^ ...ending here: expected enum `std::result::Result`, found ()
|
= note: expected type `std::result::Result<(), std::fmt::Error>`
found type `()`
error: aborting due to 2 previous errors
error: Could not compile `goodgame_empire_import`.
Build failed, waiting for other jobs to finish...
error: aborting due to 2 previous errors
error: build failed
iMac:goodgame_empire_import bjorn$ cargo test
Compiling goodgame_empire_import v0.1.1 (file:///Users/bjorn/Documents/goodgame_empire_import)
error: cannot find macro `arguments!` in this scope
--> src/data.rs:42:43
|
42 | _ => D::Error::custom(arguments!("Unrecognized world number {}", v)),
| ^^^^^^^^^
error[E0401]: can't use type parameters from outer function; try using a local type parameter instead
--> src/data.rs:42:26
|
42 | _ => D::Error::custom(arguments!("Unrecognized world number {}", v)),
| ^^^^^^^^^^^^^^^^ use of type variable from outer function
error: cannot find macro `arguments!` in this scope
--> src/data.rs:42:43
|
42 | _ => D::Error::custom(arguments!("Unrecognized world number {}", v)),
| ^^^^^^^^^
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
error[E0401]: can't use type parameters from outer function; try using a local type parameter instead
--> src/data.rs:42:26
|
42 | _ => D::Error::custom(arguments!("Unrecognized world number {}", v)),
| ^^^^^^^^^^^^^^^^ use of type variable from outer function
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: resolution.depth == 0 || resolution.base_def != Def::Err', src/librustc_resolve/lib.rs:3060
stack backtrace:
1: 0x10aef01e9 - std::sys::imp::backtrace::tracing::imp::write::h9559bd7cb15d72ad
2: 0x10aefcc9e - std::panicking::default_hook::{{closure}}::h4b3f2b69c9ce844d
3: 0x10aefc8cb - std::panicking::default_hook::h61d415f2381a7336
4: 0x10aefd117 - std::panicking::rust_panic_with_hook::h8e6300d8e8aca457
5: 0x1070e3334 - std::panicking::begin_panic::h07bca7d56e8cc59f
6: 0x10716ff18 - rustc_resolve::Resolver::record_def::h76da3c01d36079d3
7: 0x107165972 - rustc_resolve::Resolver::smart_resolve_path_fragment::h5d76ea9688e88cd4
8: 0x107165341 - rustc_resolve::Resolver::smart_resolve_path::hf3c46d2a237088c2
9: 0x10716ec01 - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
10: 0x10716e310 - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
11: 0x1071637a3 - rustc_resolve::Resolver::resolve_arm::h23d6d148db68a5b2
12: 0x107128eae - syntax::visit::walk_expr::h437c79100384b73b
13: 0x10716ec0c - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
14: 0x107163fcd - rustc_resolve::Resolver::resolve_block::hbaa1b9cd3b39d13b
15: 0x1071566d1 - <rustc_resolve::Resolver<'a> as syntax::visit::Visitor<'tcx>>::visit_fn::hc8ab95e4e9e1018f
16: 0x107126624 - syntax::visit::walk_impl_item::h8444851599ccdb5a
17: 0x107160e0f - rustc_resolve::Resolver::with_type_parameter_rib::h3e6c8e0287344f15
18: 0x1071620f1 - rustc_resolve::Resolver::with_current_self_type::h2d9f068bacea9de1
19: 0x107162a2a - rustc_resolve::Resolver::with_self_rib::hc4caf49323a9c233
20: 0x107162478 - rustc_resolve::Resolver::with_optional_trait_ref::ha2a0f64226efba95
21: 0x1071627ae - rustc_resolve::Resolver::with_self_rib::h3225ea62b06fd17b
22: 0x10715f9b8 - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
23: 0x107163fb5 - rustc_resolve::Resolver::resolve_block::hbaa1b9cd3b39d13b
24: 0x1071566d1 - <rustc_resolve::Resolver<'a> as syntax::visit::Visitor<'tcx>>::visit_fn::hc8ab95e4e9e1018f
25: 0x107126624 - syntax::visit::walk_impl_item::h8444851599ccdb5a
26: 0x107160e0f - rustc_resolve::Resolver::with_type_parameter_rib::h3e6c8e0287344f15
27: 0x1071620f1 - rustc_resolve::Resolver::with_current_self_type::h2d9f068bacea9de1
28: 0x107162a2a - rustc_resolve::Resolver::with_self_rib::hc4caf49323a9c233
29: 0x107162478 - rustc_resolve::Resolver::with_optional_trait_ref::ha2a0f64226efba95
30: 0x1071627ae - rustc_resolve::Resolver::with_self_rib::h3225ea62b06fd17b
31: 0x10715f9b8 - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
32: 0x10712925e - syntax::visit::walk_item::hf987c90749bc584f
33: 0x10715fb8f - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
34: 0x10715924e - rustc_resolve::Resolver::resolve_crate::he366a34c39e14f9e
35: 0x105ed59a1 - rustc_driver::driver::phase_2_configure_and_expand::hb928c8ce49deb9dc
36: 0x105ecb36d - rustc_driver::driver::compile_input::hd50a6918443232a0
37: 0x105f1321e - rustc_driver::run_compiler::h5151bfc01962b066
38: 0x105e28928 - std::panicking::try::do_call::h9e86b95d9c931e3d
39: 0x10aeffd6a - __rust_maybe_catch_panic
40: 0x105e51353 - <F as alloc::boxed::FnBox<A>>::call_box::ha55b035dd9316cf5
41: 0x10aefbdc4 - std::sys::imp::thread::Thread::new::thread_start::h80e9dc7cc1dfe0d2
42: 0x7fff89bfa99c - _pthread_body
43: 0x7fff89bfa919 - _pthread_start
error: Could not compile `goodgame_empire_import`.
Build failed, waiting for other jobs to finish...
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: resolution.depth == 0 || resolution.base_def != Def::Err', src/librustc_resolve/lib.rs:3060
stack backtrace:
1: 0x113b081e9 - std::sys::imp::backtrace::tracing::imp::write::h9559bd7cb15d72ad
2: 0x113b14c9e - std::panicking::default_hook::{{closure}}::h4b3f2b69c9ce844d
3: 0x113b148cb - std::panicking::default_hook::h61d415f2381a7336
4: 0x113b15117 - std::panicking::rust_panic_with_hook::h8e6300d8e8aca457
5: 0x10fceb334 - std::panicking::begin_panic::h07bca7d56e8cc59f
6: 0x10fd77f18 - rustc_resolve::Resolver::record_def::h76da3c01d36079d3
7: 0x10fd6d972 - rustc_resolve::Resolver::smart_resolve_path_fragment::h5d76ea9688e88cd4
8: 0x10fd6d341 - rustc_resolve::Resolver::smart_resolve_path::hf3c46d2a237088c2
9: 0x10fd76c01 - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
10: 0x10fd76310 - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
11: 0x10fd6b7a3 - rustc_resolve::Resolver::resolve_arm::h23d6d148db68a5b2
12: 0x10fd30eae - syntax::visit::walk_expr::h437c79100384b73b
13: 0x10fd76c0c - rustc_resolve::Resolver::resolve_expr::h09b0dc21b3ab616b
14: 0x10fd6bfcd - rustc_resolve::Resolver::resolve_block::hbaa1b9cd3b39d13b
15: 0x10fd5e6d1 - <rustc_resolve::Resolver<'a> as syntax::visit::Visitor<'tcx>>::visit_fn::hc8ab95e4e9e1018f
16: 0x10fd2e624 - syntax::visit::walk_impl_item::h8444851599ccdb5a
17: 0x10fd68e0f - rustc_resolve::Resolver::with_type_parameter_rib::h3e6c8e0287344f15
18: 0x10fd6a0f1 - rustc_resolve::Resolver::with_current_self_type::h2d9f068bacea9de1
19: 0x10fd6aa2a - rustc_resolve::Resolver::with_self_rib::hc4caf49323a9c233
20: 0x10fd6a478 - rustc_resolve::Resolver::with_optional_trait_ref::ha2a0f64226efba95
21: 0x10fd6a7ae - rustc_resolve::Resolver::with_self_rib::h3225ea62b06fd17b
22: 0x10fd679b8 - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
23: 0x10fd6bfb5 - rustc_resolve::Resolver::resolve_block::hbaa1b9cd3b39d13b
24: 0x10fd5e6d1 - <rustc_resolve::Resolver<'a> as syntax::visit::Visitor<'tcx>>::visit_fn::hc8ab95e4e9e1018f
25: 0x10fd2e624 - syntax::visit::walk_impl_item::h8444851599ccdb5a
26: 0x10fd68e0f - rustc_resolve::Resolver::with_type_parameter_rib::h3e6c8e0287344f15
27: 0x10fd6a0f1 - rustc_resolve::Resolver::with_current_self_type::h2d9f068bacea9de1
28: 0x10fd6aa2a - rustc_resolve::Resolver::with_self_rib::hc4caf49323a9c233
29: 0x10fd6a478 - rustc_resolve::Resolver::with_optional_trait_ref::ha2a0f64226efba95
30: 0x10fd6a7ae - rustc_resolve::Resolver::with_self_rib::h3225ea62b06fd17b
31: 0x10fd679b8 - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
32: 0x10fd3125e - syntax::visit::walk_item::hf987c90749bc584f
33: 0x10fd67b8f - rustc_resolve::Resolver::resolve_item::h4583f1200c5cff01
34: 0x10fd6124e - rustc_resolve::Resolver::resolve_crate::he366a34c39e14f9e
35: 0x10eae79a1 - rustc_driver::driver::phase_2_configure_and_expand::hb928c8ce49deb9dc
36: 0x10eadd36d - rustc_driver::driver::compile_input::hd50a6918443232a0
37: 0x10eb2521e - rustc_driver::run_compiler::h5151bfc01962b066
38: 0x10ea3a928 - std::panicking::try::do_call::h9e86b95d9c931e3d
39: 0x113b17d6a - __rust_maybe_catch_panic
40: 0x10ea63353 - <F as alloc::boxed::FnBox<A>>::call_box::ha55b035dd9316cf5
41: 0x113b13dc4 - std::sys::imp::thread::Thread::new::thread_start::h80e9dc7cc1dfe0d2
42: 0x7fff89bfa99c - _pthread_body
43: 0x7fff89bfa919 - _pthread_start
error: build failed
$
$ rustup show
Default host: x86_64-apple-darwin
installed toolchains
--------------------
stable-x86_64-apple-darwin (default)
beta-2016-12-20-x86_64-apple-darwin
nightly-2016-04-14-x86_64-apple-darwin
nightly-2016-04-25-x86_64-apple-darwin
nightly-2016-09-29-x86_64-apple-darwin
nightly-2016-09-30-x86_64-apple-darwin
nightly-2016-12-29-x86_64-apple-darwin
nightly-x86_64-apple-darwin
nightly-x86_64-pc-windows-gnu
installed targets for active toolchain
--------------------------------------
i686-unknown-linux-gnu
wasm32-unknown-emscripten
x86_64-apple-darwin
active toolchain
----------------
nightly-x86_64-apple-darwin (directory override for '~/Documents/goodgame_empire_import')
rustc 1.17.0-nightly (536a900c4 2017-02-17)