Closed
Description
Upgrading iron
in my project causes an ICE. This is possibly the same as #36701, but this must be new as I only see the ICE on beta/nightly, not on the current stable channel, which is way newer than the bug report.
Test repo: https://github.com/FauxFaux/quad-image/blob/ice/src/main.rs
git clone -b ice https://github.com/FauxFaux/quad-image.git
Relevant code:
fn handle(req: &mut Request) -> IronResult<Response> {
req.get_ref::<Params>();
unimplemented!()
}
error: internal compiler error: /checkout/src/librustc_typeck/check/method/confirm.rs:330: &mut iron::Request<'_, '_> was a subtype of &mut _ but now is not?
--> src/main.rs:8:9
|
8 | req.get_ref::<Params>();
| ^^^^^^^
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: rustc 1.23.0-nightly (3b82e4c74 2017-11-05) running on x86_64-unknown-linux-gnu
rustc 1.23.0-nightly (3b82e4c74 2017-11-05)
binary: rustc
commit-hash: 3b82e4c74d43fc1273244532c3a90bf9912061cf
commit-date: 2017-11-05
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0
On stable:
error[E0277]: the trait bound `params::Params: plugin::Plugin<iron::Request<'_, '_>>` is not satisfied
--> src/main.rs:8:9
|
8 | req.get_ref::<Params>();
| ^^^^^^^ the trait `plugin::Plugin<iron::Request<'_, '_>>` is not implemented for `params::Params`
|
= help: the following implementations were found:
<params::Params as plugin::Plugin<iron::request::Request<'a, 'b>>>
error: aborting due to previous error
I note that (on all releases), cargo decides to download two different versions of iron
? This doesn't seem right.
Compiling iron v0.5.1
Compiling iron v0.6.0
Cargo.toml:
[dependencies]
iron = "0.6.0"
params = "0.7.1"
% cargo tree | fgrep -B2 iron
boom v0.1.0 (file:///home/faux/code/quad-image)
├── iron v0.6.0
--
└── params v0.7.1
├── bodyparser v0.6.0
│ ├── iron v0.5.1
...