brson / miri

An experimental compiler from Rust to WebAssembly (inactive - do not use)
Apache License 2.0
209 stars 15 forks source link

Update to latest nightly #53

Closed kazimuth closed 7 years ago

kazimuth commented 7 years ago

That is, 1.16.0-nightly (1a2ed98d3 2017-01-13).

This was mostly simple mechanical changes; rustc sure likes to tweak its accessors.

I left TODOs where I'm not sure about the changes. Specifically:

If I can get feedback on how to fix those I can make the changes and get the tests actually running.

Also, keep in mind that I'm not really a compiler person, just somebody who thinks this is a cool project, so I may have made other glaring mistakes.

eholk commented 7 years ago

Thanks so much for doing this!

I just tried to compile it on my machine, and I got the following error:

error: no method named `visit_all_items` found for type `&rustc::hir::Crate` in the current scope
   --> src/trans.rs:100:21
    |
100 |     tcx.map.krate().visit_all_items(v);
    |                     ^^^^^^^^^^^^^^^

error: aborting due to previous error

I assume this is related to the new HIR visiting framework? Looking at the page you linked, it seems like we're likely to need the full nested visit, but we might be able to get away with a deep visit.

For the emit_assign_fields issue, also suspect it still does the right thing. I think the best thing to do here would be to see if the tests still pass. I think the tests are in a bit of a broken state right now (I have a PR in-progress to fix this), so I'd be fine with taking your change without the tests passing and we can fix it later.