I ran into this originally on Linux, but I'm able to reproduce the same error on my Windows machine. I found this when I noticed my own code stopped compiling and erroring on the Rocket dependency. I don't need to use my code to do it though. I can clone rocket and run the hello world example right inside the cloned directory:
C:\git\Rocket\examples\hello_world>cargo --version
cargo 1.46.0-nightly (c26576f9a 2020-06-23)
C:\git\Rocket\examples\hello_world>cargo run --verbose
warning: C:\git\Rocket\contrib\lib\Cargo.toml: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. This value is not supported for selecting dependencies and will not work as expected. To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Fresh unicode-xid v0.1.0
Fresh version_check v0.1.5
Fresh smallvec v0.6.10
Fresh matches v0.1.8
Fresh cfg-if v0.1.9
Fresh yansi v0.4.0
Fresh cc v1.0.37
Fresh percent-encoding v1.0.1
Fresh version_check v0.9.1
Fresh safemem v0.3.0
Fresh yansi v0.5.0
Fresh untrusted v0.6.2
Fresh language-tags v0.2.2
Fresh typeable v0.1.2
Fresh traitobject v0.1.0
Fresh state v0.4.1
Fresh indexmap v1.0.2
Fresh unicode-normalization v0.1.8
Fresh unicode-bidi v0.3.4
Fresh log v0.4.6
Fresh proc-macro2 v0.4.30
Fresh byteorder v1.3.2
Fresh libc v0.2.59
Fresh winapi v0.3.7
Fresh idna v0.1.5
Fresh bitflags v1.1.0
Fresh log v0.3.9
Fresh httparse v1.3.4
Fresh serde v1.0.94
Fresh quote v0.6.12
Fresh base64 v0.9.3
Fresh url v1.7.2
Fresh time v0.1.42
Fresh num_cpus v1.10.1
Fresh atty v0.2.11
Fresh base64 v0.10.1
Fresh memchr v2.2.1
Fresh mime v0.2.6
Fresh unicase v1.4.2
Fresh ring v0.13.5
Fresh syn v0.15.39
Fresh toml v0.4.10
Fresh devise_core v0.2.0
Fresh pear_codegen v0.1.2
Fresh hyper v0.10.16
Fresh cookie v0.11.1
Fresh devise_codegen v0.2.0
Fresh pear v0.1.2
Fresh devise v0.2.0
Compiling rocket_http v0.4.2 (C:\git\Rocket\core\http)
Running `rustc --crate-name rocket_http core\http\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C codegen-units=4 -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"private-cookies\"" -C metadata=8881adb9ae43fd4e -C extra-filename=-8881adb9ae43fd4e --out-dir C:\git\Rocket\target\debug\deps -C incremental=C:\git\Rocket\target\debug\incremental -L dependency=C:\git\Rocket\target\debug\deps --extern cookie=C:\git\Rocket\target\debug\deps\libcookie-c343cc237377bde9.rmeta --extern hyper=C:\git\Rocket\target\debug\deps\libhyper-c1684e010c176d90.rmeta --extern indexmap=C:\git\Rocket\target\debug\deps\libindexmap-ee78d5896dec7a8c.rmeta --extern pear=C:\git\Rocket\target\debug\deps\libpear-368bf70121d38490.rmeta --extern percent_encoding=C:\git\Rocket\target\debug\deps\libpercent_encoding-065023d3b5dd5fe6.rmeta --extern smallvec=C:\git\Rocket\target\debug\deps\libsmallvec-381d0bb2a7b17821.rmeta --extern state=C:\git\Rocket\target\debug\deps\libstate-b293510bc3a76e42.rmeta --extern time=C:\git\Rocket\target\debug\deps\libtime-80fb992cd36b5f02.rmeta --extern unicode_xid=C:\git\Rocket\target\debug\deps\libunicode_xid-0a0944fb9c0457d4.rmeta -L native=C:\git\Rocket\target\debug\build\ring-fa4ab5c6d8f27196\out`
error: proc macro panicked
--> core\http\src\parse\uri\parser.rs:119:34
|
119 | let path_and_query = pear_try!(path_and_query(is_pchar));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: called `Option::unwrap()` on a `None` value
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
--> core\http\src\lib.rs:1:12
|
1 | #![feature(specialization)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
warning: trait objects without an explicit `dyn` are deprecated
--> core\http\src\uri\uri_display.rs:297:43
|
297 | impl<'a, P: UriPart> fmt::Display for &'a UriDisplay<P> {
| ^^^^^^^^^^^^^ help: use `dyn`: `dyn UriDisplay<P>`
|
= note: `#[warn(bare_trait_objects)]` on by default
warning: `...` range patterns are deprecated
--> core\http\src\parse\checkers.rs:9:12
|
9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\''
| ^^^ help: use `..=` for an inclusive range
|
= note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default
warning: `...` range patterns are deprecated
--> core\http\src\parse\checkers.rs:9:24
|
9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\''
| ^^^ help: use `..=` for an inclusive range
warning: `...` range patterns are deprecated
--> core\http\src\parse\checkers.rs:9:36
|
9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\''
| ^^^ help: use `..=` for an inclusive range
warning: `...` range patterns are deprecated
--> core\http\src\parse\checkers.rs:9:48
|
9 | '0'...'9' | 'A'...'Z' | '^'...'~' | '#'...'\''
| ^^^ help: use `..=` for an inclusive range
error: aborting due to previous error; 6 warnings emitted
error: could not compile `rocket_http`.
Caused by:
process didn't exit successfully: `rustc --crate-name rocket_http core\http\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C codegen-units=4 -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"private-cookies\"" -C metadata=8881adb9ae43fd4e -C extra-filename=-8881adb9ae43fd4e --out-dir C:\git\Rocket\target\debug\deps -C incremental=C:\git\Rocket\target\debug\incremental -L dependency=C:\git\Rocket\target\debug\deps --extern cookie=C:\git\Rocket\target\debug\deps\libcookie-c343cc237377bde9.rmeta --extern hyper=C:\git\Rocket\target\debug\deps\libhyper-c1684e010c176d90.rmeta --extern indexmap=C:\git\Rocket\target\debug\deps\libindexmap-ee78d5896dec7a8c.rmeta --extern pear=C:\git\Rocket\target\debug\deps\libpear-368bf70121d38490.rmeta --extern percent_encoding=C:\git\Rocket\target\debug\deps\libpercent_encoding-065023d3b5dd5fe6.rmeta --extern smallvec=C:\git\Rocket\target\debug\deps\libsmallvec-381d0bb2a7b17821.rmeta --extern state=C:\git\Rocket\target\debug\deps\libstate-b293510bc3a76e42.rmeta --extern time=C:\git\Rocket\target\debug\deps\libtime-80fb992cd36b5f02.rmeta --extern unicode_xid=C:\git\Rocket\target\debug\deps\libunicode_xid-0a0944fb9c0457d4.rmeta -L native=C:\git\Rocket\target\debug\build\ring-fa4ab5c6d8f27196\out` (exit code: 1)
Am I missing something? This feels like it should work. In the example above I'm on Win10, but it gives the same error compiling in a docker container for the rust nightly, or even on my ubuntu 20.04 server.
I ran into this originally on Linux, but I'm able to reproduce the same error on my Windows machine. I found this when I noticed my own code stopped compiling and erroring on the Rocket dependency. I don't need to use my code to do it though. I can clone rocket and run the hello world example right inside the cloned directory:
Am I missing something? This feels like it should work. In the example above I'm on Win10, but it gives the same error compiling in a docker container for the rust nightly, or even on my ubuntu 20.04 server.