Merge inbound to mozilla-central a=merge
authorCoroiu Cristina <ccoroiu@mozilla.com>
Fri, 25 Jan 2019 23:49:49 +0200
changeset 512640 e4b9b1084292
parent 512607 88a48f21fa68 (current diff)
parent 512639 fd3b826ffad1 (diff)
child 512641 a8dc6f53432e
child 512663 4184be9ffd1c
push id10566
push userarchaeopteryx@coole-files.de
push dateMon, 28 Jan 2019 12:41:12 +0000
treeherdermozilla-beta@69a3d7c8d04b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.0a1
first release with
nightly linux32
e4b9b1084292 / 66.0a1 / 20190125215013 / files
nightly linux64
e4b9b1084292 / 66.0a1 / 20190125215013 / files
nightly mac
e4b9b1084292 / 66.0a1 / 20190125215013 / files
nightly win32
e4b9b1084292 / 66.0a1 / 20190125215013 / files
nightly win64
e4b9b1084292 / 66.0a1 / 20190125215013 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central a=merge
browser/app/profile/firefox.js
js/src/vm/BigIntType.cpp
toolkit/components/antitracking/AntiTrackingCommon.cpp
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -88,17 +88,17 @@ version = "0.2.4"
 dependencies = [
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "cubeb 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.80 (git+https://github.com/servo/serde?branch=deserialize_from_enums9)",
  "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -108,33 +108,33 @@ name = "audioipc-client"
 version = "0.4.0"
 dependencies = [
  "audioipc 0.2.4",
  "cubeb-backend 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "audioipc-server"
 version = "0.2.3"
 dependencies = [
  "audioipc 0.2.4",
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "cubeb-core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "backtrace"
 version = "0.3.9"
@@ -156,20 +156,20 @@ dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "baldrdash"
 version = "0.1.0"
 dependencies = [
  "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-codegen 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-wasm 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-codegen 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-wasm 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "target-lexicon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "base64"
 version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -192,17 +192,17 @@ source = "registry+https://github.com/ru
 [[package]]
 name = "binast"
 version = "0.1.1"
 dependencies = [
  "binjs_meta 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "webidl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -231,17 +231,17 @@ dependencies = [
 
 [[package]]
 name = "binjs_meta"
 version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "Inflector 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "webidl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bit-set"
 version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -480,72 +480,72 @@ name = "cose-c"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cose 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-bforest"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cranelift-entity 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-entity 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-codegen"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cranelift-bforest 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-codegen-meta 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-entity 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-bforest 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-codegen-meta 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-entity 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "target-lexicon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-codegen-meta"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cranelift-entity 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-entity 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-entity"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cranelift-frontend"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cranelift-codegen 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-codegen 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "target-lexicon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-wasm"
-version = "0.26.0"
+version = "0.28.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-codegen 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-entity 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cranelift-frontend 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-codegen 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-entity 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cranelift-frontend 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "wasmparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "crc"
 version = "1.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -835,17 +835,17 @@ name = "either"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "ena"
 version = "0.9.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "encoding_c"
 version = "0.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "encoding_rs 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -871,17 +871,17 @@ dependencies = [
 
 [[package]]
 name = "env_logger"
 version = "0.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "error-chain"
 version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1025,17 +1025,17 @@ source = "registry+https://github.com/ru
 name = "geckodriver"
 version = "0.23.0"
 dependencies = [
  "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozprofile 0.4.0",
  "mozrunner 0.8.0",
  "mozversion 0.1.3",
  "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.80 (git+https://github.com/servo/serde?branch=deserialize_from_enums9)",
  "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1046,17 +1046,17 @@ dependencies = [
 [[package]]
 name = "geckoservo"
 version = "0.0.1"
 dependencies = [
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "nsstring 0.1.0",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.21.0",
  "servo_arc 0.1.1",
  "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
@@ -1109,17 +1109,17 @@ dependencies = [
  "cose-c 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cubeb-pulse 0.2.0",
  "cubeb-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding_c 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding_glue 0.1.0",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "geckoservo 0.0.1",
  "jsrust_shared 0.1.0",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozurl 0.0.1",
  "mp4parse_capi 0.11.2",
  "netwerk_helper 0.0.1",
  "nserror 0.1.0",
  "nsstring 0.1.0",
  "prefs_parser 0.0.1",
  "profiler_helper 0.1.0",
  "rkv 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1131,17 +1131,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "gl_generator"
 version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "khronos_api 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gleam"
 version = "0.6.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -1153,33 +1153,33 @@ name = "glob"
 version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "goblin"
 version = "0.0.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "h2"
 version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "hashglobe"
 version = "0.1.0"
@@ -1218,17 +1218,17 @@ dependencies = [
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1282,17 +1282,17 @@ name = "js"
 version = "0.1.4"
 dependencies = [
  "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozjs_sys 0.0.0",
  "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "jsrust"
 version = "0.1.0"
 dependencies = [
@@ -1464,22 +1464,22 @@ dependencies = [
  "scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "log"
 version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "log"
-version = "0.4.5"
+version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "malloc_size_of"
 version = "0.0.1"
@@ -1578,17 +1578,17 @@ version = "0.6.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mio-uds"
@@ -1614,17 +1614,17 @@ dependencies = [
 name = "moz_cbor"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "mozilla-central-workspace-hack"
 version = "0.1.0"
 dependencies = [
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.80 (git+https://github.com/servo/serde?branch=deserialize_from_enums9)",
  "syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
 ]
@@ -1646,17 +1646,17 @@ dependencies = [
  "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mozrunner"
 version = "0.8.0"
 dependencies = [
  "dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozprofile 0.4.0",
  "winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mozurl"
 version = "0.0.1"
 dependencies = [
@@ -1676,31 +1676,31 @@ dependencies = [
 ]
 
 [[package]]
 name = "mp4parse"
 version = "0.11.2"
 dependencies = [
  "bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mp4parse_fallible 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mp4parse-gtest"
 version = "0.1.0"
 
 [[package]]
 name = "mp4parse_capi"
 version = "0.11.2"
 dependencies = [
  "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mp4parse 0.11.2",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mp4parse_fallible"
 version = "0.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1944,17 +1944,17 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "plane-split"
 version = "0.13.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "podio"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -2159,27 +2159,27 @@ source = "registry+https://github.com/ru
 dependencies = [
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rsdparsa"
 version = "0.1.0"
 dependencies = [
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.80 (git+https://github.com/servo/serde?branch=deserialize_from_enums9)",
 ]
 
 [[package]]
 name = "rsdparsa_capi"
 version = "0.1.0"
 dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "nserror 0.1.0",
  "rsdparsa 0.1.0",
 ]
 
 [[package]]
 name = "runloop"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2252,17 +2252,17 @@ dependencies = [
 [[package]]
 name = "selectors"
 version = "0.21.0"
 dependencies = [
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_arc 0.1.1",
  "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -2457,17 +2457,17 @@ dependencies = [
  "euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
  "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "nsstring 0.1.0",
  "num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2524,17 +2524,17 @@ name = "stylo_tests"
 version = "0.0.1"
 dependencies = [
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "geckoservo 0.0.1",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.21.0",
  "size_of_test 0.0.1",
  "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
@@ -2712,17 +2712,17 @@ dependencies = [
 [[package]]
 name = "tokio-core"
 version = "0.1.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -2747,26 +2747,26 @@ dependencies = [
 
 [[package]]
 name = "tokio-io"
 version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "tokio-reactor"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "tokio-tcp"
@@ -2783,17 +2783,17 @@ dependencies = [
 
 [[package]]
 name = "tokio-threadpool"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "tokio-timer"
 version = "0.2.5"
@@ -2805,17 +2805,17 @@ dependencies = [
 
 [[package]]
 name = "tokio-udp"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "tokio-uds"
@@ -2856,17 +2856,17 @@ name = "u2fhid"
 version = "0.2.3"
 dependencies = [
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "devd-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "runloop 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
 ]
 
 [[package]]
 name = "ucd-util"
 version = "0.1.1"
@@ -2965,36 +2965,36 @@ dependencies = [
 ]
 
 [[package]]
 name = "want"
 version = "0.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "wasmparser"
-version = "0.22.0"
+version = "0.23.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "webdriver"
 version = "0.38.1"
 dependencies = [
  "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.80 (git+https://github.com/servo/serde?branch=deserialize_from_enums9)",
  "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3022,17 +3022,17 @@ dependencies = [
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "plane-split 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
  "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3071,17 +3071,17 @@ dependencies = [
  "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "nsstring 0.1.0",
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender 0.59.0",
 ]
 
 [[package]]
@@ -3261,22 +3261,22 @@ dependencies = [
 "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
 "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf"
 "checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887"
 "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
 "checksum core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "62ceafe1622ffc9a332199096841d0ff9912ec8cf8f9cde01e254a7d5217cd10"
 "checksum core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3f46450d6f2397261af420b4ccce23807add2e45fa206410a03d66fb7f050ae"
 "checksum cose 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72fa26cb151d3ae4b70f63d67d0fed57ce04220feafafbae7f503bef7aae590d"
 "checksum cose-c 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "49726015ab0ca765144fcca61e4a7a543a16b795a777fa53f554da2fffff9a94"
-"checksum cranelift-bforest 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "40f8ff24e9a6c89b8a846b14df9a34d2cac17cea7bdb5c81ed6b4744ee0e38bf"
-"checksum cranelift-codegen 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "42f5b809bd885c368e01aeec8fe04f21dcb07569834b907d75b4a7bed8d067eb"
-"checksum cranelift-codegen-meta 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "014c23ed3ebdc8377d41540af638245207dd169f421df042dfccc867465734ed"
-"checksum cranelift-entity 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4df40e26c0cf7b4d86919cb995bb412ee3001cc18e4f3c83a903f30b7007d8b"
-"checksum cranelift-frontend 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "789907218eeebebcea8122c2053d71affac91c96ce72cea35ebfdbbf547e82af"
-"checksum cranelift-wasm 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49723365dab9a48b354bdc24cb6d9d5719bc1d3b858ffd2ea179d0d7d885804a"
+"checksum cranelift-bforest 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c88db0c2fc38b2cedee1b94ee2dc7bf80e4ce31467c8005743f485af66e240d8"
+"checksum cranelift-codegen 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ce2e412970cfda0fa11806758d79a46c02b8fa1b91c35a8d3e2b4c947ce0c35"
+"checksum cranelift-codegen-meta 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43131e662da7e0243cff28edfbc094a62968a4b57849f77a6c1e3685e9e6e1e6"
+"checksum cranelift-entity 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4ccc3743848cbb53e58b62685703dc12ea553c3bc8f21db76f23c68054eb69a"
+"checksum cranelift-frontend 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "89ecc8b49d4ab98f2c121832fee365da88b7b0ffad77d4e328015b1fd1f7f4b1"
+"checksum cranelift-wasm 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7eccd196ecd01a2394ce05e2259afe5704874816b058541c7cce7794f0e835e"
 "checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7"
 "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
 "checksum crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8153ef04a7594ded05b427ffad46ddeaf22e63fd48d42b3e1e3bb4db07cae7"
 "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
 "checksum crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2af0e75710d6181e234c8ecc79f14a97907850a541b13b0be1dd10992f2e4620"
 "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
 "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b"
 "checksum cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "730363a45c4e248d4f21d3e5c1156d1a9cdec0855056c0d9539e814bc59865c3"
@@ -3352,17 +3352,17 @@ dependencies = [
 "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
 "checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
 "checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
 "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
 "checksum lmdb-rkv 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "07d8d72d709440ac7a19b71e04fb66684ec7547b3831817872454b01fdaefe23"
 "checksum lmdb-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5b392838cfe8858e86fac37cf97a0e8c55cc60ba0a18365cadc33092f128ce9"
 "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
 "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
-"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
+"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
 "checksum malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3"
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
 "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
 "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
 "checksum memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46f3c7359028b31999287dae4e5047ddfe90a23b7dca2282ce759b491080c99b"
 "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
 "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
 "checksum miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aaa2d3ad070f428fffbd7d3ca2ea20bb0d8cffe9024405c44e1840bc1418b398"
@@ -3496,17 +3496,17 @@ dependencies = [
 "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
 "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
 "checksum uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363"
 "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
 "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 "checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
 "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
-"checksum wasmparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b4e0f66e314a8e63ff5c3cc5103f7d0a3de9ee98bb61a960adcf7f1d9debd2f"
+"checksum wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5e01c420bc7d36e778bd242e1167b079562ba8b34087122cc9057187026d060"
 "checksum webidl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f807f7488d680893f7188aa09d7672a3a0a8461975a098a2edf0a52e3fee29"
 "checksum which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4be6cfa54dab45266e98b5d7be2f8ce959ddd49abd141a05d52dce4b07f803bb"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
 "checksum winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767"
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1200,16 +1200,17 @@ pref("services.sync.prefs.sync.browser.s
 pref("services.sync.prefs.sync.browser.safebrowsing.passwords.enabled", true);
 pref("services.sync.prefs.sync.browser.search.update", true);
 pref("services.sync.prefs.sync.browser.sessionstore.restore_on_demand", true);
 pref("services.sync.prefs.sync.browser.startup.homepage", true);
 pref("services.sync.prefs.sync.browser.startup.page", true);
 pref("services.sync.prefs.sync.browser.tabs.loadInBackground", true);
 pref("services.sync.prefs.sync.browser.tabs.warnOnClose", true);
 pref("services.sync.prefs.sync.browser.tabs.warnOnOpen", true);
+pref("services.sync.prefs.sync.browser.taskbar.previews.enable", true);
 pref("services.sync.prefs.sync.browser.urlbar.matchBuckets", true);
 pref("services.sync.prefs.sync.browser.urlbar.maxRichResults", true);
 pref("services.sync.prefs.sync.browser.urlbar.suggest.bookmark", true);
 pref("services.sync.prefs.sync.browser.urlbar.suggest.history", true);
 pref("services.sync.prefs.sync.browser.urlbar.suggest.openpage", true);
 pref("services.sync.prefs.sync.browser.urlbar.suggest.searches", true);
 pref("services.sync.prefs.sync.dom.disable_open_during_load", true);
 pref("services.sync.prefs.sync.dom.disable_window_flip", true);
--- a/browser/branding/nightly/pref/firefox-branding.js
+++ b/browser/branding/nightly/pref/firefox-branding.js
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-pref("startup.homepage_override_nightly.20190116", "https://www.mozilla.org/firefox/dedicated-profiles/");
 pref("startup.homepage_override_url", "https://www.mozilla.org/projects/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
 pref("startup.homepage_welcome_url", "https://www.mozilla.org/projects/firefox/%VERSION%/firstrun/");
 pref("startup.homepage_welcome_url.additional", "");
 // The time interval between checks for a new version (in seconds)
 pref("app.update.interval", 7200); // 2 hours
 // Give the user x seconds to react before showing the big UI. default=12 hours
 pref("app.update.promptWaitTime", 43200);
 // URL user can browse to manually if for some reason all update installation
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -56,48 +56,31 @@ function resolveURIInternal(aCmdLine, aA
     Cu.reportError(e);
   }
 
   return uri;
 }
 
 var gFirstWindow = false;
 
-function getNormalizedDate() {
-  let pad = num => ("" + num).padStart(2, "0");
-
-  let date = new Date();
-  return `${date.getFullYear()}${pad(date.getMonth() + 1)}${pad(date.getDate())}`;
-}
-
 const OVERRIDE_NONE        = 0;
 const OVERRIDE_NEW_PROFILE = 1;
 const OVERRIDE_NEW_MSTONE  = 2;
 const OVERRIDE_NEW_BUILD_ID = 3;
-const OVERRIDE_NIGHTLY     = 4;
 /**
  * Determines whether a home page override is needed.
  * Returns:
  *  OVERRIDE_NEW_PROFILE if this is the first run with a new profile.
  *  OVERRIDE_NEW_MSTONE if this is the first run with a build with a different
  *                      Gecko milestone (i.e. right after an upgrade).
  *  OVERRIDE_NEW_BUILD_ID if this is the first run with a new build ID of the
  *                        same Gecko milestone (i.e. after a nightly upgrade).
  *  OVERRIDE_NONE otherwise.
  */
 function needHomepageOverride(prefb) {
-  let isInTests = Cu.isInAutomation || Services.prefs.getBoolPref("marionette.enabled", false);
-  if (AppConstants.NIGHTLY_BUILD && !isInTests) {
-    let pref = `startup.homepage_override_nightly.${getNormalizedDate()}`;
-    let url = Services.prefs.getCharPref(pref, "");
-    if (url) {
-      return OVERRIDE_NIGHTLY;
-    }
-  }
-
   var savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone", "");
 
   if (savedmstone == "ignore")
     return OVERRIDE_NONE;
 
   var mstone = Services.appinfo.platformVersion;
 
   var savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID", "");
@@ -556,22 +539,16 @@ nsBrowserContentHandler.prototype = {
             overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
             break;
           case OVERRIDE_NEW_BUILD_ID:
             if (prefb.prefHasUserValue("app.update.postupdate")) {
               // Send the update ping to signal that the update was successful.
               UpdatePing.handleUpdateSuccess(old_mstone, old_buildId);
             }
             break;
-          case OVERRIDE_NIGHTLY:
-            // Opens a page on the first startup on a particular day.
-            let pref = `startup.homepage_override_nightly.${getNormalizedDate()}`;
-            overridePage = Services.prefs.getCharPref(pref);
-            Services.prefs.setCharPref(pref, "");
-            break;
         }
       }
     } catch (ex) {}
 
     // formatURLPref might return "about:blank" if getting the pref fails
     if (overridePage == "about:blank")
       overridePage = "";
 
--- a/build/clang-plugin/Makefile.in
+++ b/build/clang-plugin/Makefile.in
@@ -1,16 +1,19 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include $(topsrcdir)/config/config.mk
 
 HOST_LDFLAGS := $(LLVM_LDFLAGS) $(CLANG_LDFLAGS)
 
-ifneq ($(HOST_OS_ARCH),WINNT)
+ifeq ($(HOST_OS_ARCH),WINNT)
+# clang-plugin.dll needs to be deterministic for sccache hashes
+HOST_LDFLAGS += -brepro
+else
 HOST_LDFLAGS += -shared
 endif
 
 # Use the default OS X deployment target to enable using the libc++ headers
 # correctly.  Note that the binary produced here is a host tool and doesn't need
 # to be distributed.
 MACOSX_DEPLOYMENT_TARGET :=
--- a/devtools/client/netmonitor/src/utils/request-utils.js
+++ b/devtools/client/netmonitor/src/utils/request-utils.js
@@ -426,18 +426,35 @@ function getResponseTime(item, firstRequ
 /**
  * Format the protocols used by the request.
  */
 function getFormattedProtocol(item) {
   const { httpVersion = "", responseHeaders = { headers: [] } } = item;
   const protocol = [httpVersion];
   responseHeaders.headers.some(h => {
     if (h.hasOwnProperty("name") && h.name.toLowerCase() === "x-firefox-spdy") {
-      protocol.push(h.value);
-      return true;
+      /**
+       * First we make sure h.value is defined and not an empty string.
+       * Then check that HTTP version and x-firefox-spdy == "http/1.1".
+       * If not, check that HTTP version and x-firefox-spdy have the same
+       * numeric value when of the forms "http/<x>" and "h<x>" respectively.
+       * If not, will push to protocol the non-standard x-firefox-spdy value.
+       *
+       * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1501357
+       */
+      if (h.value !== undefined && h.value.length > 0) {
+        if (h.value.toLowerCase() !== "http/1.1" ||
+            protocol[0].toLowerCase() !== "http/1.1") {
+          if (parseFloat(h.value.toLowerCase().split("")[1]) !==
+            parseFloat(protocol[0].toLowerCase().split("/")[1])) {
+            protocol.push(h.value);
+            return true;
+          }
+        }
+      }
     }
     return false;
   });
   return protocol.join("+");
 }
 
 /**
  * Get the value of a particular response header, or null if not
new file mode 100644
--- /dev/null
+++ b/devtools/client/netmonitor/test/unit/test_request-utils-js-getFormattedProtocol.js
@@ -0,0 +1,199 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Test devtools/client/netmonitor/src/utils/request-utils.js function
+// |getFormattedProtocol|
+
+"use strict";
+
+const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
+const {
+  getFormattedProtocol,
+} = require("devtools/client/netmonitor/src/utils/request-utils");
+
+function run_test() {
+  const http_1p1_value_http1p1 = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "http/1.1",
+      }],
+    },
+  };
+
+  const http_1p1_value_http_no_slash_1p1 = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "http1.1",
+      }],
+    },
+  };
+
+  const http_1p1_value_http1p11 = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "http/1.11",
+      }],
+    },
+  };
+
+  const http_2p0_value_h2 = {
+    httpVersion: "HTTP/2.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h2",
+      }],
+    },
+  };
+
+  const http_1p1_value_h1 = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h1",
+      }],
+    },
+  };
+
+  const http_1p1_value_h2 = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h2",
+      }],
+    },
+  };
+
+  const http_1p1_value_empty_string = {
+    httpVersion: "HTTP/1.1",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "",
+      }],
+    },
+  };
+
+  const http_2p0_value_empty_string = {
+    httpVersion: "HTTP/2.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "",
+      }],
+    },
+  };
+
+  const http_2p0_value_2p0 = {
+    httpVersion: "HTTP/2.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "HTTP/2.0",
+      }],
+    },
+  };
+
+  const http_3p0_value_h3 = {
+    httpVersion: "HTTP/3.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h3",
+      }],
+    },
+  };
+
+  const http_3p0_value_h3p0 = {
+    httpVersion: "HTTP/3.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h3.0",
+      }],
+    },
+  };
+
+  const http_3p0_value_http_3p0 = {
+    httpVersion: "HTTP/3.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "http/3.0",
+      }],
+    },
+  };
+
+  const http_3p0_value_3p0 = {
+    httpVersion: "HTTP/3.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "3.0",
+      }],
+    },
+  };
+
+  const http_4p0_value_h4 = {
+    httpVersion: "HTTP/4.0",
+    responseHeaders: {
+      headers: [{
+        name: "X-Firefox-Spdy",
+        value: "h4",
+      }],
+    },
+  };
+
+  info("Testing httpValue:HTTP/1.1, value:http/1.1");
+  equal(getFormattedProtocol(http_1p1_value_http1p1), "HTTP/1.1");
+
+  info("Testing httpValue:HTTP/1.1, value:http1.1");
+  equal(getFormattedProtocol(http_1p1_value_http_no_slash_1p1), "HTTP/1.1+http1.1");
+
+  info("Testing httpValue:HTTP/1.1, value:http/1.11");
+  equal(getFormattedProtocol(http_1p1_value_http1p11), "HTTP/1.1+http/1.11");
+
+  info("Testing httpValue:HTTP/2.0, value:h2");
+  equal(getFormattedProtocol(http_2p0_value_h2), "HTTP/2.0");
+
+  info("Testing httpValue:HTTP/1.1, value:h1");
+  equal(getFormattedProtocol(http_1p1_value_h1), "HTTP/1.1+h1");
+
+  info("Testing httpValue:HTTP/1.1, value:h2");
+  equal(getFormattedProtocol(http_1p1_value_h2), "HTTP/1.1+h2");
+
+  info("Testing httpValue:HTTP/1.1, value:http1.1");
+  equal(getFormattedProtocol(http_1p1_value_http_no_slash_1p1), "HTTP/1.1+http1.1");
+
+  info("Testing httpValue:HTTP/1.1, value:''");
+  equal(getFormattedProtocol(http_1p1_value_empty_string), "HTTP/1.1");
+
+  info("Testing httpValue:HTTP/2.0, value:''");
+  equal(getFormattedProtocol(http_2p0_value_empty_string), "HTTP/2.0");
+
+  info("Testing httpValue:HTTP/2.0, value:HTTP/2.0");
+  equal(getFormattedProtocol(http_2p0_value_2p0), "HTTP/2.0+HTTP/2.0");
+
+  info("Testing httpValue:HTTP/3.0, value:h3");
+  equal(getFormattedProtocol(http_3p0_value_h3), "HTTP/3.0");
+
+  info("Testing httpValue:HTTP/3.0, value:h3.0");
+  equal(getFormattedProtocol(http_3p0_value_h3p0), "HTTP/3.0");
+
+  info("Testing httpValue:HTTP/3.0, value:http/3.0");
+  equal(getFormattedProtocol(http_3p0_value_http_3p0), "HTTP/3.0+http/3.0");
+
+  info("Testing httpValue:HTTP/3.0, value:3.0");
+  equal(getFormattedProtocol(http_3p0_value_3p0), "HTTP/3.0+3.0");
+
+  info("Testing httpValue:HTTP/4.0, value:h4");
+  equal(getFormattedProtocol(http_4p0_value_h4), "HTTP/4.0");
+}
--- a/devtools/client/netmonitor/test/unit/xpcshell.ini
+++ b/devtools/client/netmonitor/test/unit/xpcshell.ini
@@ -1,7 +1,8 @@
 [DEFAULT]
 tags = devtools
 head =
 firefox-appdir = browser
 skip-if = toolkit == 'android'
 
-[test_mdn-utils.js]
\ No newline at end of file
+[test_mdn-utils.js]
+[test_request-utils-js-getFormattedProtocol.js]
--- a/js/src/vm/BigIntType.cpp
+++ b/js/src/vm/BigIntType.cpp
@@ -2342,20 +2342,25 @@ BigInt* BigInt::asIntN(JSContext* cx, Ha
   // BigInt.asIntN step 3:  Let `mod` be `x` modulo `2**bits`.
   RootedBigInt mod(cx, asUintN(cx, x, bits));
   if (!mod) {
     return nullptr;
   }
 
   // Step 4: If `mod >= 2**(bits - 1)`, return `mod - 2**bits`; otherwise,
   // return `mod`.
-  if (mod->digitLength() == CeilDiv(bits, DigitBits) &&
-      (mod->digit(mod->digitLength() - 1) & signBit) != 0) {
-    bool resultNegative = true;
-    return truncateAndSubFromPowerOfTwo(cx, mod, bits, resultNegative);
+  if (mod->digitLength() == CeilDiv(bits, DigitBits)) {
+    MOZ_ASSERT(!mod->isZero(),
+               "nonzero bits implies nonzero digit length which implies "
+               "nonzero overall");
+
+    if ((mod->digit(mod->digitLength() - 1) & signBit) != 0) {
+      bool resultNegative = true;
+      return truncateAndSubFromPowerOfTwo(cx, mod, bits, resultNegative);
+    }
   }
 
   return mod;
 }
 
 static bool ValidBigIntOperands(JSContext* cx, HandleValue lhs,
                                 HandleValue rhs) {
   MOZ_ASSERT(lhs.isBigInt() || rhs.isBigInt());
--- a/js/src/wasm/cranelift/Cargo.toml
+++ b/js/src/wasm/cranelift/Cargo.toml
@@ -3,20 +3,20 @@ name = "baldrdash"
 version = "0.1.0"
 authors = ["The Spidermonkey and Cranelift developers"]
 
 [lib]
 crate-type = ["rlib"]
 name = "baldrdash"
 
 [dependencies]
-cranelift-codegen = "0.26.0"
-cranelift-wasm = "0.26.0"
+cranelift-codegen = "0.28.0"
+cranelift-wasm = "0.28.0"
 target-lexicon = "0.2.0"
-log = { version = "0.4.5", default-features = false, features = ["release_max_level_info"] }
+log = { version = "0.4.6", default-features = false, features = ["release_max_level_info"] }
 env_logger = "0.5.6"
 
 [build-dependencies]
 bindgen = {version = "0.43", default-features = false} # disable `logging` to reduce code size
 
 # Uncomment this to enable perf support in release mode.
 #[profile.release]
 #debug = true
--- a/js/src/wasm/cranelift/src/compile.rs
+++ b/js/src/wasm/cranelift/src/compile.rs
@@ -340,17 +340,17 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
             ir::TrapCode::OutOfBounds => bd::Trap::OutOfBounds,
             ir::TrapCode::TableOutOfBounds => bd::Trap::OutOfBounds,
             ir::TrapCode::IndirectCallToNull => bd::Trap::IndirectCallToNull,
             ir::TrapCode::BadSignature => bd::Trap::IndirectCallBadSig,
             ir::TrapCode::IntegerOverflow => bd::Trap::IntegerOverflow,
             ir::TrapCode::IntegerDivisionByZero => bd::Trap::IntegerDivideByZero,
             ir::TrapCode::BadConversionToInteger => bd::Trap::InvalidConversionToInteger,
             ir::TrapCode::Interrupt => bd::Trap::CheckInterrupt,
-            ir::TrapCode::User(0) => bd::Trap::Unreachable,
+            ir::TrapCode::UnreachableCodeReached => bd::Trap::Unreachable,
             ir::TrapCode::User(_) => panic!("Uncovered trap code {}", code),
         };
 
         let srcloc = func.srclocs[inst];
         assert!(
             !srcloc.is_default(),
             "No source location on {}",
             func.dfg.display_inst(inst, Some(self.isa.as_ref()))
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -1098,17 +1098,17 @@ win64-aarch64/debug:
             - builds/taskcluster_base_windows.py
             - builds/taskcluster_sub_win64/debug.py
         extra-config:
             mozconfig_platform: win64-aarch64
         mozconfig-variant: debug
     run-on-projects: ['mozilla-central', 'trunk', 'try']
     toolchains:
         - win64-clang-cl
-        - win64-aarch64-rust-nightly
+        - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
         - win64-node
 
 win64-aarch64/opt:
     description: "AArch64 Win64 Opt"
     index:
         product: firefox
@@ -1134,17 +1134,17 @@ win64-aarch64/opt:
             - builds/releng_base_firefox.py
             - builds/taskcluster_base_windows.py
         extra-config:
             stage_platform: win64-aarch64
             mozconfig_platform: win64-aarch64
     run-on-projects: ['mozilla-central', 'trunk', 'try']
     toolchains:
         - win64-clang-cl
-        - win64-aarch64-rust-nightly
+        - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
         - win64-node
 
 win64-aarch64-nightly/opt:
     description: "AArch64 Win64 Nightly"
     index:
         product: firefox
@@ -1174,17 +1174,17 @@ win64-aarch64-nightly/opt:
             - builds/taskcluster_base_windows.py
             - taskcluster_nightly.py
         extra-config:
             stage_platform: win64-aarch64
             mozconfig_platform: win64-aarch64
     run-on-projects: ['mozilla-central', 'trunk', 'try']
     toolchains:
         - win64-clang-cl
-        - win64-aarch64-rust-nightly
+        - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
         - win64-node
 
 win32-mingwclang/opt:
     description: "Win32 MinGW-Clang Opt"
     index:
         product: firefox
--- a/taskcluster/ci/toolchain/windows.yml
+++ b/taskcluster/ci/toolchain/windows.yml
@@ -154,34 +154,34 @@ win64-rust-nightly:
         arguments: [
             '--channel', 'nightly-2018-10-05',
             '--host', 'x86_64-pc-windows-msvc',
             '--target', 'x86_64-pc-windows-msvc',
             '--target', 'i686-pc-windows-msvc',
         ]
         toolchain-artifact: public/build/rustc.tar.bz2
 
-win64-aarch64-rust-nightly:
-    description: "rust nightly repack with aarch64 support"
+win64-aarch64-rust:
+    description: "rust repack with aarch64 support"
     treeherder:
         kind: build
         platform: toolchains/opt
-        symbol: TW64(rust-aarch64-nightly)
+        symbol: TW64(rust-aarch64)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: toolchain-build}
         max-run-time: 7200
         env:
             UPLOAD_DIR: artifacts
     run:
         using: toolchain-script
         script: repack_rust.py
         arguments: [
-            '--channel', 'nightly-2018-11-08',
+            '--channel', '1.32.0',
             '--host', 'x86_64-pc-windows-msvc',
             '--target', 'x86_64-pc-windows-msvc',
             '--target', 'aarch64-pc-windows-msvc',
             '--target', 'i686-pc-windows-msvc',
         ]
         toolchain-artifact: public/build/rustc.tar.bz2
 
 win64-node:
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/font.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/font.py
@@ -87,18 +87,24 @@ class FontInstaller(object):
         return False
 
     def install_windows_font(self, _, font_path):
         hwnd_broadcast = 0xFFFF
         wm_fontchange = 0x001D
 
         gdi32 = ctypes.WinDLL('gdi32')
         if gdi32.AddFontResourceW(font_path):
-            return bool(ctypes.windll.user32.SendMessageW(hwnd_broadcast,
-                                                          wm_fontchange))
+            from ctypes import wintypes
+            wparam = 0
+            lparam = 0
+            SendMessageW = ctypes.windll.user32.SendMessageW
+            SendMessageW.argtypes = [wintypes.HANDLE, wintypes.UINT,
+                                     wintypes.WPARAM, wintypes.LPARAM]
+            return bool(SendMessageW(hwnd_broadcast, wm_fontchange,
+                                     wparam, lparam))
 
     def remove_linux_font(self, font_name, _):
         if self.created_dir:
             rmtree(self.font_dir)
         else:
             os.remove('%s/%s' % (self.font_dir, font_name))
         try:
             fc_cache_returncode = call('fc-cache')
@@ -115,10 +121,16 @@ class FontInstaller(object):
         return True
 
     def remove_windows_font(self, _, font_path):
         hwnd_broadcast = 0xFFFF
         wm_fontchange = 0x001D
 
         gdi32 = ctypes.WinDLL('gdi32')
         if gdi32.RemoveFontResourceW(font_path):
-            return bool(ctypes.windll.user32.SendMessageW(hwnd_broadcast,
-                                                          wm_fontchange))
+            from ctypes import wintypes
+            wparam = 0
+            lparam = 0
+            SendMessageW = ctypes.windll.user32.SendMessageW
+            SendMessageW.argtypes = [wintypes.HANDLE, wintypes.UINT,
+                                     wintypes.WPARAM, wintypes.LPARAM]
+            return bool(SendMessageW(hwnd_broadcast, wm_fontchange,
+                                     wparam, lparam))
--- a/third_party/rust/cranelift-bforest/.cargo-checksum.json
+++ b/third_party/rust/cranelift-bforest/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"591c2da0dad7eafa9aff626400b38e0b08927df674292ca6774f60e2bc02ac32","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"af367c67340fa7f6fb9a35b0aa637dcf303957f7ae7427a5f4f6356801c8bb04","src/lib.rs":"eb691a3bc63c3ed8a64d564cf656fdc56c62ade8b7882efd7b987353acc627bd","src/map.rs":"77eb9fd2ffdaafaf4daea609602a0c775c5012efae21c03547f63653271da163","src/node.rs":"309609acc70f1ce6be2f3c964430d23c0680bd7a647afab837a2aedc06235531","src/path.rs":"25326bacbb99189e873cb70e770f21c13fdef0fb2cd20f484830386fc4c75c6a","src/pool.rs":"196216124922dc42708a3aa944e98b6a57ef9bb770dab7e01f154b6382cab021","src/set.rs":"d4ff99fe51de9eefb4c774e919259d952ab5dde4dd3b99bd9974e4eedbb28938"},"package":"40f8ff24e9a6c89b8a846b14df9a34d2cac17cea7bdb5c81ed6b4744ee0e38bf"}
\ No newline at end of file
+{"files":{"Cargo.toml":"71b82e879926d62dea538644a84ae5e6274f5a57dd7ef3edfc5ae95e2a804986","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"af367c67340fa7f6fb9a35b0aa637dcf303957f7ae7427a5f4f6356801c8bb04","src/lib.rs":"1b23abbfe5850a4cd77ae6ae5dcfc2f678ef36b4032fd7496f2b333c51e63301","src/map.rs":"5d891d62814941e19dfc88ff36538efa3da5479f3f97de8219a6f610c9a1ee32","src/node.rs":"e620c64e78488035f11723b14892c7986c06ad37dc5b115a35a453ff1ae66ca3","src/path.rs":"4868e59ff67db1c504747e4b7e202dd20c9da4cbd73d9fa82d53e5f3406dbb78","src/pool.rs":"6090f8c0e0da16ebee0e31bca66392d0075b3aff529d30d4e716fa20cd0aef99","src/set.rs":"b411158f813a310c7a6c337d4ada3bf0a021088c443875dc25233415dcbe0633"},"package":"c88db0c2fc38b2cedee1b94ee2dc7bf80e4ce31467c8005743f485af66e240d8"}
\ No newline at end of file
--- a/third_party/rust/cranelift-bforest/Cargo.toml
+++ b/third_party/rust/cranelift-bforest/Cargo.toml
@@ -6,30 +6,32 @@
 # to registry (e.g. crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
+edition = "2018"
 name = "cranelift-bforest"
-version = "0.26.0"
+version = "0.28.0"
 authors = ["The Cranelift Project Developers"]
 description = "A forest of B+-trees"
 documentation = "https://cranelift.readthedocs.io/"
 readme = "README.md"
 keywords = ["btree", "forest", "set", "map"]
 categories = ["no-std"]
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/CraneStation/cranelift"
 [dependencies.cranelift-entity]
-version = "0.26.0"
+version = "0.28.0"
 default-features = false
 
 [features]
+core = []
 default = ["std"]
 std = ["cranelift-entity/std"]
 [badges.maintenance]
 status = "experimental"
 
 [badges.travis-ci]
 repository = "CraneStation/cranelift"
--- a/third_party/rust/cranelift-bforest/src/lib.rs
+++ b/third_party/rust/cranelift-bforest/src/lib.rs
@@ -12,51 +12,48 @@
 //! - A comparator object is used to compare keys, allowing smaller "context free" keys.
 //! - Empty trees have a very small 32-bit footprint.
 //! - All the trees in a forest can be cleared in constant time.
 
 #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
 #![warn(unused_import_braces)]
 #![cfg_attr(feature = "std", warn(unstable_features))]
 #![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
-#![cfg_attr(
-    feature = "cargo-clippy",
-    allow(new_without_default, new_without_default_derive)
-)]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
 #![cfg_attr(
     feature = "cargo-clippy",
     warn(
         clippy::float_arithmetic,
         clippy::mut_mut,
         clippy::nonminimal_bool,
         clippy::option_map_unwrap_or,
         clippy::option_map_unwrap_or_else,
         clippy::print_stdout,
         clippy::unicode_not_nfc,
         clippy::use_self
     )
 )]
-// Turns on no_std and alloc features if std is not available.
-#![cfg_attr(not(feature = "std"), no_std)]
+#![no_std]
 #![cfg_attr(not(feature = "std"), feature(alloc))]
 
-/// This replaces `std` in builds with `core`.
+#[cfg(test)]
 #[cfg(not(feature = "std"))]
-mod std {
-    extern crate alloc;
-    pub use self::alloc::{boxed, string, vec};
-    pub use core::*;
-}
+#[macro_use]
+extern crate alloc as std;
+#[cfg(test)]
+#[cfg(feature = "std")]
+#[macro_use]
+extern crate std;
 
 #[macro_use]
 extern crate cranelift_entity as entity;
-use entity::packed_option;
+use crate::entity::packed_option;
 
-use std::borrow::BorrowMut;
-use std::cmp::Ordering;
+use core::borrow::BorrowMut;
+use core::cmp::Ordering;
 
 mod map;
 mod node;
 mod path;
 mod pool;
 mod set;
 
 pub use self::map::{Map, MapCursor, MapForest, MapIter};
@@ -152,17 +149,17 @@ fn slice_shift<T: Copy>(s: &mut [T], n: 
     for j in 0..s.len() - n {
         s[j] = s[j + n];
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use entity::EntityRef;
+    use crate::entity::EntityRef;
 
     /// An opaque reference to an extended basic block in a function.
     #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
     pub struct Ebb(u32);
     entity_impl!(Ebb, "ebb");
 
     #[test]
     fn comparator() {
--- a/third_party/rust/cranelift-bforest/src/map.rs
+++ b/third_party/rust/cranelift-bforest/src/map.rs
@@ -1,15 +1,15 @@
 //! Forest of maps.
 
 use super::{Comparator, Forest, Node, NodeData, NodePool, Path, INNER_SIZE};
-use packed_option::PackedOption;
+use crate::packed_option::PackedOption;
 #[cfg(test)]
-use std::fmt;
-use std::marker::PhantomData;
+use core::fmt;
+use core::marker::PhantomData;
 #[cfg(test)]
 use std::string::String;
 
 /// Tag type defining forest types for a map.
 struct MapTypes<K, V>(PhantomData<(K, V)>);
 
 impl<K, V> Forest for MapTypes<K, V>
 where
@@ -279,17 +279,17 @@ where
     pub fn is_empty(&self) -> bool {
         self.root.is_none()
     }
 
     /// Move cursor to the next key-value pair and return it.
     ///
     /// If the cursor reaches the end, return `None` and leave the cursor at the off-the-end
     /// position.
-    #[cfg_attr(feature = "cargo-clippy", allow(should_implement_trait))]
+    #[cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
     pub fn next(&mut self) -> Option<(K, V)> {
         self.path.next(self.pool)
     }
 
     /// Move cursor to the previous key-value pair and return it.
     ///
     /// If the cursor is already pointing at the first entry, leave it there and return `None`.
     pub fn prev(&mut self) -> Option<(K, V)> {
@@ -424,17 +424,17 @@ where
         self.path.to_string()
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::super::NodeData;
     use super::*;
-    use std::mem;
+    use core::mem;
     use std::vec::Vec;
 
     #[test]
     fn node_size() {
         // check that nodes are cache line sized when keys and values are 32 bits.
         type F = MapTypes<u32, u32>;
         assert_eq!(mem::size_of::<NodeData<F>>(), 64);
     }
--- a/third_party/rust/cranelift-bforest/src/node.rs
+++ b/third_party/rust/cranelift-bforest/src/node.rs
@@ -1,13 +1,13 @@
 //! B+-tree nodes.
 
 use super::{slice_insert, slice_shift, Forest, Node, SetValue, INNER_SIZE};
-use std::borrow::{Borrow, BorrowMut};
-use std::fmt;
+use core::borrow::{Borrow, BorrowMut};
+use core::fmt;
 
 /// B+-tree node.
 ///
 /// A B+-tree has different node types for inner nodes and leaf nodes. Inner nodes contain M node
 /// references and M-1 keys while leaf nodes contain N keys and values. Values for M and N are
 /// chosen such that a node is exactly 64 bytes (a cache line) when keys and values are 32 bits
 /// each.
 ///
@@ -579,17 +579,17 @@ where
             NodeData::Free { next: None } => write!(f, "[ free ]"),
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use std::mem;
+    use core::mem;
     use std::string::ToString;
 
     // Forest impl for a set implementation.
     struct TF();
 
     impl Forest for TF {
         type Key = char;
         type Value = SetValue;
--- a/third_party/rust/cranelift-bforest/src/path.rs
+++ b/third_party/rust/cranelift-bforest/src/path.rs
@@ -1,17 +1,17 @@
 //! A path from the root of a B+-tree to a leaf node.
 
 use super::node::Removed;
 use super::{slice_insert, slice_shift, Comparator, Forest, Node, NodeData, NodePool, MAX_PATH};
-use std::borrow::Borrow;
-use std::marker::PhantomData;
+use core::borrow::Borrow;
+use core::marker::PhantomData;
 
 #[cfg(test)]
-use std::fmt;
+use core::fmt;
 
 pub(super) struct Path<F: Forest> {
     /// Number of path entries including the root and leaf nodes.
     size: usize,
 
     /// Path of node references from the root to a leaf node.
     node: [Node; MAX_PATH],
 
@@ -471,17 +471,17 @@ impl<F: Forest> Path<F> {
     /// Leave the path up to and including `level` in a normalized state where all entries are in
     /// bounds.
     ///
     /// Returns true if the tree becomes empty.
     fn heal_level(&mut self, status: Removed, level: usize, pool: &mut NodePool<F>) -> bool {
         match status {
             Removed::Healthy => {}
             Removed::Rightmost => {
-                // The rightmost entry was removed from the curent node, so move the path so it
+                // The rightmost entry was removed from the current node, so move the path so it
                 // points at the first entry of the next node at this level.
                 debug_assert_eq!(
                     usize::from(self.entry[level]),
                     pool[self.node[level]].entries()
                 );
                 self.next_node(level, pool);
             }
             Removed::Underflow => self.underflowed_node(level, pool),
@@ -701,17 +701,17 @@ impl<F: Forest> fmt::Display for Path<F>
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::super::{Forest, NodeData, NodePool};
     use super::*;
-    use std::cmp::Ordering;
+    use core::cmp::Ordering;
 
     struct TC();
 
     impl Comparator<i32> for TC {
         fn cmp(&self, a: i32, b: i32) -> Ordering {
             a.cmp(&b)
         }
     }
--- a/third_party/rust/cranelift-bforest/src/pool.rs
+++ b/third_party/rust/cranelift-bforest/src/pool.rs
@@ -1,17 +1,17 @@
 //! B+-tree node pool.
 
 #[cfg(test)]
 use super::Comparator;
 use super::{Forest, Node, NodeData};
-use entity::PrimaryMap;
+use crate::entity::PrimaryMap;
 #[cfg(test)]
-use std::fmt;
-use std::ops::{Index, IndexMut};
+use core::fmt;
+use core::ops::{Index, IndexMut};
 
 /// A pool of nodes, including a free list.
 pub(super) struct NodePool<F: Forest> {
     nodes: PrimaryMap<Node, NodeData<F>>,
     freelist: Option<Node>,
 }
 
 impl<F: Forest> NodePool<F> {
@@ -58,17 +58,17 @@ impl<F: Forest> NodePool<F> {
         };
         self.freelist = Some(node);
     }
 
     /// Free the entire tree rooted at `node`.
     pub fn free_tree(&mut self, node: Node) {
         if let NodeData::Inner { size, tree, .. } = self[node] {
             // Note that we have to capture `tree` by value to avoid borrow checker trouble.
-            #[cfg_attr(feature = "cargo-clippy", allow(needless_range_loop))]
+            #[cfg_attr(feature = "cargo-clippy", allow(clippy::needless_range_loop))]
             for i in 0..usize::from(size + 1) {
                 // Recursively free sub-trees. This recursion can never be deeper than `MAX_PATH`,
                 // and since most trees have less than a handful of nodes, it is worthwhile to
                 // avoid the heap allocation for an iterative tree traversal.
                 self.free_tree(tree[i]);
             }
         }
         self.free_node(node);
@@ -78,19 +78,19 @@ impl<F: Forest> NodePool<F> {
 #[cfg(test)]
 impl<F: Forest> NodePool<F> {
     /// Verify the consistency of the tree rooted at `node`.
     pub fn verify_tree<C: Comparator<F::Key>>(&self, node: Node, comp: &C)
     where
         NodeData<F>: fmt::Display,
         F::Key: fmt::Display,
     {
-        use entity::SparseSet;
-        use std::borrow::Borrow;
-        use std::cmp::Ordering;
+        use crate::entity::SparseSet;
+        use core::borrow::Borrow;
+        use core::cmp::Ordering;
         use std::vec::Vec;
 
         // The root node can't be an inner node with just a single sub-tree. It should have been
         // pruned.
         if let NodeData::Inner { size, .. } = self[node] {
             assert!(size > 0, "Root must have more than one sub-tree");
         }
 
--- a/third_party/rust/cranelift-bforest/src/set.rs
+++ b/third_party/rust/cranelift-bforest/src/set.rs
@@ -1,15 +1,15 @@
 //! Forest of sets.
 
 use super::{Comparator, Forest, Node, NodeData, NodePool, Path, SetValue, INNER_SIZE};
-use packed_option::PackedOption;
+use crate::packed_option::PackedOption;
 #[cfg(test)]
-use std::fmt;
-use std::marker::PhantomData;
+use core::fmt;
+use core::marker::PhantomData;
 #[cfg(test)]
 use std::string::String;
 
 /// Tag type defining forest types for a set.
 struct SetTypes<K>(PhantomData<K>);
 
 impl<K> Forest for SetTypes<K>
 where
@@ -220,17 +220,17 @@ where
     pub fn is_empty(&self) -> bool {
         self.root.is_none()
     }
 
     /// Move cursor to the next element and return it.
     ///
     /// If the cursor reaches the end, return `None` and leave the cursor at the off-the-end
     /// position.
-    #[cfg_attr(feature = "cargo-clippy", allow(should_implement_trait))]
+    #[cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
     pub fn next(&mut self) -> Option<K> {
         self.path.next(self.pool).map(|(k, _)| k)
     }
 
     /// Move cursor to the previous element and return it.
     ///
     /// If the cursor is already pointing at the first element, leave it there and return `None`.
     pub fn prev(&mut self) -> Option<K> {
@@ -352,17 +352,17 @@ where
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::super::NodeData;
     use super::*;
-    use std::mem;
+    use core::mem;
     use std::vec::Vec;
 
     #[test]
     fn node_size() {
         // check that nodes are cache line sized when keys are 32 bits.
         type F = SetTypes<u32>;
         assert_eq!(mem::size_of::<NodeData<F>>(), 64);
     }
--- a/third_party/rust/cranelift-codegen-meta/.cargo-checksum.json
+++ b/third_party/rust/cranelift-codegen-meta/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"cdd4cff2d17ca34e3305e9fcf1e8277b0e9987e7369ce70da597e3957e56e408","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"b123f056d0d458396679c5f7f2a16d2762af0258fcda4ac14b6655a95e5a0022","src/base/mod.rs":"559075f0b76a744dd36224e06ff1c2e28ee70aaca9442fc724b116e37028ac52","src/base/settings.rs":"9cbe9bdd5141b9175074370a9b1d28f371249d586e999a31f76631739bf09c13","src/base/types.rs":"a3e449db1f515d268f3ad21301740ba415444d399f8433dbc48979f78557f66a","src/cdsl/isa.rs":"5c9a8173466e69d105245396abd342251eb00e704ab13f179ba1567b339f47e1","src/cdsl/mod.rs":"66ac1b5d095e431bcab88c4b9c5b1492a5d1ca87bcb9c9c3e544ede05b2ba925","src/cdsl/regs.rs":"41cca844b390bba3ceefa147e7b0dec170aba2b5759a41ecb5b9cd7f2cc59f60","src/cdsl/settings.rs":"724a4bd7cfd0608cfc8751ee7c38dbed90b91cfafd34585ed7df953807932794","src/cdsl/types.rs":"78f476f5f700697b94f2d2f00049af8684d3b27afc5684b2c87ea517aeb77e85","src/constant_hash.rs":"6522f86ebfd44efe9b47256d822d0e49d641ccdbb4fcc61d57bb94e6d52702c1","src/error.rs":"5110a4e3c1e97396ba02d9f5abbb8af4b586f0cc4d33a5c2473f1718cc4bef05","src/gen_registers.rs":"9bd381da256c19724964c6445db4fbac80d91174266dccfc5d3b72497a5332c9","src/gen_settings.rs":"a827a90cc1db7345e8081635169b77be497494e558c6e985eaa654386d5e8e48","src/gen_types.rs":"5eb4e9bd0fda7f7644bb2428045f0bf16f2b698ff32cadcbbf7f2c7669f18de3","src/isa/arm32/mod.rs":"b4049ff95164bbf244b6727e16974383e4d58c5be750f7ded3ef8cfe113e5373","src/isa/arm64/mod.rs":"759adfd4dd5c885644de26386797211efc82c5b47f2e147a58d57d24608b9cfb","src/isa/mod.rs":"d3a87bc45173f3743f25d3a004a9b40966c12feb7d95d794b5918bb9ccb988ac","src/isa/riscv/mod.rs":"6e3d96c48e9c289a13912d7f777bde805be327e4a56677d3f3bccf440ae4a09b","src/isa/x86/mod.rs":"e38c60a9d1aba3e5a48052c6185bab3f2b039e9cce639826becfe9f853c41499","src/lib.rs":"c4bfd9d2973e4a382f7a1ce8389cc1604aeba8478432a542ff3f1c24412c5b41","src/srcgen.rs":"e358b6232f0820e6e4525cdbe216206996ae5eb16a1df7a5fe41e3ce2e25b633","src/unique_table.rs":"f6041df1fa85f2a1ee914b84791e80165a0858a6253c212eaa99ff67cb56af26"},"package":"014c23ed3ebdc8377d41540af638245207dd169f421df042dfccc867465734ed"}
\ No newline at end of file
+{"files":{"Cargo.toml":"05bb65ad8427efad48f44eac2db25961e6b56374941edf54912469a7b1e7110e","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"b123f056d0d458396679c5f7f2a16d2762af0258fcda4ac14b6655a95e5a0022","src/base/mod.rs":"559075f0b76a744dd36224e06ff1c2e28ee70aaca9442fc724b116e37028ac52","src/base/settings.rs":"bc6a15221d688bf63114c53493d31070860eb7fae208596374488404a65ee41a","src/base/types.rs":"a3e449db1f515d268f3ad21301740ba415444d399f8433dbc48979f78557f66a","src/cdsl/isa.rs":"5c9a8173466e69d105245396abd342251eb00e704ab13f179ba1567b339f47e1","src/cdsl/mod.rs":"66ac1b5d095e431bcab88c4b9c5b1492a5d1ca87bcb9c9c3e544ede05b2ba925","src/cdsl/regs.rs":"c45809713e8bf9d097c75991ff8dd4ca215a97e9f83df6407dcc09d76e6fbddb","src/cdsl/settings.rs":"4ddeadf1542cc2ddec0f9e6c22d1637050da519586cd9fec0243c3eab9619f82","src/cdsl/types.rs":"82aff98c094a564ed1a11ca7628bfba66c363d5fff278babbf26a4252b3a5107","src/constant_hash.rs":"b8acd3f8712a4999819d9d9beced2938d9940a5748ba016c182f1132d97eefab","src/error.rs":"5110a4e3c1e97396ba02d9f5abbb8af4b586f0cc4d33a5c2473f1718cc4bef05","src/gen_registers.rs":"cee8f9d4ad1d07e5bd59a9ca875ede3e4143ec4c97b5fd56c3e6f8b1dea64a53","src/gen_settings.rs":"c89aaecf6b6b53e229d052db90ffc43d11b5a69974961615437608ac705ae0dd","src/gen_types.rs":"9b8a06cd025fcb67e2f98f2b3c4697e551119997fd7254dc9ed2f9c5d2e2aa1c","src/isa/arm32/mod.rs":"741da8a24aa31919458349663e0a24e03727a7c2a72d5ebd813c2162cb19c65c","src/isa/arm64/mod.rs":"2b384d84fb2a1b53d6f3882ca18d8b9027161193493361a95406fa357a0822fa","src/isa/mod.rs":"c5ea6469fe770d49ceaa4b9c6370d8df2ac55fffc076fb3852fc5bbc8c096c2b","src/isa/riscv/mod.rs":"690a285d8185e38ad3134ac1dcd1e550e346ebb349f90c7b8b68b38ddd4b7a1f","src/isa/x86/mod.rs":"712a16bc2e0e50112f92bfbc5963e4548db5f701d5f14fd344df5fc76753f641","src/lib.rs":"995c6f1d6e8ca9dda8838b96c92f37f7c78d6d555e1f05b3700a1271760a161c","src/srcgen.rs":"a51b6f7b61110d958c541bc8de61592cb93cca0d6d46b2f5ffe47fca8feedae8","src/unique_table.rs":"f6041df1fa85f2a1ee914b84791e80165a0858a6253c212eaa99ff67cb56af26"},"package":"43131e662da7e0243cff28edfbc094a62968a4b57849f77a6c1e3685e9e6e1e6"}
\ No newline at end of file
--- a/third_party/rust/cranelift-codegen-meta/Cargo.toml
+++ b/third_party/rust/cranelift-codegen-meta/Cargo.toml
@@ -6,22 +6,23 @@
 # to registry (e.g. crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
+edition = "2018"
 name = "cranelift-codegen-meta"
-version = "0.26.0"
+version = "0.28.0"
 authors = ["The Cranelift Project Developers"]
 description = "Metaprogram for cranelift-codegen code generator library"
 readme = "README.md"
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/CraneStation/cranelift"
 [dependencies.cranelift-entity]
-version = "0.26.0"
+version = "0.28.0"
 [badges.maintenance]
 status = "experimental"
 
 [badges.travis-ci]
 repository = "CraneStation/cranelift"
--- a/third_party/rust/cranelift-codegen-meta/src/base/settings.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/base/settings.rs
@@ -1,9 +1,9 @@
-use cdsl::settings::{SettingGroup, SettingGroupBuilder};
+use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder};
 
 pub fn generate() -> SettingGroup {
     let mut settings = SettingGroupBuilder::new("shared");
 
     settings.add_enum(
         "opt_level",
         r#"
         Optimization level:
--- a/third_party/rust/cranelift-codegen-meta/src/cdsl/regs.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/cdsl/regs.rs
@@ -1,8 +1,9 @@
+use cranelift_entity::entity_impl;
 use cranelift_entity::EntityRef;
 
 #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
 pub struct RegBankIndex(u32);
 entity_impl!(RegBankIndex);
 
 pub struct RegBank {
     pub name: &'static str,
--- a/third_party/rust/cranelift-codegen-meta/src/cdsl/settings.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/cdsl/settings.rs
@@ -96,17 +96,18 @@ impl Preset {
         let mut layout: Vec<(u8, u8)> = iter::repeat((0, 0))
             .take(group.settings_size as usize)
             .collect();
         for bool_index in &self.values {
             let setting = &group.settings[bool_index.0];
             let mask = setting.byte_mask();
             let val = setting.byte_for_value(true);
             assert!((val & !mask) == 0);
-            let (l_mask, l_val) = layout.get_mut(setting.byte_offset as usize).unwrap();
+            let (ref mut l_mask, ref mut l_val) =
+                *layout.get_mut(setting.byte_offset as usize).unwrap();
             *l_mask |= mask;
             *l_val = (*l_val & !mask) | val;
         }
         layout
     }
 }
 
 pub struct SettingGroup {
@@ -181,25 +182,25 @@ impl<'a> Into<PredicateNode> for (BoolSe
         let (index, group) = (self.0, self.1);
         let setting = &group.settings[index.0];
         PredicateNode::SharedBool(group.name, setting.name)
     }
 }
 
 impl PredicateNode {
     fn render(&self, group: &SettingGroup) -> String {
-        match self {
+        match *self {
             PredicateNode::OwnedBool(bool_setting_index) => format!(
                 "{}.{}()",
                 group.name, group.settings[bool_setting_index.0].name
             ),
-            PredicateNode::SharedBool(group_name, bool_name) => {
+            PredicateNode::SharedBool(ref group_name, ref bool_name) => {
                 format!("{}.{}()", group_name, bool_name)
             }
-            PredicateNode::And(lhs, rhs) => {
+            PredicateNode::And(ref lhs, ref rhs) => {
                 format!("{} && {}", lhs.render(group), rhs.render(group))
             }
         }
     }
 }
 
 pub struct Predicate {
     pub name: &'static str,
--- a/third_party/rust/cranelift-codegen-meta/src/cdsl/types.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/cdsl/types.rs
@@ -1,16 +1,16 @@
 //! Cranelift ValueType hierarchy
 
 // Temporary disabled: Unused at the moment.
 // use std::collections::HashMap;
 
 use std::fmt;
 
-use base::types as base_types;
+use crate::base::types as base_types;
 
 // Numbering scheme for value types:
 //
 // 0: Void
 // 0x01-0x6f: Special types
 // 0x70-0x7f: Lane types
 // 0x80-0xff: Vector types
 //
--- a/third_party/rust/cranelift-codegen-meta/src/constant_hash.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/constant_hash.rs
@@ -13,18 +13,17 @@ pub fn generate_table<T, H: Fn(&T) -> us
     let size = (1.20 * items.len() as f64) as usize;
     // TODO do we really need the multiply by two here?
     let size = if size.is_power_of_two() {
         size * 2
     } else {
         size.next_power_of_two()
     };
 
-    let mut table: Vec<Option<&T>> = Vec::new();
-    table.resize(size, None);
+    let mut table: Vec<Option<&T>> = vec![None; size];
 
     for i in items {
         let mut h = hash_function(i) % size;
         let mut s = 0;
         while table[h].is_some() {
             s += 1;
             h = (h + s) % size;
         }
--- a/third_party/rust/cranelift-codegen-meta/src/gen_registers.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/gen_registers.rs
@@ -1,13 +1,13 @@
-use cdsl::isa::TargetIsa;
-use cdsl::regs::{RegBank, RegClass};
+use crate::cdsl::isa::TargetIsa;
+use crate::cdsl::regs::{RegBank, RegClass};
+use crate::error;
+use crate::srcgen::Formatter;
 use cranelift_entity::EntityRef;
-use error;
-use srcgen::Formatter;
 
 fn gen_regbank(fmt: &mut Formatter, reg_bank: &RegBank) {
     let names = if reg_bank.names.len() > 0 {
         format!(r#""{}""#, reg_bank.names.join(r#"", ""#))
     } else {
         "".to_string()
     };
     fmt.line("RegBank {");
--- a/third_party/rust/cranelift-codegen-meta/src/gen_settings.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/gen_settings.rs
@@ -1,17 +1,19 @@
-use base;
-use cdsl::camel_case;
-use cdsl::isa::TargetIsa;
-use cdsl::settings::{BoolSetting, Predicate, Preset, Setting, SettingGroup, SpecificSetting};
-use constant_hash::{generate_table, simple_hash};
-use error;
-use srcgen::{Formatter, Match};
+use crate::base;
+use crate::cdsl::camel_case;
+use crate::cdsl::isa::TargetIsa;
+use crate::cdsl::settings::{
+    BoolSetting, Predicate, Preset, Setting, SettingGroup, SpecificSetting,
+};
+use crate::constant_hash::{generate_table, simple_hash};
+use crate::error;
+use crate::srcgen::{Formatter, Match};
+use crate::unique_table::UniqueTable;
 use std::collections::HashMap;
-use unique_table::UniqueTable;
 
 enum ParentGroup {
     None,
     Shared,
 }
 
 /// Emits the constructor of the Flags structure.
 fn gen_constructor(group: &SettingGroup, parent: ParentGroup, fmt: &mut Formatter) {
@@ -219,17 +221,17 @@ fn gen_getters(group: &SettingGroup, fmt
 #[derive(Hash, PartialEq, Eq)]
 enum SettingOrPreset<'a> {
     Setting(&'a Setting),
     Preset(&'a Preset),
 }
 
 impl<'a> SettingOrPreset<'a> {
     fn name(&self) -> &str {
-        match self {
+        match *self {
             SettingOrPreset::Setting(s) => s.name,
             SettingOrPreset::Preset(p) => p.name,
         }
     }
 }
 
 /// Emits DESCRIPTORS, ENUMERATORS, HASH_TABLE and PRESETS.
 fn gen_descriptors(group: &SettingGroup, fmt: &mut Formatter) {
@@ -243,24 +245,24 @@ fn gen_descriptors(group: &SettingGroup,
         group.settings.len() + group.presets.len()
     ));
     fmt.indent(|fmt| {
         for (idx, setting) in group.settings.iter().enumerate() {
             fmt.line("detail::Descriptor {");
             fmt.indent(|fmt| {
                 fmt.line(&format!("name: \"{}\",", setting.name));
                 fmt.line(&format!("offset: {},", setting.byte_offset));
-                match &setting.specific {
+                match setting.specific {
                     SpecificSetting::Bool(BoolSetting { bit_offset, .. }) => {
                         fmt.line(&format!(
                             "detail: detail::Detail::Bool {{ bit: {} }},",
                             bit_offset
                         ));
                     }
-                    SpecificSetting::Enum(values) => {
+                    SpecificSetting::Enum(ref values) => {
                         let offset = enum_table.add(values);
                         fmt.line(&format!(
                             "detail: detail::Detail::Enum {{ last: {}, enumerators: {} }},",
                             values.len() - 1,
                             offset
                         ));
                     }
                     SpecificSetting::Num(_) => {
@@ -317,17 +319,17 @@ fn gen_descriptors(group: &SettingGroup,
     );
     let hash_table = generate_table(&hash_entries, |entry| simple_hash(entry.name()));
     fmt.line(&format!(
         "static HASH_TABLE: [u16; {}] = [",
         hash_table.len()
     ));
     fmt.indent(|fmt| {
         for h in &hash_table {
-            match h {
+            match *h {
                 Some(setting_or_preset) => fmt.line(&format!(
                     "{},",
                     &descriptor_index_map
                         .get(setting_or_preset)
                         .unwrap()
                         .to_string()
                 )),
                 None => fmt.line("0xffff,"),
@@ -348,18 +350,17 @@ fn gen_descriptors(group: &SettingGroup,
                 fmt.line(&format!("(0b{:08b}, 0b{:08b}),", mask, value));
             }
         }
     });
     fmt.line("];");
 }
 
 fn gen_template(group: &SettingGroup, fmt: &mut Formatter) {
-    let mut default_bytes: Vec<u8> = Vec::new();
-    default_bytes.resize(group.settings_size as usize, 0);
+    let mut default_bytes: Vec<u8> = vec![0; group.settings_size as usize];
     for setting in &group.settings {
         *default_bytes.get_mut(setting.byte_offset as usize).unwrap() |= setting.default_byte();
     }
 
     let default_bytes: Vec<String> = default_bytes
         .iter()
         .map(|x| format!("{:#04x}", x))
         .collect();
--- a/third_party/rust/cranelift-codegen-meta/src/gen_types.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/gen_types.rs
@@ -2,19 +2,19 @@
 //!
 //! This generates a `types.rs` file which is included in
 //! `lib/codegen/ir/types.rs`. The file provides constant definitions for the
 //! most commonly used types, including all of the scalar types.
 //!
 //! This ensures that the metaprogram and the generated program see the same
 //! type numbering.
 
-use cdsl::types as cdsl_types;
-use error;
-use srcgen;
+use crate::cdsl::types as cdsl_types;
+use crate::error;
+use crate::srcgen;
 
 /// Emit a constant definition of a single value type.
 fn emit_type(ty: &cdsl_types::ValueType, fmt: &mut srcgen::Formatter) -> Result<(), error::Error> {
     let name = ty.to_string().to_uppercase();
     let number = ty.number().ok_or_else(|| {
         error::Error::with_msg(format!(
             "Could not emit type `{}` which has no number.",
             name
--- a/third_party/rust/cranelift-codegen-meta/src/isa/arm32/mod.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/isa/arm32/mod.rs
@@ -1,11 +1,11 @@
-use cdsl::isa::{TargetIsa, TargetIsaBuilder};
-use cdsl::regs::{RegBankBuilder, RegClassBuilder};
-use cdsl::settings::{SettingGroup, SettingGroupBuilder};
+use crate::cdsl::isa::{TargetIsa, TargetIsaBuilder};
+use crate::cdsl::regs::{RegBankBuilder, RegClassBuilder};
+use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder};
 
 fn define_settings(_shared: &SettingGroup) -> SettingGroup {
     let setting = SettingGroupBuilder::new("arm32");
     setting.finish()
 }
 
 pub fn define(shared_settings: &SettingGroup) -> TargetIsa {
     let mut isa = TargetIsaBuilder::new("arm32", define_settings(shared_settings));
--- a/third_party/rust/cranelift-codegen-meta/src/isa/arm64/mod.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/isa/arm64/mod.rs
@@ -1,11 +1,11 @@
-use cdsl::isa::{TargetIsa, TargetIsaBuilder};
-use cdsl::regs::{RegBankBuilder, RegClassBuilder};
-use cdsl::settings::{SettingGroup, SettingGroupBuilder};
+use crate::cdsl::isa::{TargetIsa, TargetIsaBuilder};
+use crate::cdsl::regs::{RegBankBuilder, RegClassBuilder};
+use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder};
 
 fn define_settings(_shared: &SettingGroup) -> SettingGroup {
     let setting = SettingGroupBuilder::new("arm64");
     setting.finish()
 }
 
 pub fn define(shared_settings: &SettingGroup) -> TargetIsa {
     let mut isa = TargetIsaBuilder::new("arm64", define_settings(shared_settings));
--- a/third_party/rust/cranelift-codegen-meta/src/isa/mod.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/isa/mod.rs
@@ -1,10 +1,10 @@
-use cdsl::isa::TargetIsa;
-use cdsl::settings::SettingGroup;
+use crate::cdsl::isa::TargetIsa;
+use crate::cdsl::settings::SettingGroup;
 use std::fmt;
 
 mod arm32;
 mod arm64;
 mod riscv;
 mod x86;
 
 /// Represents known ISA target.
--- a/third_party/rust/cranelift-codegen-meta/src/isa/riscv/mod.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/isa/riscv/mod.rs
@@ -1,11 +1,11 @@
-use cdsl::isa::{TargetIsa, TargetIsaBuilder};
-use cdsl::regs::{RegBankBuilder, RegClassBuilder};
-use cdsl::settings::{PredicateNode, SettingGroup, SettingGroupBuilder};
+use crate::cdsl::isa::{TargetIsa, TargetIsaBuilder};
+use crate::cdsl::regs::{RegBankBuilder, RegClassBuilder};
+use crate::cdsl::settings::{PredicateNode, SettingGroup, SettingGroupBuilder};
 
 fn define_settings(shared: &SettingGroup) -> SettingGroup {
     let mut setting = SettingGroupBuilder::new("riscv");
 
     let supports_m = setting.add_bool(
         "supports_m",
         "CPU supports the 'M' extension (mul/div)",
         false,
--- a/third_party/rust/cranelift-codegen-meta/src/isa/x86/mod.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/isa/x86/mod.rs
@@ -1,11 +1,11 @@
-use cdsl::isa::{TargetIsa, TargetIsaBuilder};
-use cdsl::regs::{RegBankBuilder, RegClassBuilder};
-use cdsl::settings::{PredicateNode, SettingGroup, SettingGroupBuilder};
+use crate::cdsl::isa::{TargetIsa, TargetIsaBuilder};
+use crate::cdsl::regs::{RegBankBuilder, RegClassBuilder};
+use crate::cdsl::settings::{PredicateNode, SettingGroup, SettingGroupBuilder};
 
 pub fn define_settings(_shared: &SettingGroup) -> SettingGroup {
     let mut settings = SettingGroupBuilder::new("x86");
 
     // CPUID.01H:ECX
     let has_sse3 = settings.add_bool("has_sse3", "SSE3: CPUID.01H:ECX.SSE3[bit 0]", false);
     let has_ssse3 = settings.add_bool("has_ssse3", "SSSE3: CPUID.01H:ECX.SSSE3[bit 9]", false);
     let has_sse41 = settings.add_bool("has_sse41", "SSE4.1: CPUID.01H:ECX.SSE4_1[bit 19]", false);
--- a/third_party/rust/cranelift-codegen-meta/src/lib.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/lib.rs
@@ -1,11 +1,8 @@
-#[macro_use]
-extern crate cranelift_entity;
-
 #[macro_use]
 mod cdsl;
 
 pub mod error;
 pub mod gen_registers;
 pub mod gen_settings;
 pub mod gen_types;
 pub mod isa;
--- a/third_party/rust/cranelift-codegen-meta/src/srcgen.rs
+++ b/third_party/rust/cranelift-codegen-meta/src/srcgen.rs
@@ -4,17 +4,17 @@
 //! generating source code.
 
 use std::cmp;
 use std::collections::{BTreeMap, BTreeSet};
 use std::fs;
 use std::io::Write;
 use std::path;
 
-use error;
+use crate::error;
 
 static SHIFTWIDTH: usize = 4;
 
 pub struct Formatter {
     indent: usize,
     lines: Vec<String>,
 }
 
@@ -117,17 +117,17 @@ impl Formatter {
             })
             .for_each(|s| self.line(s.as_str()));
     }
 
     /// Add a match expression.
     pub fn add_match(&mut self, m: Match) {
         self.line(&format!("match {} {{", m.expr));
         self.indent(|fmt| {
-            for ((fields, body), names) in m.arms.iter() {
+            for (&(ref fields, ref body), ref names) in m.arms.iter() {
                 // name { fields } | name { fields } => { body }
                 let conditions: Vec<String> = names
                     .iter()
                     .map(|name| {
                         if fields.len() > 0 {
                             format!("{} {{ {} }}", name, fields.join(", "))
                         } else {
                             name.clone()
@@ -146,17 +146,17 @@ impl Formatter {
     }
 }
 
 /// Compute the indentation of s, or None of an empty line.
 fn _indent(s: &str) -> Option<usize> {
     if s.is_empty() {
         None
     } else {
-        let t = s.trim_left();
+        let t = s.trim_start();
         Some(s.len() - t.len())
     }
 }
 
 /// Given a multi-line string, split it into a sequence of lines after
 /// stripping a common indentation. This is useful for strings defined with
 /// doc strings.
 fn parse_multiline(s: &str) -> Vec<String> {
@@ -164,39 +164,39 @@ fn parse_multiline(s: &str) -> Vec<Strin
     let expanded_tab = format!("{:-1$}", " ", SHIFTWIDTH);
     let lines: Vec<String> = s.lines().map(|l| l.replace("\t", &expanded_tab)).collect();
 
     // Determine minimum indentation, ignoring the first line and empty lines.
     let indent = lines
         .iter()
         .skip(1)
         .filter(|l| !l.trim().is_empty())
-        .map(|l| l.len() - l.trim_left().len())
+        .map(|l| l.len() - l.trim_start().len())
         .min();
 
     // Strip off leading blank lines.
     let mut lines_iter = lines.iter().skip_while(|l| l.is_empty());
     let mut trimmed = Vec::with_capacity(lines.len());
 
     // Remove indentation (first line is special)
     if let Some(s) = lines_iter.next().map(|l| l.trim()).map(|l| l.to_string()) {
         trimmed.push(s);
     }
 
     // Remove trailing whitespace from other lines.
     let mut other_lines = if let Some(indent) = indent {
         // Note that empty lines may have fewer than `indent` chars.
         lines_iter
             .map(|l| &l[cmp::min(indent, l.len())..])
-            .map(|l| l.trim_right())
+            .map(|l| l.trim_end())
             .map(|l| l.to_string())
             .collect::<Vec<_>>()
     } else {
         lines_iter
-            .map(|l| l.trim_right())
+            .map(|l| l.trim_end())
             .map(|l| l.to_string())
             .collect::<Vec<_>>()
     };
 
     trimmed.append(&mut other_lines);
 
     // Strip off trailing blank lines.
     while let Some(s) = trimmed.pop() {
@@ -247,17 +247,17 @@ impl Match {
 }
 
 #[cfg(test)]
 mod srcgen_tests {
     use super::parse_multiline;
     use super::Formatter;
     use super::Match;
 
-    fn from_raw_string(s: impl Into<String>) -> Vec<String> {
+    fn from_raw_string<S: Into<String>>(s: S) -> Vec<String> {
         s.into()
             .trim()
             .split("\n")
             .into_iter()
             .map(|x| format!("{}\n", x))
             .collect()
     }
 
--- a/third_party/rust/cranelift-codegen/.cargo-checksum.json
+++ b/third_party/rust/cranelift-codegen/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"d9dfa768b55bf0c8d669f9a5e3075f222153672a04036b324ac6ce3cc5a4e047","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"e5127227a7db4a8aa92fa6613ed71801025790e696bb41b0323fb7f3c6f7495a","build.rs":"cb22f35d8804da1227f345d53e09a3ba5d62af60842e77629dcc9e370a6af080","meta-python/base/__init__.py":"4fac8bb055541dc964383bb04223bae6dfbfe348abf5e23f83655966cbb4aa8f","meta-python/base/entities.py":"0e146dd56dfb93cac88f9557a3501c9804cff584c2723db27435842bb5e2a1b7","meta-python/base/formats.py":"f9fb41210bc1f99a78cb7a60ee9f01c603412c6b1db7e69abbcc0f573cf9fb40","meta-python/base/immediates.py":"f42682d86bda7b569ec2fc2debd9036355999e61caaa9fbf8307e0be8a164814","meta-python/base/instructions.py":"4874aae8ea4ef3a1ac59fe9fc7b18c031ac9c72e3559c1c834df76c7144aa5c4","meta-python/base/legalize.py":"57b71ec3599fbf998c1926e4b48566661b7feec01dbd8bd177d0d2aaa26a44c2","meta-python/base/predicates.py":"53a5a9a37021a9762f0faec9f9e3c5b713411d47dd9192423cfe0f7a61916809","meta-python/base/semantics.py":"b90cbca9a143676ac37496c83634a66a83360248e4505ff7bda12b0d454efd92","meta-python/base/settings.py":"97fca9ddaab347f50f1594c93283f8f474e53a7232eae65949f56a6a702c2bba","meta-python/base/types.py":"9616d6fe4cab050827ab02eeb9843eacebbb8f7555521f504b5ee2ddf7214fdb","meta-python/build.py":"b72a80a54e09366878e92dca3a1508af394bf71a0c4b07a05e54058901373d34","meta-python/cdsl/__init__.py":"b531693b8228553ca8bd07e1dcd1aa5855f1ad3741b431d758fc27fdd162b024","meta-python/cdsl/ast.py":"b7c09f69b28b5754f494912ca5b77722dbd4ee416d5fad79cb48322eb544ea9f","meta-python/cdsl/formats.py":"fedfeaec754b40d6a9cc92b827976782c615d8eab1c7f47f6b47510cbef585f4","meta-python/cdsl/instructions.py":"b0ddfd8fd22889bd1e610c103d47087c9c6ae5882862ed44921dafc2ae0463a0","meta-python/cdsl/isa.py":"dc530a4dd5642e3379398dfc8a90ad6ae1692302de63851370bdfa8abf4cdce0","meta-python/cdsl/operands.py":"e24914eae4059b88781bf5a5d7a14ecf98b10a701ed6cf6e88d15981b2ccbfdf","meta-python/cdsl/predicates.py":"def3f91712744671df9cf3d4f9c255a2061f341198689e31addf7db4efb63e36","meta-python/cdsl/registers.py":"939dafd1b8976a6cd456c9a5e4b374af81fafb9da979ea3a1f6d14e4645914a6","meta-python/cdsl/settings.py":"a859bd006e13b245ff906977512cd4822c3b22601ed17e87ce0618503172809f","meta-python/cdsl/test_ast.py":"947e934e2862445a158bf266dff58a8c88aae31fb34a7f823309ee58a15c5393","meta-python/cdsl/test_package.py":"ffa53d20e023ecb89137294bb13614f4de9b09e1bf05d9772131570bf78f7987","meta-python/cdsl/test_ti.py":"57966c9eb027fa73bbc7ad81094ff55232053fbb2e16d78849ae3b6e9b1c2989","meta-python/cdsl/test_typevar.py":"714b2d564af1a843629279501436d681cd6590d1988b59e9f50ec940506538bb","meta-python/cdsl/test_xform.py":"ddb6633c7941bbf68570701cb887a81d6b4b27f4bc45eabccf2ce287ad9b77e9","meta-python/cdsl/ti.py":"a1a7ff79f8a2196aee491a3aafbd4f1b231004bbb5281992fc8f4e43f4fb951f","meta-python/cdsl/types.py":"adee4bbc1a9478288fa4b53ee1edeb5ee3296dba2c70bfbe01e923895064999e","meta-python/cdsl/typevar.py":"b5669934eddaf5b9cc0c27b966e2566b5f669f1c5a345f005960930fb499097e","meta-python/cdsl/xform.py":"5cdad80f12d50aa9491cd3d39797e6c0444936bb0874199d7c34e6d735658b34","meta-python/check.sh":"707cda14534882e8d4593f93c056390560394c9bc8a687e99f10a56d7b09cb92","meta-python/constant_hash.py":"c752e6dadf3a9a5bd00c978e85ab27a20c49138a1ccdc6fc9a1904797a4bfe48","meta-python/gen_binemit.py":"76472fb199a330b934ba9ad0a1bbacfb52f0eae7c9a66d83f0d7890970323a2d","meta-python/gen_build_deps.py":"3920c5c89451c26102f7d87c61de64c94e915a545bc8a35d2e49106aecf019ec","meta-python/gen_encoding.py":"0b57d9d74a72a1b3b11721166fdbaa8b8c4b2d7493fc10b88736ac330b83256f","meta-python/gen_instr.py":"7ccd6a6bb1ce1800ea9c2c37e462ac7ded4f908e311d708080f7d21d92578316","meta-python/gen_legalizer.py":"187a47f1702e07487fb8a13076aadcf9c2de3e801d367424dc847ff7b0ed70f1","meta-python/gen_settings.py":"c2fce1d2f3811bf11ab07cbabf4fca0250e01aa4b09ab55ec7fa251bf8ca28fa","meta-python/isa/__init__.py":"e499c1206cd095a926fa0ca7eb9d0a50a802ed71c8eb7598e5d3a0f939c8ada5","meta-python/isa/arm32/__init__.py":"eecba73231aa398ded7304690bdba3450dc163afd4360f1b0ad02a28e2380363","meta-python/isa/arm32/defs.py":"01c41dbd7406c624e26229df6befa0992194bddcc7d11e8f6174abfe2b33bf61","meta-python/isa/arm32/registers.py":"c03ca6435828ad5f262049e42f1f71bcf74903831f85daa92c3f322a6c1050ea","meta-python/isa/arm32/settings.py":"afd5a04a9d029f578d6f62dc7c539191886cc9f9dea15d65fc66bf37a63b8814","meta-python/isa/arm64/__init__.py":"f6877253cf786d7ee972881e7d9b3c78c11e6b024e4e227487340dd01d0c44e4","meta-python/isa/arm64/defs.py":"797c5bb6d11fc7a44afe67476136dbd11c40f5e13a1c8f52f9f96be4441677b2","meta-python/isa/arm64/registers.py":"9bdd06edaa382be96042e1ac36d63137e73292292b61dcf4becb7d1428130317","meta-python/isa/arm64/settings.py":"f7b1f8733e775ea8005372ee35f1c2a627b3a69d722e837295599e4cf1f5eb43","meta-python/isa/riscv/__init__.py":"c11607c9eef0bc2707daa3edd4174e934c7a0dcc8ce90cee2c9292a85b1ac596","meta-python/isa/riscv/defs.py":"e73740055c4fb123c45453fc149a807e9720466de848022d5375049bdcfc311c","meta-python/isa/riscv/encodings.py":"ecaad5ea98273ade1cb10606354e893342c495bb48771df50121f789566d7be6","meta-python/isa/riscv/recipes.py":"3852e5b7aa6995fa721ba91744a0470343ce1834651e7b9cc97b5d69af7dfdc5","meta-python/isa/riscv/registers.py":"ef9aca3a6ec2b08ee8f5952186d232861b64a919b671b41911a365e7672b01bd","meta-python/isa/riscv/settings.py":"dfe29722d67be0620a70e08cfb802829a26f5fd339a9342a8ac2dd419daf8a85","meta-python/isa/x86/__init__.py":"ad579de68ea7bf5dc2bce0e3a6f09e7978b1697f1afec8a5ce5dc591136e590d","meta-python/isa/x86/defs.py":"b5eb7889b6f5e5b221ed3923d0137bbb1566c55b5961448cc39e4ea2f13cf4b7","meta-python/isa/x86/encodings.py":"3885bcb2558e754de812f8239b4b509a32a42bcb8d3158d0b8899b18f3d90ac5","meta-python/isa/x86/instructions.py":"530cde78e6b9f6e4ea2192985f4c5c77a987cdc19001d50fb47fa8e36a62f52e","meta-python/isa/x86/legalize.py":"1375ded072c29459e7c0e40ecb02f28d5395d9d8c603eb70e338b2bf2991c9cd","meta-python/isa/x86/recipes.py":"37fd53909174f9f8cc35156bd06b8e82d75d353d67586f169f5dfdf2bb39a805","meta-python/isa/x86/registers.py":"ff934491d07ec6b51fbfd454b865a7c7c191ffbd31b1804615735266b120f4b2","meta-python/isa/x86/settings.py":"d779a768475cf00c2a8d3ddb5cd0a70ce34662e0ebb52ee26a7e1a495ec41aa2","meta-python/mypy.ini":"5ec2f7cc0bbc4fd0435643d6b72e715bd9568a3a0fe14c043f9e559c405b66fb","meta-python/semantics/__init__.py":"e8a25a111f2d9cc9fc7aa498a572a86403d31fe50a7ba59dd2e2560a17804e92","meta-python/semantics/elaborate.py":"3a3fbba83a6818c2d1ce236fd0413111380875a0307f7a5f4b5dd66d8ef714b1","meta-python/semantics/macros.py":"b218c52e1bd4f019dc14a27d315b4f3405a10e5bdc6f2523fe709c8faf91b418","meta-python/semantics/primitives.py":"4e5eb0c90fcc295686732c8c66ad7a793997645c9a676c97babf06823fd2b60d","meta-python/semantics/smtlib.py":"825edfbb9221bf59c02fea26e55d17cf32194da7a9f56ed0e035c44353481055","meta-python/semantics/test_elaborate.py":"3a4c850a7385007422c7549661b211903cd1dd1606dad7a86262ae27e697bca6","meta-python/srcgen.py":"999557d683e808a2ca90688c489ec4aff65798f44ac321ecf7de34d307261913","meta-python/stubs/z3/__init__.pyi":"6aaeb80f783b29c4364dee21da45f6df041c0a4807189a15777ee5447f6515dc","meta-python/stubs/z3/z3core.pyi":"c01a41d468e07cc4f8b405c292ed7f8c82bc1077f8b82dfde1e474577ade3335","meta-python/stubs/z3/z3types.pyi":"30009c951af99b9028d47cd4cabae95ff9742b77b690bd8dd63f6b7dba580759","meta-python/test_constant_hash.py":"157cf4f8964e0f04c041ffd349e889ce565b144453436690578c5d03c3a60216","meta-python/test_gen_legalizer.py":"f16edce7cb2ce53e55b1fc56b6f5ba6a0fc61b291ee4513ec859e36d69f0e285","meta-python/test_srcgen.py":"d6d7775e19a5b2621360c00eb6d92dfcb4568e49220993e0ceaac9628dbfd661","meta-python/unique_table.py":"5bd500667430c15f6ae586603d8612fb3bda07b072e40d86286e08392bdc3127","src/abi.rs":"29f505fdfcb6ec14e561bb408b99ab30ab69b96d1e283a1dcd55db9aff02dbe4","src/binemit/memorysink.rs":"8437e5f5c1b3e68b8e2d0de6fb3a4982f7a06390a0f8820b6379492408df8964","src/binemit/mod.rs":"2f95ea5f6ee20b8d56bdedcacdd41a609c5b999c02affca341d6a71eb59bc113","src/binemit/relaxation.rs":"c814a42504e849d5c29fd935d8e4c74146f802f775e96f7df4a86576bd942660","src/binemit/shrink.rs":"428679a02e44a7b3621a43c7d2e8d2f3b2cb50a36179a4d9862205c0ba34ae50","src/bitset.rs":"67fd02dd2acb9af73e45426e5cab1d2a74d568a11d11ee17ae6a4421f96cf741","src/cfg_printer.rs":"8c0fda88060c204985a6406ba46d7f0a69be96bb18c9fcfc70055d50986068ab","src/constant_hash.rs":"442c010f832191225c3d21815e99bd087cfd3367e5a8ffe6204e75f53bd355c9","src/context.rs":"a44197bd5e05599b643c420d87ca4ad218a8c3ab2fb7b88655b2479014b117b2","src/cursor.rs":"523899307d471f63e9ca35ee4b3340cf55041561a05b199e11cc60f6ad2714f4","src/dbg.rs":"bae915e1f7544f725817b368aed00a6aaa9e394a454dc847d65ad44e54d78cb9","src/dce.rs":"6d015824ae0325f01bb523606d7e15dd5feeb72a75b947f40385feeba94555c8","src/divconst_magic_numbers.rs":"eac50e2353e17ab6f7d1da3bd8e0e8dc9e3122a160efba594d407eb6a8936cc7","src/dominator_tree.rs":"73032e0e7a0ab694aa3181222bccb40630bd6fbda33885a391fd662f7de7d540","src/flowgraph.rs":"fccfade2b24038e18d469e273976f418757159fde140642b5faeb3c664a756ce","src/fx.rs":"2fb53f141b3e6be1882a1e4afac4bc607ce694f045d9329ee823e0aca415898e","src/ir/builder.rs":"19aa7cef76b7577bdd9d769fb1260080a959f9bfdbac569fb1e38307a721a03c","src/ir/condcodes.rs":"5456a25798516245b0923c9e12ae0af5cc98c097fc6f3bc0bf2d7af5008667f7","src/ir/dfg.rs":"f5cd6efb9cfc158d3f13671e7d739746f1f009230ea0865baac5edc3f32a0122","src/ir/entities.rs":"1505347c2baa256b04f69384d1391f52e007d533cb4319d3826cf3046ec1df27","src/ir/extfunc.rs":"9a3535730a39a6b71ca9f1ed679f588e6c3fa48ee7a50489d90803f3134db4a6","src/ir/extname.rs":"5b50dddd0801dfe736433191502e405c879221a6e362be0e2919176b90b4d74c","src/ir/function.rs":"55feb0b0a2bf4a0d194a4d11fc297616c78d5edfa41504795742fd25e7af1399","src/ir/globalvalue.rs":"bf9b76430f6ba564d4e5db85dbebfddf952678be6914326a5549b569c064d03d","src/ir/heap.rs":"2e6c5ed8f4a1ac3cd37e5115ae978d48d61b9af100da0cff1b1b6d696907958e","src/ir/immediates.rs":"ccf1210052346a62a0914251a2da8c40e75b00e58102ef7975719b79eb644dd2","src/ir/instructions.rs":"2dd2ad70947122e791f41f6cbc7879fd201d4f96d19c138b56559428ba655dab","src/ir/jumptable.rs":"3fc108096e5404c4c30220cfaa4e359caa83bad747268bea88bbc0ac4b1bcd13","src/ir/layout.rs":"77210d256e39d339736ced5518c8d666da6359f656b972d6b6b19581ccaec329","src/ir/libcall.rs":"b35c8d0c90e686a176f9bd157ef6ab3819e8a0b974d0d24007a910ffb0d15f51","src/ir/memflags.rs":"26654b642e36bf11c0871e2b3e20cbdbaf8e53218a0bfef7b7bcfd9e838b51fc","src/ir/mod.rs":"16566fb92fc16498d5a2699fa76dfdbc39665a4e8bae3040c03e4f3d2f07e3cb","src/ir/progpoint.rs":"911046269d250102f8ae473411fda7ca7f1acd3d48a9392cacfe3b2e5188c321","src/ir/sourceloc.rs":"79eb71609b844839994fc735cd72edf53179eb659303a4150634928e207cee4f","src/ir/stackslot.rs":"d5d0c61555bf7060c58603047356b7db53b5b296497daed8eac356b9e724902d","src/ir/table.rs":"3550a5fb5af0d4992b4c7d23a3e790a411ad39c1351fa03b54add691e6232163","src/ir/trapcode.rs":"9d78e03784dbdaffb60228e82f4f6277dd78422668e9afa7614a0552158a93cd","src/ir/types.rs":"a56cf1844817171276907fa18f973783d4b6223e77bf3ee94dce7db442946433","src/ir/valueloc.rs":"5055897d9acba6d9c396b126889f9b2c7ff3f54a27c1ec5fe70d1a059d633b36","src/isa/arm32/abi.rs":"50ca3161a0f11ba1c2d5b0ff7523d332503cb6a6182695246e4284a486e18cab","src/isa/arm32/binemit.rs":"3197df7b15c223f3a9f2708311375ff423bb247381cf21e26da079f7933f5279","src/isa/arm32/enc_tables.rs":"dacb50bdacfa2085a6283818563e19874590d223e5decb5c91b968e0348e2bf7","src/isa/arm32/mod.rs":"798049325ca439444a5508f63ebb53bf2e0ab16b128c43417017bbdb2fd95742","src/isa/arm32/registers.rs":"0e5c32a218d685c6d37fb46788baedf6bede6be7d4f715808c13620636dfc472","src/isa/arm32/settings.rs":"145f59227c6087e7872f66a6d2183c66e061c40466e7b427a733136e41e41207","src/isa/arm64/abi.rs":"bfd0065a6c26eb407872959c9d7f64169591afa4d69816370e0900aa1ad4e46f","src/isa/arm64/binemit.rs":"159ab9eca03ac4aa7f55d51ab20585a5971d95a74c61953d1899ac863b06e2ec","src/isa/arm64/enc_tables.rs":"00ec8f53402f6cb73716db1adb3aca564574833cab58dc12b4dc6ba8c4529a73","src/isa/arm64/mod.rs":"4eef5f904f2219262c59dae7056af5adb7764074309dffc0be5b2357781dd1a6","src/isa/arm64/registers.rs":"7a8b207ed28737efc737e8e65ce79e7e7d3eecd23599890230dca8474c985026","src/isa/arm64/settings.rs":"7b466fcc2c58bc1846a72f08ec58900b3cf622ab2922ee9128e6dfe254907bf5","src/isa/call_conv.rs":"00d8ea90af7bc414d8bbe4eadcff4484c53ec74979a8677ff5e215d17d43dcac","src/isa/constraints.rs":"324d7c8655565f13b90a6c9587c9fb6c545ab3086201f434e1324fc5d6e5b3c7","src/isa/enc_tables.rs":"946a9fcdf7d0541e7e65aeafdf18b6a5cb9e3ea29a1ce3bf05c155f910acca3a","src/isa/encoding.rs":"032347d4e624449af7a35f7ba012339bc49fabae97b971818e922d6ca4510e59","src/isa/mod.rs":"da05b44fd82305c4b2fdcc16a7dbcc5281cf919cf6df09c305561e6e7772c719","src/isa/registers.rs":"dc0ab116f10adc0aa27bc9b7c688106966d221e0654bec7ec53ceaea3a8b784b","src/isa/riscv/abi.rs":"1de6d0070126e0127ca6a63551a14d1b5c030cf9628538fd732301fd2bd34b5e","src/isa/riscv/binemit.rs":"3bdad2791447f51bfe5ecedb73b1aed8a6a8809790b1f26e3ff624a89163a026","src/isa/riscv/enc_tables.rs":"6bc179f95ef5634b64fb42ab67929c0aeb70ac8efccfc47dd8c9b1dbfe64a446","src/isa/riscv/mod.rs":"de0dd32005f6b0510e3c8a31bb7e58ab7e7cffb674169a08558794950db87126","src/isa/riscv/registers.rs":"794ac61343a8db66dc99b2ca964ea3986b47b37fe8b72575c644c1cdaabd2991","src/isa/riscv/settings.rs":"78ced69b82d89f83b5612a91d0acdac2616f9091b380ee3e4715adb31f95b232","src/isa/stack.rs":"ec96130c446cd7d637722f1603e38d5164498368b652f4b0454baf3227385ad4","src/isa/x86/abi.rs":"c11c288c59edf834043b06eda3a271394e0dba6c719900f0a201ec6108197b69","src/isa/x86/binemit.rs":"f90820a1f9c4ad02f3507625d35f014f644d8cea93b0216bcc60cc05cc84eacc","src/isa/x86/enc_tables.rs":"aa4bd2992d08ad97e94aafa022cafd853e0978c7c139558885715f57bfcf49e7","src/isa/x86/mod.rs":"bc83c0e619e8603885359c472b4113bc83b8867dd2d8e83b27f798301c6df93c","src/isa/x86/registers.rs":"783ebbe4c3b4711fe1eac2cfd3bbea7c31a53c15c6028397c038ef4eb0b2aa06","src/isa/x86/settings.rs":"dcce098045c1115cd55f256dcd3e0ccaa5a0c9ad93b14fb8a4c680e95caf2b73","src/iterators.rs":"f85f52d3fa707a0eb974c92215b3e976923ce8f9481219f7812e0f2869c2bd37","src/legalizer/boundary.rs":"cbc6035ac90b9d2c8e621e3a058e3120afa144ee07f901d3370d01340e0331f9","src/legalizer/call.rs":"12f380d126765f0bc2da1cf298088fa98451e2d6bf56c34b755ff7077d14a4f1","src/legalizer/globalvalue.rs":"a8b7784692354cbe3577532103171bf9ca8a22aa077c6d06d91b055eb4be4f8a","src/legalizer/heap.rs":"86f642d07ac65fd29de6ad23907849e13747bc90b4c4fb18039d6ff3cfd2dc8a","src/legalizer/libcall.rs":"bf18267f502bf9bfbc3ff51bc05df480293a84422ea7f4c37dd0c75e97952766","src/legalizer/mod.rs":"bb79f504a3bfce92c4787d9c2a9385d81b0c02eb15fbe01ff66f355d95348c3a","src/legalizer/split.rs":"2e0ab9c35006d3743bdbd1ee6a4332b05af2c3e81137fed102422bac4a5ebc3f","src/legalizer/table.rs":"a695262e045e71456c641b576eeebed0c8666495a7e1a70abe60f861b599fae5","src/lib.rs":"7e08cb847189bd7faa3dd205867505f7f8ed97671d32e392848ec0d71a1df422","src/licm.rs":"dcdf4744a01489939955dd02d43be3522cfbc448d92b30796d512b10e784c503","src/loop_analysis.rs":"ab74f702649ddd16d3d91400c3c2aafed4f09d9af210f5e180dff15a82caf8ac","src/nan_canonicalization.rs":"e2b1f9935d14af9abe553de1eda5483cffdaa7098dd1a17ba9a98fa04280b22c","src/partition_slice.rs":"55b9e857f452baf4d6312779861f9ef93b3d5300467e752230ec6af14943efe3","src/postopt.rs":"f1fe06398c644cad19fd427323c74acdb237b5853ffb72148a2b2012b906e2a3","src/predicates.rs":"8e4c4afde65420d33621aedd80e4ce270d334c1b62a17d7879273a1719d49b41","src/print_errors.rs":"9db532d3ee4bb5d8265cbf36d371f2941a6dc0ea6f86d663dcdf54ede1bedd21","src/ref_slice.rs":"9be914b705eefcc6b4e38db573f56ad7b978f4b65c2f6f8f5516df78fb2206a4","src/regalloc/affinity.rs":"47e28f9ae7cebfc9b1006480143a3a5ab1b118ec761a163c4a670b63fdc47d0a","src/regalloc/coalescing.rs":"5ffab5529e5840e0dc3f13930788caf75ae9e15ce90d4f64f9f625b2ee495605","src/regalloc/coloring.rs":"beb4893d82e0a7965417c158c51e3752896b591f9db7d1c4803caa2b34154a29","src/regalloc/context.rs":"6ff7bfc76c63ff18850c1354c1e5e72287cc0a7d65d52ef9804223c750a09f7c","src/regalloc/diversion.rs":"cbb942a197081f9e537f3fed71a7ec6d6d1edc18b8536fa46a1dda316f46c776","src/regalloc/live_value_tracker.rs":"054efd9e8da0f33a158082f67a7c2c14f7c8632b1fc28d54941ca7bc9d5a46d6","src/regalloc/liveness.rs":"b21e4855c0339c1b15b1b62e63bb1a569c4256b42d08c3c21b6e7fc4634c5e62","src/regalloc/liverange.rs":"3c6a34e35a912dce48fa9a579e82e14a7e64334d5572b0d74dbfbf42dd380804","src/regalloc/mod.rs":"6254df639f9289fd578e01b7dca99bc9c9e3c6680c6d031405e8df8d0cff31ad","src/regalloc/pressure.rs":"7c73ca1f54559b1d9f8ce587bdc067e74f3d47901058f7ae1e9277516624236f","src/regalloc/register_set.rs":"dcdf30ec4ffeac26eabf85f585209a04617eef00bf59e6a1c0462f1dc3454700","src/regalloc/reload.rs":"714e598e968ca9498da969af2343cab7983ddbe160cef0a2d36543618885acf7","src/regalloc/solver.rs":"853c6f16f68e75add56981b132d92e556a94d8cbd13fed311df2d75da08de03a","src/regalloc/spilling.rs":"6ab899e036a50965b0b7d5fa9aef9077c68ae6932315ec2e14d71c2f3791d78f","src/regalloc/virtregs.rs":"5b12892ad360f8c2a8f7b1ffe40e467a88e64aa1c77c8012149c6653e46fb3d6","src/result.rs":"d43abf9b22c5ad772200889bba339bcc4455c7abb9f2f3a2af65fbbaf1130009","src/scoped_hash_map.rs":"102797c380a588f7c16d26bf3b6c9cff28d37c2d8168a382b265194cd8969212","src/settings.rs":"18f3b43b5ec916b5969a62a6bbf0b7b8f039a5f7930e406bb7e8f181f2dc0d2d","src/simple_gvn.rs":"05576f7e90555c668c91df0b63a0468fbf2ed1aee9bc4118b73461f8719ead1a","src/simple_preopt.rs":"cfafd0398bba0b3e2b91b5bf10617bd4048ba2b22345b3e5bfc403239903960a","src/stack_layout.rs":"ce0b4b188cc46fa5070139124ffb2d263d44acd08703e7043a40b5c1afa952fb","src/timing.rs":"7c05d910efbbca4138678cd463d5a1709bedc2c3fdbea239f3a47798252af05f","src/topo_order.rs":"73ec442db1cc9a282cf9c5b715ad2f60c4d2872080c16fd04ef7091d56816fbd","src/unreachable_code.rs":"6fdea8f9afe9fbffe411bfef48fec7937cb41d51036fd190a3d0a5f0cc2894c6","src/verifier/cssa.rs":"8f41765d18474575faa7c44a0345549dabe0af07141e2f004a7db1c67486ce77","src/verifier/flags.rs":"0665b4cbeef762c3871ba3cc55b0b1a27c513e25cbd3f93a725aa3d636a23c72","src/verifier/liveness.rs":"6e827f05461bd6fb21b0ce99f02fae374f2d6ea6e7e14ba61e88983a1c6fac4b","src/verifier/locations.rs":"a83f7d58118a838651c80f55e2455736e79235691692488d8431b77be8093a58","src/verifier/mod.rs":"9cad0ca7502bef8d99bb3519105630c364a276d6501fd6f3acbebd3692075efa","src/write.rs":"1e810d79ff90aa37c76e16df8d6e69af6e35f5d7c6fae325243d8e2d0568ac4d"},"package":"42f5b809bd885c368e01aeec8fe04f21dcb07569834b907d75b4a7bed8d067eb"}
\ No newline at end of file
+{"files":{"Cargo.toml":"8b7c3931be433dc3b8bd1cd5ea3c0dfaea4c707ff39292bc24c242ab0ddecbde","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"e5127227a7db4a8aa92fa6613ed71801025790e696bb41b0323fb7f3c6f7495a","build.rs":"20fe0788da68c9b13ef97d9387df734876ff4c4f63e7c26b547b778705e99f5c","meta-python/base/__init__.py":"4fac8bb055541dc964383bb04223bae6dfbfe348abf5e23f83655966cbb4aa8f","meta-python/base/entities.py":"0e146dd56dfb93cac88f9557a3501c9804cff584c2723db27435842bb5e2a1b7","meta-python/base/formats.py":"f9fb41210bc1f99a78cb7a60ee9f01c603412c6b1db7e69abbcc0f573cf9fb40","meta-python/base/immediates.py":"f42682d86bda7b569ec2fc2debd9036355999e61caaa9fbf8307e0be8a164814","meta-python/base/instructions.py":"4874aae8ea4ef3a1ac59fe9fc7b18c031ac9c72e3559c1c834df76c7144aa5c4","meta-python/base/legalize.py":"7453d7490d7e1c691c8a230ce93561c8a4a110ca60ca2d213e0a572fda921039","meta-python/base/predicates.py":"53a5a9a37021a9762f0faec9f9e3c5b713411d47dd9192423cfe0f7a61916809","meta-python/base/semantics.py":"b90cbca9a143676ac37496c83634a66a83360248e4505ff7bda12b0d454efd92","meta-python/base/settings.py":"97fca9ddaab347f50f1594c93283f8f474e53a7232eae65949f56a6a702c2bba","meta-python/base/types.py":"9616d6fe4cab050827ab02eeb9843eacebbb8f7555521f504b5ee2ddf7214fdb","meta-python/build.py":"b72a80a54e09366878e92dca3a1508af394bf71a0c4b07a05e54058901373d34","meta-python/cdsl/__init__.py":"b534ec129a0e517f0d13313c2b4bb3a345d3e5b62693a31d8d42c80a219e39fa","meta-python/cdsl/ast.py":"832ac98dddea88f4f8a608ac6ac3fda009a15b52abacca30cf39e3787154521c","meta-python/cdsl/formats.py":"fedfeaec754b40d6a9cc92b827976782c615d8eab1c7f47f6b47510cbef585f4","meta-python/cdsl/instructions.py":"b0ddfd8fd22889bd1e610c103d47087c9c6ae5882862ed44921dafc2ae0463a0","meta-python/cdsl/isa.py":"dc530a4dd5642e3379398dfc8a90ad6ae1692302de63851370bdfa8abf4cdce0","meta-python/cdsl/operands.py":"e24914eae4059b88781bf5a5d7a14ecf98b10a701ed6cf6e88d15981b2ccbfdf","meta-python/cdsl/predicates.py":"fe2dc6e78ff6d4bcb6b1d5448ded343ede0f03b96a965a11aef0f5bbe7bb8f56","meta-python/cdsl/registers.py":"939dafd1b8976a6cd456c9a5e4b374af81fafb9da979ea3a1f6d14e4645914a6","meta-python/cdsl/settings.py":"a859bd006e13b245ff906977512cd4822c3b22601ed17e87ce0618503172809f","meta-python/cdsl/test_ast.py":"947e934e2862445a158bf266dff58a8c88aae31fb34a7f823309ee58a15c5393","meta-python/cdsl/test_package.py":"ffa53d20e023ecb89137294bb13614f4de9b09e1bf05d9772131570bf78f7987","meta-python/cdsl/test_ti.py":"04656e2da99ec37875f91172bb2fa423da1ee27bf523a4d41af311ea22492d1b","meta-python/cdsl/test_typevar.py":"768bf3c35481950264ad6fd7059a532ac62b121ac439983bb4fe1ae76a1d1248","meta-python/cdsl/test_xform.py":"ddb6633c7941bbf68570701cb887a81d6b4b27f4bc45eabccf2ce287ad9b77e9","meta-python/cdsl/ti.py":"566e91f0bb3ebacd5abf9f5a663caee69706c2e829dee1ed735d229198689f76","meta-python/cdsl/types.py":"adee4bbc1a9478288fa4b53ee1edeb5ee3296dba2c70bfbe01e923895064999e","meta-python/cdsl/typevar.py":"b5669934eddaf5b9cc0c27b966e2566b5f669f1c5a345f005960930fb499097e","meta-python/cdsl/xform.py":"bf200b711570b905f0fb30611ba64f131f98593060eedbe5575054cca4928593","meta-python/check.sh":"707cda14534882e8d4593f93c056390560394c9bc8a687e99f10a56d7b09cb92","meta-python/constant_hash.py":"c752e6dadf3a9a5bd00c978e85ab27a20c49138a1ccdc6fc9a1904797a4bfe48","meta-python/gen_binemit.py":"76472fb199a330b934ba9ad0a1bbacfb52f0eae7c9a66d83f0d7890970323a2d","meta-python/gen_build_deps.py":"16cb0968ecb1b0c85d450fe6f46a684de55168a12be29a9bf4aedb7d58ca6188","meta-python/gen_encoding.py":"471c5f4ecf24a2a173864c62a48920e5fbe1aacd2229b3eb4483637570bb26b2","meta-python/gen_instr.py":"154702c5e9e875561f73d330971bfc9985f0a8303b7afa290014ee830bad108f","meta-python/gen_legalizer.py":"4108393f261e8e0f0757709072eefcafc2f68aad290aff3e5bbf30e283e87968","meta-python/gen_settings.py":"f13e47335ae87b6381134b3d334f2fcbdfc03da92a8864dd1ff1c026408062a7","meta-python/isa/__init__.py":"e499c1206cd095a926fa0ca7eb9d0a50a802ed71c8eb7598e5d3a0f939c8ada5","meta-python/isa/arm32/__init__.py":"eecba73231aa398ded7304690bdba3450dc163afd4360f1b0ad02a28e2380363","meta-python/isa/arm32/defs.py":"01c41dbd7406c624e26229df6befa0992194bddcc7d11e8f6174abfe2b33bf61","meta-python/isa/arm32/registers.py":"c03ca6435828ad5f262049e42f1f71bcf74903831f85daa92c3f322a6c1050ea","meta-python/isa/arm32/settings.py":"afd5a04a9d029f578d6f62dc7c539191886cc9f9dea15d65fc66bf37a63b8814","meta-python/isa/arm64/__init__.py":"f6877253cf786d7ee972881e7d9b3c78c11e6b024e4e227487340dd01d0c44e4","meta-python/isa/arm64/defs.py":"797c5bb6d11fc7a44afe67476136dbd11c40f5e13a1c8f52f9f96be4441677b2","meta-python/isa/arm64/registers.py":"9bdd06edaa382be96042e1ac36d63137e73292292b61dcf4becb7d1428130317","meta-python/isa/arm64/settings.py":"f7b1f8733e775ea8005372ee35f1c2a627b3a69d722e837295599e4cf1f5eb43","meta-python/isa/riscv/__init__.py":"c11607c9eef0bc2707daa3edd4174e934c7a0dcc8ce90cee2c9292a85b1ac596","meta-python/isa/riscv/defs.py":"e73740055c4fb123c45453fc149a807e9720466de848022d5375049bdcfc311c","meta-python/isa/riscv/encodings.py":"ecaad5ea98273ade1cb10606354e893342c495bb48771df50121f789566d7be6","meta-python/isa/riscv/recipes.py":"3852e5b7aa6995fa721ba91744a0470343ce1834651e7b9cc97b5d69af7dfdc5","meta-python/isa/riscv/registers.py":"ef9aca3a6ec2b08ee8f5952186d232861b64a919b671b41911a365e7672b01bd","meta-python/isa/riscv/settings.py":"dfe29722d67be0620a70e08cfb802829a26f5fd339a9342a8ac2dd419daf8a85","meta-python/isa/x86/__init__.py":"ad579de68ea7bf5dc2bce0e3a6f09e7978b1697f1afec8a5ce5dc591136e590d","meta-python/isa/x86/defs.py":"b5eb7889b6f5e5b221ed3923d0137bbb1566c55b5961448cc39e4ea2f13cf4b7","meta-python/isa/x86/encodings.py":"3885bcb2558e754de812f8239b4b509a32a42bcb8d3158d0b8899b18f3d90ac5","meta-python/isa/x86/instructions.py":"530cde78e6b9f6e4ea2192985f4c5c77a987cdc19001d50fb47fa8e36a62f52e","meta-python/isa/x86/legalize.py":"1375ded072c29459e7c0e40ecb02f28d5395d9d8c603eb70e338b2bf2991c9cd","meta-python/isa/x86/recipes.py":"c9d7910cd4311ee4307460ca55070404e212727814664f2a2096b9b702ff7178","meta-python/isa/x86/registers.py":"ff934491d07ec6b51fbfd454b865a7c7c191ffbd31b1804615735266b120f4b2","meta-python/isa/x86/settings.py":"d779a768475cf00c2a8d3ddb5cd0a70ce34662e0ebb52ee26a7e1a495ec41aa2","meta-python/mypy.ini":"5ec2f7cc0bbc4fd0435643d6b72e715bd9568a3a0fe14c043f9e559c405b66fb","meta-python/semantics/__init__.py":"e8a25a111f2d9cc9fc7aa498a572a86403d31fe50a7ba59dd2e2560a17804e92","meta-python/semantics/elaborate.py":"3a3fbba83a6818c2d1ce236fd0413111380875a0307f7a5f4b5dd66d8ef714b1","meta-python/semantics/macros.py":"b218c52e1bd4f019dc14a27d315b4f3405a10e5bdc6f2523fe709c8faf91b418","meta-python/semantics/primitives.py":"4e5eb0c90fcc295686732c8c66ad7a793997645c9a676c97babf06823fd2b60d","meta-python/semantics/smtlib.py":"48ef80320f21682860bbf5f79f18739f1d10f0b1fe581ebb05541e90dc2f2f4f","meta-python/semantics/test_elaborate.py":"3a4c850a7385007422c7549661b211903cd1dd1606dad7a86262ae27e697bca6","meta-python/srcgen.py":"999557d683e808a2ca90688c489ec4aff65798f44ac321ecf7de34d307261913","meta-python/stubs/z3/__init__.pyi":"6aaeb80f783b29c4364dee21da45f6df041c0a4807189a15777ee5447f6515dc","meta-python/stubs/z3/z3core.pyi":"c01a41d468e07cc4f8b405c292ed7f8c82bc1077f8b82dfde1e474577ade3335","meta-python/stubs/z3/z3types.pyi":"30009c951af99b9028d47cd4cabae95ff9742b77b690bd8dd63f6b7dba580759","meta-python/test_constant_hash.py":"157cf4f8964e0f04c041ffd349e889ce565b144453436690578c5d03c3a60216","meta-python/test_gen_legalizer.py":"d7da85622f142d2d66d0b92660b6f04b1424788bac05e6fbe0e5822b54dec705","meta-python/test_srcgen.py":"d6d7775e19a5b2621360c00eb6d92dfcb4568e49220993e0ceaac9628dbfd661","meta-python/unique_table.py":"5bd500667430c15f6ae586603d8612fb3bda07b072e40d86286e08392bdc3127","src/abi.rs":"76ee030cf0780fe63ccbf855b1161f215e3e2991cb9abe71ca9aff25e5f1dbc2","src/binemit/memorysink.rs":"ad79459de45431b04f28a296074d3613e804538911fbfd451b68058218594574","src/binemit/mod.rs":"bfd83cb1e23e7b2f6926134e1e57548af240036128033f19e557f4d130133e87","src/binemit/relaxation.rs":"e632bbf91a9393a1f4a6248e3c80544bedfe6f5b655c38e6c4f3c38a5a0131e1","src/binemit/shrink.rs":"45434d5fb17804f5199f5fa80fd96aedaeac1ca3824766236eb16b6b529155b4","src/bitset.rs":"d57a79058a31b094b4bbe9d34876a5543286df1e08b5ceadfd05a9efc5a3b1ce","src/cfg_printer.rs":"69b4f16132c886ef0b883c8b78b59d041ceec3c8b96dd8015e990ac06733ce91","src/constant_hash.rs":"442c010f832191225c3d21815e99bd087cfd3367e5a8ffe6204e75f53bd355c9","src/context.rs":"ffd7d2324107a17bdf710a17e8acf54d58fdd92d7ba8fdd340c16655d5aa1d00","src/cursor.rs":"dcce946ad85d8fc2f1c9cc885ae8a0440c37d9e512606fb8a518aaffcc6d6f8f","src/dbg.rs":"1898d94cff0975815eb348651702e95c8f2f63886501d3b7043ee75668480472","src/dce.rs":"d8ab7c0cac0416f9d75afdacc60ba02e532361ec927c3f8bd171b1a53ec8b31a","src/divconst_magic_numbers.rs":"8d475dae5281805137134dd373ade91b3ee2a861028b7c1165cf9b17727aa45d","src/dominator_tree.rs":"7ee4114026011b11d49e48c5a9202970bafe3b22c2074f7c1390b98ebb2edb7a","src/flowgraph.rs":"bf520026c32c5454554d0b078b64a78bd44f3c0f4f198eddf71bcfd78cc963a3","src/fx.rs":"8a5d07487906d8316a179e826fcd817a92a4860686256a6fd9d78ba47c63f330","src/ir/builder.rs":"998395a38e47aa12790ac9db90749a2bce7776370733899cf1db3a1697959fd5","src/ir/condcodes.rs":"5247c8d849e1372d2a22379c33a4a88226ec6187be18ca6f2c4e0f315d812aa8","src/ir/dfg.rs":"50a3a7c44b6a993f033a65682beaeae12d5ed78ff67d7ac5e205e645ef8e122f","src/ir/entities.rs":"8bae1166b59afd38953e7d9154ae141c979ab77153b9512f45db7b82a256fdf4","src/ir/extfunc.rs":"9806734eeb480724481128d8c1de78a3b1f80f1214c20f24131196a0df137872","src/ir/extname.rs":"ed2c0b52cdaecc7f0ba9a894ef9fffe139e09b520e43dcd6f0c887a3d41a31ac","src/ir/function.rs":"907c4658865559c27fe4ee2f4064d0c64add712f2a190185236dba3cb98d4c32","src/ir/globalvalue.rs":"e129949d8edcb23a9887d4b6b41fc2b18373c153041a19d9c320973c14475aca","src/ir/heap.rs":"a59d3e5901412b53c0b53a8cdf10765ff5921de9c410ae9acea226c89827df3c","src/ir/immediates.rs":"1117d4f90b03887be55234577e3b75e4a3da1b8fd3d6b4137ebb4a1ec68d99b4","src/ir/instructions.rs":"ad705ea61f9549f57e2e4675bee153d5e6159d016c9f6fe814da073ff51b072b","src/ir/jumptable.rs":"7764abc9aa027a5a89d22059b360372bd9a19686887c5a7830f7637d6f188e1e","src/ir/layout.rs":"bb45eefde16ac9423f637dfcc2796ae7b955a97f38a55f23a19cc45da5decce1","src/ir/libcall.rs":"55fd77f6e32370812a271f4fd5d9817c03904733be79d49e17e2683fe516e30e","src/ir/memflags.rs":"dbcf3798ab66dc764b73fb7f139a621c54cc6bcc683f1f70a33ed7e8c3486bfd","src/ir/mod.rs":"ec1da8a8bd99a3dbbcea59e2c10aa60511488471930646ab293f47d428013224","src/ir/progpoint.rs":"49433f22bd6ff3a96ad0733ff612f3617b312e4492b6b663187141966f6aa701","src/ir/sourceloc.rs":"37ef5fd8cef1de99620797d7d5aba3630e737171853c8471495c685dafac19b6","src/ir/stackslot.rs":"2f54359339837bb1d0d817d3af21bb4b1b050c31703885dfaced29f6e41153c2","src/ir/table.rs":"dcc3b663a989b2b084402b08dc9a0e928dbd052e194a46a1886cc6f0cf1a5f2c","src/ir/trapcode.rs":"59e223193617b8c1043ddd3a907c6131f2987e8fe0965ebfd9f7c056c064b7c5","src/ir/types.rs":"b4cb5ab4e0981f23f188a17780d8936243b1531406147afec3ca929a98401649","src/ir/valueloc.rs":"4c676c2d21d75611ef922a230ee82846afb565ce0f55bc71e33c70e1a1d92a07","src/isa/arm32/abi.rs":"fc4ae5286491cf7e49ca1123264c083cc37ba95a130b07406f79a3a31a0dbe39","src/isa/arm32/binemit.rs":"52b2f4b3c6d8683ed6963c1f53907ac57b6aab7cc149464c9a12d6875aa3b5c6","src/isa/arm32/enc_tables.rs":"b5b7f2fdcaf1d1878a357c54ab757e94f0d06e5bd391ac5d876e96f5b30d6b7a","src/isa/arm32/mod.rs":"3256e671c2d622c3c25b6551c571c8c3008b5433bdbe0a90b3cb5a667319922b","src/isa/arm32/registers.rs":"254b568a02480f46bb4967a24a438390231014258f0c159f0a41dbafe8e66d56","src/isa/arm32/settings.rs":"205dbba8c4601b715e86558181d3f974ef8ff973ab9666a1435c5ccbfee86fb8","src/isa/arm64/abi.rs":"52353ed2e2133dacddaad70a876ecebb9c179c19b911ffa823b5b89d3ee7a17c","src/isa/arm64/binemit.rs":"4465cceb68d03ae4d0fdf188c9b86870fb57b3617d67f0bb7d476e5afb581e81","src/isa/arm64/enc_tables.rs":"8c829c544daeed9adc8458891614a0be6f149e775bd22651465f2c165d4a9e56","src/isa/arm64/mod.rs":"f9ca60e7407b69595cb4ef42103ed079e7bcb40546f11d944ddcfc6a04a7fd11","src/isa/arm64/registers.rs":"308cfcfd9ff2191d7656e7350bb36e41803664eb86ae490fb4b4d3549b25b6a2","src/isa/arm64/settings.rs":"830f2d9b2084599e402738c01c2c13cf178665066101751879fb21fed5943e6c","src/isa/call_conv.rs":"833ac811ff78ab8d3a5052165e76c51c6da7686020d95462c18074750fb790ed","src/isa/constraints.rs":"f2e2dee4308dabaab1071983d2edd9a9972a99c5c99edf919adbb4554b4eb067","src/isa/enc_tables.rs":"fb27a2a41b229d21acbc9082259c11999b2bedd13f2c756d10f22ce7a71af076","src/isa/encoding.rs":"7ea5b4400530172f96e263561682886ea6c67e706398d44a83933ef7f0ac98a5","src/isa/mod.rs":"7ee34b3247e3fc327e953d7c330c5c07218be99b5f4a9c29028c390b5439c4db","src/isa/registers.rs":"4a91d4888df5eeed1802f34c43a42b82aaf1f9928a58329b0cbc9c3c57c75485","src/isa/riscv/abi.rs":"36557b91ad16a1344c80fbb16a62b46eac88500d76cb9ebcd4eae224dd67b2de","src/isa/riscv/binemit.rs":"0bd76b005b53b71bdb59057a20671fbcd8ab1c37d767bfd4ab0a92d05e192d9a","src/isa/riscv/enc_tables.rs":"ab73c80fef6b1256fbd3c0e1bdd8e43a20f7d132a32236f6bfc028e9003adfe0","src/isa/riscv/mod.rs":"377dfc7dc9940d284b21bf3d2433916dd9c3df79cce172a2a75ef572dcafe98f","src/isa/riscv/registers.rs":"666c2abe1a93db5f1573d1603db6c13c37f3fc877c0c93b64d1b971921bfa950","src/isa/riscv/settings.rs":"06eadd71a84ad8eb106d3cd428a001b26c28a320b19b1bbe180ec5e493e09d32","src/isa/stack.rs":"d023c57feb944c94c4dc8b7138dcbc9d37ff18ca23c23d83e9bab3c88299ffa0","src/isa/x86/abi.rs":"2bf2bd320bca363dd8e57d3b5a60c33cd47b08118f31a7615ebf1f847ffe93d5","src/isa/x86/binemit.rs":"328f5803717e095abbda0d0a49a79b8f5250a6d16a739a5912ee0a71f276d9de","src/isa/x86/enc_tables.rs":"250ab677b2a316f9826495a0719f71f4b54b3c3c26d0bb42a76dd85b55a2f8e3","src/isa/x86/mod.rs":"15488d60a950aa4cb75afb63d42d4524e1fcea3b77c7c160e2cb862ec2236a92","src/isa/x86/registers.rs":"bed70bbe1f56f3ef03ea7cd1bea68eb911913cb4c8b93167e044dfc639f7f461","src/isa/x86/settings.rs":"5c192faab2467e36b06bbf2b1edd2e2c810f328068398febd8935ee46ccdc5a9","src/iterators.rs":"f85f52d3fa707a0eb974c92215b3e976923ce8f9481219f7812e0f2869c2bd37","src/legalizer/boundary.rs":"435707e84b5e406843238d27f5cc4886f4ae37e2c4d25a749e189a378b3af632","src/legalizer/call.rs":"6a82a9daeba5f452a7db0c47dcc43829b119b0652961bc2aa336b809c3f34ef1","src/legalizer/globalvalue.rs":"896f59dc5b8c4a5aee45e3f59211066f214d3ab9142865d80ad6610633363ac9","src/legalizer/heap.rs":"4caf9b5f98556364f16164613872c29a457dcbf44b07cc49fc415abbcd61ec6c","src/legalizer/libcall.rs":"6e58da5e1c2419192a3393debc6e9714df9728e59e1740ff569e8a9c0daa40d5","src/legalizer/mod.rs":"fc70c12f7d86ab40d1d8b20cc1c888120cdabc7ca34314e965c30216877aacab","src/legalizer/split.rs":"f867daab5a4ec1549134cceb2d7223e901d87a052a8a3d70d7d8372b56716b1a","src/legalizer/table.rs":"d6e09f8340ca597fdb13f86021e5c53bd3161dc4258effc56c1f6d9be7b819ec","src/lib.rs":"12855b9aedb583859a89dd8f8a7e1ff6d6c9f68e938f60ff4d123aa3d98c2da5","src/licm.rs":"8193118dc09ada8bed5ba6c8d68dbf88fb7b0a2e268dd7b0139586b88a0408be","src/loop_analysis.rs":"58fc3cc0e700f05e3131ff1b16ff975d4f32a68c790f095d8445bd300356d3c0","src/nan_canonicalization.rs":"9619bb5554791bd1be75ecd98564d6c9f5b65132bc07c5c4d8c210cd79b66f82","src/partition_slice.rs":"bc13504e7658aab565918d965a0b67e941eb572e583870571bc6dbb2b9aad272","src/postopt.rs":"daadbf95ec5a2907fe40d8586364d7ee981732936992e7b6d0cae5a03e66f836","src/predicates.rs":"4b2e2083e5ed63608a67d0223690ebce66761727ea8954ab5b1fa4c8feb6d58c","src/print_errors.rs":"0955151433563b4c305c78b9a8f192c5fe0556ac2528a5ede3b2fd4d143eb743","src/ref_slice.rs":"421a61323c11858a596d50220487f399e1bcedeff0e8d1b716dd4b3531eb01a5","src/regalloc/affinity.rs":"66ee6b9789ec207393c318b14177e1439a54f197b13ebefdb0c4ab77acf38c00","src/regalloc/coalescing.rs":"1426db3ee18469232678ee6975585533772fa9291c5be3cf463437b8184c591e","src/regalloc/coloring.rs":"72bef8b5e3425c805d62cf2329acd29510f1be0886ee73308b69938cf2de203f","src/regalloc/context.rs":"a7da41171ad73cd541977657f0af0d5308567fff140fa7eb7ee44e03c62d8c96","src/regalloc/diversion.rs":"d46d733f6d00a8f536d5c7c8b8fc6f348c3d0605dd0ee77e1d8359367ba53347","src/regalloc/live_value_tracker.rs":"28823003dc72e8a4702776a8ab5ffd878712700a272b64376b0de2022e0ee31a","src/regalloc/liveness.rs":"cc904b813a8a2fc819f0cd5ffacb5a4b82f29ae3ae6a34cccc01fc47c20d150f","src/regalloc/liverange.rs":"7a28454e5f70d570db439b966a01ead759b65eb65c5845f9c58bf2f230a5f2ab","src/regalloc/mod.rs":"6254df639f9289fd578e01b7dca99bc9c9e3c6680c6d031405e8df8d0cff31ad","src/regalloc/pressure.rs":"c6509578a90c5e4ecc2e5697aa7caf7511e7f44410a469544cb1d26cd444286e","src/regalloc/register_set.rs":"bc58f93f22f0adbe43260fe20c6089be1fca64f5bcc4acff85dc0a5ec5b61937","src/regalloc/reload.rs":"4dd64aacc97fda5e950222df37df20bf2281cfbca93d1945f3a4f25e4b867aac","src/regalloc/solver.rs":"c14a76599945d91cdfa2fa6b940614a0e62e33294c2bce8956e7ad2f4bb6b556","src/regalloc/spilling.rs":"00b5def89c310b1756826f497aa53c050757dd1d5c5fe490f7aff85f7cb94fcf","src/regalloc/virtregs.rs":"e5c8da6860ba9495f9396621530347e1dd6fc5b2fae2eb23c171ea77429356f1","src/result.rs":"c10354d615f93caa446c3c8c49d6ba3af762816af470f9c4accf04315cce9753","src/scoped_hash_map.rs":"5afafb3a4039094c3a2aad1582354220d21f399aa50046e7f4a1259e1976597e","src/settings.rs":"60b112284d91adf22be95b0b40884ce2ed46394ccf9bdae339888ab06449e6ca","src/simple_gvn.rs":"c8feb380d4831badc59aa1e65efeafa6702711585817fe5f6b31de6b265fac24","src/simple_preopt.rs":"3a576a993312be6a9119fb3180f609988f606f837c4430878e8becca078935ce","src/stack_layout.rs":"c5de271e296fc424f1a30017620bc88500369c8e553fef6e95beccb9c6640e7c","src/timing.rs":"7328f12bad7767cd3a30cfa361ed40baeae5a7977c1e0592df896809488bb020","src/topo_order.rs":"b01ed68a7300691f41ac434e58a5267b10a8b4a7056d65035e24aa8a6722122a","src/unreachable_code.rs":"40cc71a02887ee4065c76ce96dda0a363a8cc134ec784fe5ed1f276db76596ce","src/verifier/cssa.rs":"e3e1d77b763c0ba82d3b59ab5b4667fd3152d5a08be50b58b0c82f86376bb062","src/verifier/flags.rs":"f4ba0e0c13fd643bdbec6466219a25a33993a6e170debb48497a859d9f79d914","src/verifier/liveness.rs":"2631037bafa88659bc47d2174e261f5acb1702ca522722a597fa28e474994d79","src/verifier/locations.rs":"9623bbc2d2f86f36893eebe60330fd51b99c9f9c8e5162c61cc89ab221e75b5a","src/verifier/mod.rs":"21e92c6b84d885882360794528afb33c828b7a232abab43d0a49a0f0bb3e0043","src/write.rs":"24b5caa5fa9145f8da78b9ef2342f52a05d04318b3b03f5b8bb1d486a3d46041"},"package":"4ce2e412970cfda0fa11806758d79a46c02b8fa1b91c35a8d3e2b4c947ce0c35"}
\ No newline at end of file
--- a/third_party/rust/cranelift-codegen/Cargo.toml
+++ b/third_party/rust/cranelift-codegen/Cargo.toml
@@ -6,57 +6,58 @@
 # to registry (e.g. crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
+edition = "2018"
 name = "cranelift-codegen"
-version = "0.26.0"
+version = "0.28.0"
 authors = ["The Cranelift Project Developers"]
 build = "build.rs"
 description = "Low-level code generator library"
 documentation = "https://cranelift.readthedocs.io/"
 readme = "README.md"
 keywords = ["compile", "compiler", "jit"]
 categories = ["no-std"]
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/CraneStation/cranelift"
 [dependencies.cranelift-bforest]
-version = "0.26.0"
+version = "0.28.0"
 default-features = false
 
 [dependencies.cranelift-entity]
-version = "0.26.0"
+version = "0.28.0"
 default-features = false
 
 [dependencies.failure]
 version = "0.1.1"
 features = ["derive"]
 default-features = false
 
 [dependencies.failure_derive]
 version = "0.1.1"
 default-features = false
 
 [dependencies.hashmap_core]
 version = "0.1.9"
 optional = true
 
 [dependencies.log]
-version = "0.4.4"
+version = "0.4.6"
 default-features = false
 
 [dependencies.target-lexicon]
 version = "0.2.0"
 default-features = false
 [build-dependencies.cranelift-codegen-meta]
-version = "0.26.0"
+version = "0.28.0"
 
 [features]
 core = ["hashmap_core"]
 default = ["std"]
 std = ["cranelift-entity/std", "cranelift-bforest/std", "target-lexicon/std"]
 testing_hooks = []
 [badges.maintenance]
 status = "experimental"
--- a/third_party/rust/cranelift-codegen/build.rs
+++ b/third_party/rust/cranelift-codegen/build.rs
@@ -13,19 +13,19 @@
 //
 // CRANELIFT_TARGETS (Optional)
 //     A setting for conditional compilation of isa targets. Possible values can be "native" or
 //     known isa targets separated by ','.
 //
 // The build script expects to be run from the directory where this build.rs file lives. The
 // current directory is used to find the sources.
 
-extern crate cranelift_codegen_meta as meta;
+use cranelift_codegen_meta as meta;
 
-use meta::isa::Isa;
+use crate::meta::isa::Isa;
 use std::env;
 use std::process;
 use std::time::Instant;
 
 fn main() {
     let start_time = Instant::now();
 
     let out_dir = env::var("OUT_DIR").expect("The OUT_DIR environment variable must be set");
--- a/third_party/rust/cranelift-codegen/meta-python/base/legalize.py
+++ b/third_party/rust/cranelift-codegen/meta-python/base/legalize.py
@@ -495,17 +495,17 @@ for inst_imm,      inst in [
         (iadd_imm, iadd),
         (imul_imm, imul),
         (sdiv_imm, sdiv),
         (udiv_imm, udiv),
         (srem_imm, srem),
         (urem_imm, urem),
         (band_imm, band),
         (bor_imm, bor),
-        (bxor_imm, bor),
+        (bxor_imm, bxor),
         (ifcmp_imm, ifcmp)]:
     expand.legalize(
             a << inst_imm(x, y),
             Rtl(
                 a1 << iconst(y),
                 a << inst(x, a1)
             ))
 expand.legalize(
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/__init__.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/__init__.py
@@ -1,13 +1,13 @@
 """
 Cranelift DSL classes.
 
 This module defines the classes that are used to define Cranelift instructions
-and other entitties.
+and other entities.
 """
 from __future__ import absolute_import
 import re
 
 
 camel_re = re.compile('(^|_)([a-z])')
 
 
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/ast.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/ast.py
@@ -1,13 +1,13 @@
 """
 Abstract syntax trees.
 
 This module defines classes that can be used to create abstract syntax trees
-for patern matching an rewriting of cranelift instructions.
+for pattern matching an rewriting of cranelift instructions.
 """
 from __future__ import absolute_import
 from . import instructions
 from .typevar import TypeVar
 from .predicates import IsEqual, And, TypePredicate, CtrlTypePredicate
 
 try:
     from typing import Union, Tuple, Sequence, TYPE_CHECKING, Dict, List  # noqa
@@ -74,17 +74,17 @@ class Def(object):
         else:
             return "({}) << {!s}".format(
                     ', '.join(map(str, self.defs)), self.expr)
 
     def copy(self, m):
         # type: (VarAtomMap) -> Def
         """
         Return a copy of this Def with vars replaced with fresh variables,
-        in accordance with the map m. Update m as neccessary.
+        in accordance with the map m. Update m as necessary.
         """
         new_expr = self.expr.copy(m)
         new_defs = []  # type: List[Var]
         for v in self.defs:
             new_v = replace_var(v, m)
             assert(isinstance(new_v, Var))
             new_defs.append(new_v)
 
@@ -418,17 +418,17 @@ class Apply(Expr):
                 pred = And.combine(pred, type_chk)
 
         return pred
 
     def copy(self, m):
         # type: (VarAtomMap) -> Apply
         """
         Return a copy of this Expr with vars replaced with fresh variables,
-        in accordance with the map m. Update m as neccessary.
+        in accordance with the map m. Update m as necessary.
         """
         return Apply(self.inst, tuple(map(lambda e: replace_var(e, m),
                                           self.args)))
 
     def vars(self):
         # type: () -> Set[Var]
         """Return the set of all Vars in self that correspond to SSA values"""
         res = set()
@@ -436,17 +436,17 @@ class Apply(Expr):
             arg = self.args[i]
             assert isinstance(arg, Var)
             res.add(arg)
         return res
 
     def substitution(self, other, s):
         # type: (Apply, VarAtomMap) -> Optional[VarAtomMap]
         """
-        If there is a substituion from Var->Atom that converts self to other,
+        If there is a substitution from Var->Atom that converts self to other,
         return it, otherwise return None. Note that this is strictly weaker
         than unification (see TestXForm.test_subst_enum_bad_var_const for
         example).
         """
         if self.inst != other.inst:
             return None
 
         # Guaranteed by self.inst == other.inst
@@ -508,17 +508,17 @@ class Literal(Atom):
         return '{}.{}'.format(self.kind, self.value)
 
 
 class ConstantInt(Literal):
     """
     A value of an integer immediate operand.
 
     Immediate operands like `imm64` or `offset32` can be specified in AST
-    expressions using the call syntax: `imm64(5)` which greates a `ConstantInt`
+    expressions using the call syntax: `imm64(5)` which creates a `ConstantInt`
     node.
     """
 
     def __init__(self, kind, value):
         # type: (ImmediateKind, int) -> None
         super(ConstantInt, self).__init__(kind, value)
 
     def __str__(self):
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/predicates.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/predicates.py
@@ -239,17 +239,18 @@ class FieldPredicate(object):
 
     def rust_predicate(self, prec):
         # type: (int) -> str
         """
         Return a string of Rust code that evaluates this predicate.
         """
         # Prepend `field` to the predicate function arguments.
         args = (self.field.rust_name(),) + tuple(map(str, self.args))
-        return '::predicates::{}({})'.format(self.function, ', '.join(args))
+        return 'crate::predicates::{}({})'\
+            .format(self.function, ', '.join(args))
 
 
 class IsEqual(FieldPredicate):
     """
     Instruction predicate that checks if an immediate instruction format field
     is equal to a constant value.
 
     :param field: `FormatField` to be checked.
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/test_ti.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/test_ti.py
@@ -497,17 +497,17 @@ class TestXForm(TypeCheckingBaseTest):
             # There should be only one possible concrete typing.
             if (len(xform.ti.free_typevars()) == 0):
                 assert len(concrete_typings_list) == 1
                 continue
 
             # For any patterns where the type env includes constraints, at
             # least one of the "theoretically possible" concrete typings must
             # be prevented by the constraints. (i.e. we are not emitting
-            # unneccessary constraints).
+            # unnecessary constraints).
             # We check that by asserting that the number of concrete typings is
             # less than the number of all possible free typevar assignments
             if (len(xform.ti.constraints) > 0):
                 theoretical_num_typings =\
                     reduce(lambda x, y:    x*y,
                            [tv.get_typeset().size()
                             for tv in xform.ti.free_typevars()], 1)
                 assert len(concrete_typings_list) < theoretical_num_typings
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/test_typevar.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/test_typevar.py
@@ -228,17 +228,17 @@ class TestTypeVar(TestCase):
             full_ts = TypeSet(lanes=True, floats=True, ints=True, bools=True)
             ts1 = reduce(lambda ts, func:   ts.image(func), i1, full_ts)
             ts2 = reduce(lambda ts, func:   ts.image(func), i2, full_ts)
 
             # Compute intersection
             intersect = ts1.copy()
             intersect &= ts2
 
-            # Propagate instersections backward
+            # Propagate intersections backward
             ts1_src = reduce(lambda ts, func:   ts.preimage(func),
                              reversed(i1),
                              intersect)
             ts2_src = reduce(lambda ts, func:   ts.preimage(func),
                              reversed(i2),
                              intersect)
 
             # If the intersection or its propagated forms are empty, then these
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/ti.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/ti.py
@@ -271,17 +271,17 @@ class SameWidth(TypeConstraint):
         typ1 = self.tv1.singleton_type()
         typ2 = self.tv2.singleton_type()
 
         return (typ1.width() == typ2.width())
 
 
 class TypeEnv(object):
     """
-    Class encapsulating the neccessary book keeping for type inference.
+    Class encapsulating the necessary book keeping for type inference.
         :attribute type_map: dict holding the equivalence relations between tvs
         :attribute constraints: a list of accumulated constraints - tuples
                             (tv1, tv2)) where tv1 and tv2 are equal
         :attribute ranks: dictionary recording the (optional) ranks for tvs.
                           'rank' is a partial ordering on TVs based on their
                           origin. See comments in rank() and register().
         :attribute vars: a set containing all known Vars
         :attribute idx: counter used to get fresh ids
@@ -326,17 +326,17 @@ class TypeEnv(object):
             tv = TypeVar.derived(self[tv.base], tv.derived_func)
         return tv
 
     def equivalent(self, tv1, tv2):
         # type: (TypeVar, TypeVar) -> None
         """
         Record a that the free tv1 is part of the same equivalence class as
         tv2. The canonical representative of the merged class is tv2's
-        cannonical representative.
+        canonical representative.
         """
         assert not tv1.is_derived
         assert self[tv1] == tv1
 
         # Make sure we don't create cycles
         if tv2.is_derived:
             assert self[tv2.base] != tv1
 
@@ -371,17 +371,17 @@ class TypeEnv(object):
     def rank(self, tv):
         # type: (TypeVar) -> int
         """
         Get the rank of tv in the partial order. TVs directly associated with a
         Var get their rank from the Var (see register()). Internally generated
         non-derived TVs implicitly get the lowest rank (0). Derived variables
         get their rank from their free typevar. Singletons have the highest
         rank. TVs associated with vars in a source pattern have a higher rank
-        than TVs associted with temporary vars.
+        than TVs associated with temporary vars.
         """
         default_rank = TypeEnv.RANK_INTERNAL if tv.singleton_type() is None \
             else TypeEnv.RANK_SINGLETON
 
         if tv.is_derived:
             tv = tv.free_typevar()
 
         return self.ranks.get(tv, default_rank)
@@ -832,17 +832,17 @@ def ti_def(definition, typ):
         actual_tvs.append(v.get_typevar())
 
     # Make sure we unify the control typevar first.
     if inst.is_polymorphic:
         idx = fresh_formal_tvs.index(m[inst.ctrl_typevar])
         fresh_formal_tvs = move_first(fresh_formal_tvs, idx)
         actual_tvs = move_first(actual_tvs, idx)
 
-    # Unify each actual typevar with the correpsonding fresh formal tv
+    # Unify each actual typevar with the corresponding fresh formal tv
     for (actual_tv, formal_tv) in zip(actual_tvs, fresh_formal_tvs):
         typ_or_err = unify(actual_tv, formal_tv, typ)
         err = get_error(typ_or_err)
         if (err):
             return "fail ti on {} <: {}: ".format(actual_tv, formal_tv) + err
 
         typ = get_type_env(typ_or_err)
 
--- a/third_party/rust/cranelift-codegen/meta-python/cdsl/xform.py
+++ b/third_party/rust/cranelift-codegen/meta-python/cdsl/xform.py
@@ -46,17 +46,17 @@ class Rtl(object):
     def __init__(self, *args):
         # type: (*DefApply) -> None
         self.rtl = tuple(map(canonicalize_defapply, args))
 
     def copy(self, m):
         # type: (VarAtomMap) -> Rtl
         """
         Return a copy of this rtl with all Vars substituted with copies or
-        according to m. Update m as neccessary.
+        according to m. Update m as necessary.
         """
         return Rtl(*[d.copy(m) for d in self.rtl])
 
     def vars(self):
         # type: () -> Set[Var]
         """Return the set of all Vars in self that correspond to SSA values"""
         return reduce(lambda x, y:  x.union(y),
                       [d.vars() for d in self.rtl],
@@ -389,17 +389,17 @@ class XFormGroup(object):
         """
         Get the Rust name of this function implementing this transform.
         """
         if self.isa:
             # This is a function in the same module as the LEGALIZE_ACTION
             # table referring to it.
             return self.name
         else:
-            return '::legalizer::{}'.format(self.name)
+            return 'crate::legalizer::{}'.format(self.name)
 
     def legalize(self, src, dst):
         # type: (Union[Def, Apply], Rtl) -> None
         """
         Add a legalization pattern to this group.
 
         :param src: Single `Def` or `Apply` to be legalized.
         :param dst: `Rtl` list of replacement instructions.
--- a/third_party/rust/cranelift-codegen/meta-python/gen_build_deps.py
+++ b/third_party/rust/cranelift-codegen/meta-python/gen_build_deps.py
@@ -17,27 +17,16 @@ import os
 from os.path import dirname, abspath, join
 
 try:
     from typing import Iterable  # noqa
 except ImportError:
     pass
 
 
-def source_files(top):
-    # type: (str) -> Iterable[str]
-    """
-    Recursively find all interesting source files and directories in the
-    directory tree starting at top. Yield a path to each file.
-    """
-    for (dirpath, dirnames, filenames) in os.walk(top):
-        yield dirpath
-        for f in filenames:
-            if f.endswith('.py'):
-                yield join(dirpath, f)
-
-
 def generate():
     # type: () -> None
     print("Dependencies from meta language directory:")
     meta = dirname(abspath(__file__))
-    for path in source_files(meta):
-        print("cargo:rerun-if-changed=" + path)
+    for (dirpath, _, filenames) in os.walk(meta):
+        for f in filenames:
+            if f.endswith('.py'):
+                print("cargo:rerun-if-changed=" + join(dirpath, f))
--- a/third_party/rust/cranelift-codegen/meta-python/gen_encoding.py
+++ b/third_party/rust/cranelift-codegen/meta-python/gen_encoding.py
@@ -105,17 +105,17 @@ def emit_instp(instp, fmt, has_func=Fals
         if isinstance(p, FieldPredicate):
             fnames.add(p.field.rust_destructuring_name())
         else:
             assert isinstance(p, TypePredicate)
             has_type_check = True
     fields = ', '.join(sorted(fnames))
 
     with fmt.indented(
-            'if let ir::InstructionData::{} {{ {}, .. }} = *inst {{'
+            'if let crate::ir::InstructionData::{} {{ {}, .. }} = *inst {{'
             .format(iform.name, fields), '}'):
         if has_type_check:
             # We could implement this if we need to.
             assert has_func, "Recipe predicates can't check type variables."
             fmt.line('let args = inst.arguments(&func.dfg.value_lists);')
         elif has_func:
             # Silence dead argument warning.
             fmt.line('let _ = func;')
@@ -127,17 +127,18 @@ def emit_inst_predicates(instps, fmt):
     # type: (OrderedDict[PredNode, int], srcgen.Formatter) -> None
     """
     Emit private functions for matching instruction predicates as well as a
     static `INST_PREDICATES` array indexed by predicate number.
     """
     for instp, number in instps.items():
         name = 'inst_predicate_{}'.format(number)
         with fmt.indented(
-                'fn {}(func: &ir::Function, inst: &ir::InstructionData)'
+                'fn {}(func: &crate::ir::Function, '
+                'inst: &crate::ir::InstructionData)'
                 '-> bool {{'.format(name), '}'):
             emit_instp(instp, fmt, has_func=True)
 
     # Generate the static table.
     with fmt.indented(
             'pub static INST_PREDICATES: [InstPredicate; {}] = ['
             .format(len(instps)), '];'):
         for instp, number in instps.items():
@@ -163,17 +164,17 @@ def emit_recipe_predicates(isa, fmt):
         if p is None or p in pname:
             continue
         name = 'recipe_predicate_{}'.format(rcp.name.lower())
         pname[p] = name
         isap, instp = p
 
         # Generate the predicate function.
         with fmt.indented(
-                'fn {}({}: ::settings::PredicateView, '
+                'fn {}({}: crate::settings::PredicateView, '
                 '{}: &ir::InstructionData) -> bool {{'
                 .format(
                     name,
                     'isap' if isap else '_',
                     'inst' if instp else '_'), '}'):
             if isap:
                 n = isa.settings.predicate_number[isap]
                 with fmt.indented('if !isap.test({}) {{'.format(n), '}'):
@@ -652,17 +653,18 @@ def emit_level2_hashtables(level2_hashta
             '];'):
         for offset, entry in enumerate(level2_hashtables):
             if offset in level2_doc:
                 for doc in level2_doc[offset]:
                     fmt.comment(doc)
             if entry:
                 fmt.line(
                         'Level2Entry ' +
-                        '{{ opcode: Some(ir::Opcode::{}), offset: {:#08x} }},'
+                        '{{ opcode: Some(crate::ir::Opcode::{}), '
+                        'offset: {:#08x} }},'
                         .format(entry.inst.camel_name, entry.offset))
             else:
                 fmt.line(
                         'Level2Entry ' +
                         '{ opcode: None, offset: 0 },')
 
 
 def emit_level1_hashtable(cpumode, level1, offt, fmt):
@@ -677,25 +679,25 @@ def emit_level1_hashtable(cpumode, level
 
     with fmt.indented(
             'pub static LEVEL1_{}: [Level1Entry<{}>; {}] = ['
             .format(cpumode.name.upper(), offt, len(hash_table)), '];'):
         for level2 in hash_table:
             # Empty hash table entry. Include the default legalization action.
             if not level2:
                 fmt.format(
-                        'Level1Entry {{ ty: ir::types::INVALID, log2len: !0, '
-                        'offset: 0, legalize: {} }},',
+                        'Level1Entry {{ ty: crate::ir::types::INVALID, '
+                        'log2len: !0, offset: 0, legalize: {} }},',
                         level1.legalize_code)
                 continue
 
             if level2.ty is not None:
                 tyname = level2.ty.rust_name()
             else:
-                tyname = 'ir::types::INVALID'
+                tyname = 'crate::ir::types::INVALID'
 
             lcode = cpumode.isa.legalize_code(level2.legalize)
 
             # Empty level 2 table: Only a specialized legalization action, no
             # actual table.
             # Set an offset that is out of bounds, but make sure it doesn't
             # overflow its type when adding `1<<log2len`.
             if level2.is_empty():
--- a/third_party/rust/cranelift-codegen/meta-python/gen_instr.py
+++ b/third_party/rust/cranelift-codegen/meta-python/gen_instr.py
@@ -252,18 +252,18 @@ def gen_instruction_data_impl(fmt):
 
                 This operation requires a reference to a `ValueListPool` to
                 determine if the contents of any `ValueLists` are equal.
                 """)
         with fmt.indented(
                 'pub fn eq(&self, other: &Self, pool: &ir::ValueListPool)'
                 ' -> bool {',
                 '}'):
-            with fmt.indented('if ::std::mem::discriminant(self) != '
-                              '::std::mem::discriminant(other) {', '}'):
+            with fmt.indented('if ::core::mem::discriminant(self) != '
+                              '::core::mem::discriminant(other) {', '}'):
                 fmt.line('return false;')
             with fmt.indented('match (self, other) {', '}'):
                 for f in InstructionFormat.all_formats:
                     n = '&InstructionData::' + f.name
                     members = ['opcode']
                     if f.typevar_operand is None:
                         args_eq = None
                     elif f.has_value_list:
@@ -296,17 +296,17 @@ def gen_instruction_data_impl(fmt):
         fmt.doc_comment(
                 """
                 Hash an `InstructionData`.
 
                 This operation requires a reference to a `ValueListPool` to
                 hash the contents of any `ValueLists`.
                 """)
         with fmt.indented(
-                'pub fn hash<H: ::std::hash::Hasher>'
+                'pub fn hash<H: ::core::hash::Hasher>'
                 '(&self, state: &mut H, pool: &ir::ValueListPool) {',
                 '}'):
             with fmt.indented('match *self {', '}'):
                 for f in InstructionFormat.all_formats:
                     n = 'InstructionData::' + f.name
                     members = ['opcode']
                     if f.typevar_operand is None:
                         args = '&()'
@@ -318,23 +318,23 @@ def gen_instruction_data_impl(fmt):
                         args = 'arg'
                     else:
                         members.append('ref args')
                         args = 'args'
                     for field in f.imm_fields:
                         members.append(field.member)
                     pat = n + ' { ' + ', '.join(members) + ' }'
                     with fmt.indented(pat + ' => {', '}'):
-                        fmt.line('::std::hash::Hash::hash( '
-                                 '&::std::mem::discriminant(self), state);')
-                        fmt.line('::std::hash::Hash::hash(&opcode, state);')
+                        fmt.line('::core::hash::Hash::hash( '
+                                 '&::core::mem::discriminant(self), state);')
+                        fmt.line('::core::hash::Hash::hash(&opcode, state);')
                         for field in f.imm_fields:
-                            fmt.line('::std::hash::Hash::hash(&{}, state);'
+                            fmt.line('::core::hash::Hash::hash(&{}, state);'
                                      .format(field.member))
-                        fmt.line('::std::hash::Hash::hash({}, state);'
+                        fmt.line('::core::hash::Hash::hash({}, state);'
                                  .format(args))
 
 
 def collect_instr_groups(isas):
     # type: (Sequence[TargetISA]) -> List[InstructionGroup]
     seen = set()  # type: Set[InstructionGroup]
     groups = []
     for isa in isas:
@@ -656,17 +656,17 @@ def gen_inst_builder(inst, fmt):
     if inst.format.has_value_list:
         args = ['mut self']
     else:
         args = ['self']
 
     # The controlling type variable will be inferred from the input values if
     # possible. Otherwise, it is the first method argument.
     if inst.is_polymorphic and not inst.use_typevar_operand:
-        args.append('{}: ir::Type'.format(inst.ctrl_typevar.name))
+        args.append('{}: crate::ir::Type'.format(inst.ctrl_typevar.name))
 
     tmpl_types = list()  # type: List[str]
     into_args = list()  # type: List[str]
     for op in inst.ins:
         if isinstance(op.kind, ImmediateKind):
             t = 'T{}{}'.format(1 + len(tmpl_types), op.kind.name)
             tmpl_types.append('{}: Into<{}>'.format(t, op.kind.rust_type))
             into_args.append(op.name)
--- a/third_party/rust/cranelift-codegen/meta-python/gen_legalizer.py
+++ b/third_party/rust/cranelift-codegen/meta-python/gen_legalizer.py
@@ -27,20 +27,20 @@ try:
     from cdsl.ti import TypeConstraint # noqa
 except ImportError:
     pass
 
 
 def get_runtime_typechecks(xform):
     # type: (XForm) -> List[TypeConstraint]
     """
-    Given a XForm build a list of runtime type checks neccessary to determine
+    Given a XForm build a list of runtime type checks necessary to determine
     if it applies. We have 2 types of runtime checks:
         1) typevar tv belongs to typeset T - needed for free tvs whose
-               typeset is constrainted by their use in the dst pattern
+               typeset is constrained by their use in the dst pattern
 
         2) tv1 == tv2 where tv1 and tv2 are derived TVs - caused by unification
                 of non-bijective functions
     """
     check_l = []  # type: List[TypeConstraint]
 
     # 1) Perform ti only on the source RTL. Accumulate any free tvs that have a
     #    different inferred type in src, compared to the type inferred for both
@@ -98,29 +98,31 @@ def emit_runtime_typecheck(check, fmt, t
         this without panicking at runtime.
         """
         if not tv.is_derived:
             assert tv.name.startswith('typeof_')
             return "Some({})".format(tv.name)
 
         base_exp = build_derived_expr(tv.base)
         if (tv.derived_func == TypeVar.LANEOF):
-            return "{}.map(|t: ir::Type| t.lane_type())".format(base_exp)
+            return "{}.map(|t: crate::ir::Type| t.lane_type())"\
+                .format(base_exp)
         elif (tv.derived_func == TypeVar.ASBOOL):
-            return "{}.map(|t: ir::Type| t.as_bool())".format(base_exp)
+            return "{}.map(|t: crate::ir::Type| t.as_bool())".format(base_exp)
         elif (tv.derived_func == TypeVar.HALFWIDTH):
-            return "{}.and_then(|t: ir::Type| t.half_width())".format(base_exp)
+            return "{}.and_then(|t: crate::ir::Type| t.half_width())"\
+                .format(base_exp)
         elif (tv.derived_func == TypeVar.DOUBLEWIDTH):
-            return "{}.and_then(|t: ir::Type| t.double_width())"\
+            return "{}.and_then(|t: crate::ir::Type| t.double_width())"\
                 .format(base_exp)
         elif (tv.derived_func == TypeVar.HALFVECTOR):
-            return "{}.and_then(|t: ir::Type| t.half_vector())"\
+            return "{}.and_then(|t: crate::ir::Type| t.half_vector())"\
                 .format(base_exp)
         elif (tv.derived_func == TypeVar.DOUBLEVECTOR):
-            return "{}.and_then(|t: ir::Type| t.by(2))".format(base_exp)
+            return "{}.and_then(|t: crate::ir::Type| t.by(2))".format(base_exp)
         else:
             assert False, "Unknown derived function {}".format(tv.derived_func)
 
     if (isinstance(check, InTypeset)):
         assert not check.tv.is_derived
         tv = check.tv.name
         if check.ts not in type_sets.index:
             type_sets.add(check.ts)
@@ -169,17 +171,17 @@ def unwrap_inst(iref, node, fmt):
     expr = node.expr
     iform = expr.inst.format
     nvops = iform.num_value_operands
 
     # The tuple of locals to extract is the `Var` instances in `expr.args`.
     arg_names = tuple(
             arg.name if isinstance(arg, Var) else '_' for arg in expr.args)
     with fmt.indented(
-            'let ({}, predicate) = if let ir::InstructionData::{} {{'
+            'let ({}, predicate) = if let crate::ir::InstructionData::{} {{'
             .format(', '.join(map(str, arg_names)), iform.name), '};'):
         # Fields are encoded directly.
         for f in iform.imm_fields:
             fmt.line('{},'.format(f.member))
         if nvops == 1:
             fmt.line('arg,')
         elif iform.has_value_list or nvops > 1:
             fmt.line('ref args,')
@@ -354,23 +356,23 @@ def gen_xform(xform, fmt, type_sets):
         fmt.line('return true;')
 
 
 def gen_xform_group(xgrp, fmt, type_sets):
     # type: (XFormGroup, Formatter, UniqueTable) -> None
     fmt.doc_comment("Legalize `inst`.")
     fmt.line('#[allow(unused_variables,unused_assignments,non_snake_case)]')
     with fmt.indented('pub fn {}('.format(xgrp.name)):
-        fmt.line('inst: ir::Inst,')
-        fmt.line('func: &mut ir::Function,')
-        fmt.line('cfg: &mut ::flowgraph::ControlFlowGraph,')
-        fmt.line('isa: &::isa::TargetIsa,')
+        fmt.line('inst: crate::ir::Inst,')
+        fmt.line('func: &mut crate::ir::Function,')
+        fmt.line('cfg: &mut crate::flowgraph::ControlFlowGraph,')
+        fmt.line('isa: &crate::isa::TargetIsa,')
     with fmt.indented(') -> bool {', '}'):
-        fmt.line('use ir::InstBuilder;')
-        fmt.line('use cursor::{Cursor, FuncCursor};')
+        fmt.line('use crate::ir::InstBuilder;')
+        fmt.line('use crate::cursor::{Cursor, FuncCursor};')
         fmt.line('let mut pos = FuncCursor::new(func).at_inst(inst);')
         fmt.line('pos.use_srcloc(inst);')
 
         # Group the xforms by opcode so we can generate a big switch.
         # Preserve ordering.
         xforms = defaultdict(list)  # type: DefaultDict[str, List[XForm]]
         for xform in xgrp.xforms:
             inst = xform.src.rtl[0].expr.inst
--- a/third_party/rust/cranelift-codegen/meta-python/gen_settings.py
+++ b/third_party/rust/cranelift-codegen/meta-python/gen_settings.py
@@ -112,20 +112,20 @@ def gen_getters(sgrp, fmt):
     """
     Emit getter functions for all the settings in fmt.
     """
     fmt.doc_comment("User-defined settings.")
     fmt.line('#[allow(dead_code)]')
     with fmt.indented('impl Flags {', '}'):
         fmt.doc_comment('Get a view of the boolean predicates.')
         with fmt.indented(
-                'pub fn predicate_view(&self) -> ::settings::PredicateView {',
-                '}'):
+                'pub fn predicate_view(&self) -> '
+                'crate::settings::PredicateView {', '}'):
             fmt.format(
-                    '::settings::PredicateView::new(&self.bytes[{}..])',
+                    'crate::settings::PredicateView::new(&self.bytes[{}..])',
                     sgrp.boolean_offset)
         if sgrp.settings:
             fmt.doc_comment('Dynamic numbered predicate getter.')
             with fmt.indented(
                     'fn numbered_predicate(&self, p: usize) -> bool {', '}'):
                 fmt.line(
                         'self.bytes[{} + p / 8] & (1 << (p % 8)) != 0'
                         .format(sgrp.boolean_offset))
--- a/third_party/rust/cranelift-codegen/meta-python/isa/x86/recipes.py
+++ b/third_party/rust/cranelift-codegen/meta-python/isa/x86/recipes.py
@@ -1929,17 +1929,17 @@ t8jccd_long = TailRecipe(
 # The omission of a `when_prefixed` alternative is deliberate here.
 icscc = TailRecipe(
         'icscc', IntCompare, base_size=1 + 3, ins=(GPR, GPR), outs=ABCD,
         emit='''
         // Comparison instruction.
         PUT_OP(bits, rex2(in_reg0, in_reg1), sink);
         modrm_rr(in_reg0, in_reg1, sink);
         // `setCC` instruction, no REX.
-        use ir::condcodes::IntCC::*;
+        use crate::ir::condcodes::IntCC::*;
         let setcc = match cond {
             Equal => 0x94,
             NotEqual => 0x95,
             SignedLessThan => 0x9c,
             SignedGreaterThanOrEqual => 0x9d,
             SignedGreaterThan => 0x9f,
             SignedLessThanOrEqual => 0x9e,
             UnsignedLessThan => 0x92,
@@ -1957,17 +1957,17 @@ icscc_ib = TailRecipe(
         instp=IsSignedInt(IntCompareImm.imm, 8),
         emit='''
         // Comparison instruction.
         PUT_OP(bits, rex1(in_reg0), sink);
         modrm_r_bits(in_reg0, bits, sink);
         let imm: i64 = imm.into();
         sink.put1(imm as u8);
         // `setCC` instruction, no REX.
-        use ir::condcodes::IntCC::*;
+        use crate::ir::condcodes::IntCC::*;
         let setcc = match cond {
             Equal => 0x94,
             NotEqual => 0x95,
             SignedLessThan => 0x9c,
             SignedGreaterThanOrEqual => 0x9d,
             SignedGreaterThan => 0x9f,
             SignedLessThanOrEqual => 0x9e,
             UnsignedLessThan => 0x92,
@@ -1985,17 +1985,17 @@ icscc_id = TailRecipe(
         instp=IsSignedInt(IntCompareImm.imm, 32),
         emit='''
         // Comparison instruction.
         PUT_OP(bits, rex1(in_reg0), sink);
         modrm_r_bits(in_reg0, bits, sink);
         let imm: i64 = imm.into();
         sink.put4(imm as u32);
         // `setCC` instruction, no REX.
-        use ir::condcodes::IntCC::*;
+        use crate::ir::condcodes::IntCC::*;
         let setcc = match cond {
             Equal => 0x94,
             NotEqual => 0x95,
             SignedLessThan => 0x9c,
             SignedGreaterThanOrEqual => 0x9d,
             SignedGreaterThan => 0x9f,
             SignedLessThanOrEqual => 0x9e,
             UnsignedLessThan => 0x92,
@@ -2025,17 +2025,17 @@ icscc_id = TailRecipe(
 fcscc = TailRecipe(
         'fcscc', FloatCompare, base_size=1 + 3, ins=(FPR, FPR), outs=ABCD,
         instp=floatccs(FloatCompare),
         emit='''
         // Comparison instruction.
         PUT_OP(bits, rex2(in_reg1, in_reg0), sink);
         modrm_rr(in_reg1, in_reg0, sink);
         // `setCC` instruction, no REX.
-        use ir::condcodes::FloatCC::*;
+        use crate::ir::condcodes::FloatCC::*;
         let setcc = match cond {
             Ordered                    => 0x9b, // EQ|LT|GT => setnp (P=0)
             Unordered                  => 0x9a, // UN       => setp  (P=1)
             OrderedNotEqual            => 0x95, // LT|GT    => setne (Z=0),
             UnorderedOrEqual           => 0x94, // UN|EQ    => sete  (Z=1)
             GreaterThan                => 0x97, // GT       => seta  (C=0&Z=0)
             GreaterThanOrEqual         => 0x93, // GT|EQ    => setae (C=0)
             UnorderedOrLessThan        => 0x92, // UN|LT    => setb  (C=1)
--- a/third_party/rust/cranelift-codegen/meta-python/semantics/smtlib.py
+++ b/third_party/rust/cranelift-codegen/meta-python/semantics/smtlib.py
@@ -196,17 +196,17 @@ def equivalent(r1, r2, inp_m, out_m):
 
     # Build an expression for the equality of real Cranelift outputs of
     # r1 and r2
     results_eq_exp = []  # type: List[ExprRef]
     for (v1, v2) in out_m.items():
         assert isinstance(v2, Var)
         results_eq_exp.append(mk_eq(m1[v1], m2[v2]))
 
-    # Put the whole query toghether
+    # Put the whole query together
     return q1 + q2 + args_eq_exp + [Not(And(*results_eq_exp))]
 
 
 def xform_correct(x, typing):
     # type: (XForm, VarTyping) -> bool
     """
     Given an XForm x and a concrete variable typing for x check whether x is
     semantically preserving for the concrete typing.
--- a/third_party/rust/cranelift-codegen/meta-python/test_gen_legalizer.py
+++ b/third_party/rust/cranelift-codegen/meta-python/test_gen_legalizer.py
@@ -143,19 +143,19 @@ class TestRuntimeChecks(TestCase):
         # type: () -> None
         ts = TypeSet(lanes=(2, 256), ints=True, floats=True, bools=(8, 64))
         r = Rtl(
                 self.v0 << iconst(self.imm0),
                 self.v1 << icmp(intcc.eq, self.v2, self.v0),
                 self.v5 << vselect(self.v1, self.v3, self.v4),
         )
         x = XForm(r, r)
-        tv2_exp = 'Some({}).map(|t: ir::Type| t.as_bool())'\
+        tv2_exp = 'Some({}).map(|t: crate::ir::Type| t.as_bool())'\
             .format(self.v2.get_typevar().name)
-        tv3_exp = 'Some({}).map(|t: ir::Type| t.as_bool())'\
+        tv3_exp = 'Some({}).map(|t: crate::ir::Type| t.as_bool())'\
             .format(self.v3.get_typevar().name)
 
         self.check_yo_check(
             x, sequence(typeset_check(self.v3, ts),
                         equiv_check(tv2_exp, tv3_exp)))
 
     def test_reduce_extend(self):
         # type: () -> None
--- a/third_party/rust/cranelift-codegen/src/abi.rs
+++ b/third_party/rust/cranelift-codegen/src/abi.rs
@@ -1,15 +1,15 @@
 //! Common helper code for ABI lowering.
 //!
 //! This module provides functions and data structures that are useful for implementing the
 //! `TargetIsa::legalize_signature()` method.
 
-use ir::{AbiParam, ArgumentExtension, ArgumentLoc, Type};
-use std::cmp::Ordering;
+use crate::ir::{AbiParam, ArgumentExtension, ArgumentLoc, Type};
+use core::cmp::Ordering;
 use std::vec::Vec;
 
 /// Legalization action to perform on a single argument or return value when converting a
 /// signature.
 ///
 /// An argument may go through a sequence of legalization steps before it reaches the final
 /// `Assign` action.
 #[derive(Clone, Copy, Debug)]
@@ -177,18 +177,18 @@ pub fn legalize_abi_value(have: Type, ar
             }
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use ir::types;
-    use ir::AbiParam;
+    use crate::ir::types;
+    use crate::ir::AbiParam;
 
     #[test]
     fn legalize() {
         let mut arg = AbiParam::new(types::I32);
 
         assert_eq!(
             legalize_abi_value(types::I64X2, &arg),
             ValueConversion::VectorSplit
--- a/third_party/rust/cranelift-codegen/src/binemit/memorysink.rs
+++ b/third_party/rust/cranelift-codegen/src/binemit/memorysink.rs
@@ -10,18 +10,18 @@
 //!
 //! The `MemoryCodeSink` type fixes the performance problem because it is a type known to
 //! `TargetIsa` so it can specialize its machine code generation for the type. The trade-off is
 //! that a `MemoryCodeSink` will always write binary machine code to raw memory. It forwards any
 //! relocations to a `RelocSink` trait object. Relocations are less frequent than the
 //! `CodeSink::put*` methods, so the performance impact of the virtual callbacks is less severe.
 
 use super::{Addend, CodeOffset, CodeSink, Reloc};
-use ir::{ExternalName, JumpTable, SourceLoc, TrapCode};
-use std::ptr::write_unaligned;
+use crate::ir::{ExternalName, JumpTable, SourceLoc, TrapCode};
+use core::ptr::write_unaligned;
 
 /// A `CodeSink` that writes binary machine code directly into memory.
 ///
 /// A `MemoryCodeSink` object should be used when emitting a Cranelift IR function into executable
 /// memory. It writes machine code directly to a raw pointer without any bounds checking, so make
 /// sure to allocate enough memory for the whole function. The number of bytes required is returned
 /// by the `Context::compile()` function.
 ///
@@ -52,65 +52,65 @@ impl<'a> MemoryCodeSink<'a> {
             traps,
         }
     }
 }
 
 /// A trait for receiving relocations for code that is emitted directly into memory.
 pub trait RelocSink {
     /// Add a relocation referencing an EBB at the current offset.
-    fn reloc_ebb(&mut self, CodeOffset, Reloc, CodeOffset);
+    fn reloc_ebb(&mut self, _: CodeOffset, _: Reloc, _: CodeOffset);
 
     /// Add a relocation referencing an external symbol at the current offset.
-    fn reloc_external(&mut self, CodeOffset, Reloc, &ExternalName, Addend);
+    fn reloc_external(&mut self, _: CodeOffset, _: Reloc, _: &ExternalName, _: Addend);
 
     /// Add a relocation referencing a jump table.
-    fn reloc_jt(&mut self, CodeOffset, Reloc, JumpTable);
+    fn reloc_jt(&mut self, _: CodeOffset, _: Reloc, _: JumpTable);
 }
 
 /// A trait for receiving trap codes and offsets.
 ///
 /// If you don't need information about possible traps, you can use the
 /// [`NullTrapSink`](binemit/trait.TrapSink.html) implementation.
 pub trait TrapSink {
     /// Add trap information for a specific offset.
-    fn trap(&mut self, CodeOffset, SourceLoc, TrapCode);
+    fn trap(&mut self, _: CodeOffset, _: SourceLoc, _: TrapCode);
 }
 
 impl<'a> CodeSink for MemoryCodeSink<'a> {
     fn offset(&self) -> CodeOffset {
         self.offset as CodeOffset
     }
 
     fn put1(&mut self, x: u8) {
         unsafe {
             write_unaligned(self.data.offset(self.offset), x);
         }
         self.offset += 1;
     }
 
     fn put2(&mut self, x: u16) {
         unsafe {
-            #[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
+            #[cfg_attr(feature = "cargo-clippy", allow(clippy::cast_ptr_alignment))]
             write_unaligned(self.data.offset(self.offset) as *mut u16, x);
         }
         self.offset += 2;
     }
 
     fn put4(&mut self, x: u32) {
         unsafe {
-            #[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
+            #[cfg_attr(feature = "cargo-clippy", allow(clippy::cast_ptr_alignment))]
             write_unaligned(self.data.offset(self.offset) as *mut u32, x);
         }
         self.offset += 4;
     }
 
     fn put8(&mut self, x: u64) {
         unsafe {
-            #[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
+            #[cfg_attr(feature = "cargo-clippy", allow(clippy::cast_ptr_alignment))]
             write_unaligned(self.data.offset(self.offset) as *mut u64, x);
         }
         self.offset += 8;
     }
 
     fn reloc_ebb(&mut self, rel: Reloc, ebb_offset: CodeOffset) {
         let ofs = self.offset();
         self.relocs.reloc_ebb(ofs, rel, ebb_offset);
--- a/third_party/rust/cranelift-codegen/src/binemit/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/binemit/mod.rs
@@ -5,20 +5,20 @@
 
 mod memorysink;
 mod relaxation;
 mod shrink;
 
 pub use self::memorysink::{MemoryCodeSink, NullTrapSink, RelocSink, TrapSink};
 pub use self::relaxation::relax_branches;
 pub use self::shrink::shrink_instructions;
-pub use regalloc::RegDiversions;
+pub use crate::regalloc::RegDiversions;
 
-use ir::{ExternalName, Function, Inst, JumpTable, SourceLoc, TrapCode};
-use std::fmt;
+use crate::ir::{ExternalName, Function, Inst, JumpTable, SourceLoc, TrapCode};
+use core::fmt;
 
 /// Offset in bytes from the beginning of the function.
 ///
 /// Cranelift can be used as a cross compiler, so we don't want to use a type like `usize` which
 /// depends on the *host* platform, not the *target* platform.
 pub type CodeOffset = u32;
 
 /// Addend to add to the symbol value.
@@ -44,17 +44,17 @@ pub enum Reloc {
     /// Arm64 call target
     Arm64Call,
     /// RISC-V call target
     RiscvCall,
 }
 
 impl fmt::Display for Reloc {
     /// Display trait implementation drops the arch, since its used in contexts where the arch is
-    /// already unambigious, e.g. clif syntax with isa specified. In other contexts, use Debug.
+    /// already unambiguous, e.g. clif syntax with isa specified. In other contexts, use Debug.
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
             Reloc::Abs4 => write!(f, "Abs4"),
             Reloc::Abs8 => write!(f, "Abs8"),
             Reloc::X86PCRel4 => write!(f, "PCRel4"),
             Reloc::X86CallPCRel4 => write!(f, "CallPCRel4"),
             Reloc::X86CallPLTRel4 => write!(f, "CallPLTRel4"),
             Reloc::X86GOTPCRel4 => write!(f, "GOTPCRel4"),
@@ -67,38 +67,38 @@ impl fmt::Display for Reloc {
 ///
 /// A `CodeSink` will receive all of the machine code for a function. It also accepts relocations
 /// which are locations in the code section that need to be fixed up when linking.
 pub trait CodeSink {
     /// Get the current position.
     fn offset(&self) -> CodeOffset;
 
     /// Add 1 byte to the code section.
-    fn put1(&mut self, u8);
+    fn put1(&mut self, _: u8);
 
     /// Add 2 bytes to the code section.
-    fn put2(&mut self, u16);
+    fn put2(&mut self, _: u16);
 
     /// Add 4 bytes to the code section.
-    fn put4(&mut self, u32);
+    fn put4(&mut self, _: u32);
 
     /// Add 8 bytes to the code section.
-    fn put8(&mut self, u64);
+    fn put8(&mut self, _: u64);
 
     /// Add a relocation referencing an EBB at the current offset.
-    fn reloc_ebb(&mut self, Reloc, CodeOffset);
+    fn reloc_ebb(&mut self, _: Reloc, _: CodeOffset);
 
     /// Add a relocation referencing an external symbol plus the addend at the current offset.
-    fn reloc_external(&mut self, Reloc, &ExternalName, Addend);
+    fn reloc_external(&mut self, _: Reloc, _: &ExternalName, _: Addend);
 
     /// Add a relocation referencing a jump table.
-    fn reloc_jt(&mut self, Reloc, JumpTable);
+    fn reloc_jt(&mut self, _: Reloc, _: JumpTable);
 
     /// Add trap information for the current offset.
-    fn trap(&mut self, TrapCode, SourceLoc);
+    fn trap(&mut self, _: TrapCode, _: SourceLoc);
 
     /// Code output is complete, read-only data may follow.
     fn begin_rodata(&mut self);
 }
 
 /// Report a bad encoding error.
 #[cold]
 pub fn bad_encoding(func: &Function, inst: Inst) -> ! {
--- a/third_party/rust/cranelift-codegen/src/binemit/relaxation.rs
+++ b/third_party/rust/cranelift-codegen/src/binemit/relaxation.rs
@@ -22,24 +22,25 @@
 //! can be transformed into:
 //!
 //! ```clif
 //!     brnz v1, ebb23
 //!     jump ebb17
 //! ebb23:
 //! ```
 
-use binemit::CodeOffset;
-use cursor::{Cursor, FuncCursor};
-use ir::{Function, InstructionData, Opcode};
-use isa::{EncInfo, TargetIsa};
-use iterators::IteratorExtras;
-use regalloc::RegDiversions;
-use timing;
-use CodegenResult;
+use crate::binemit::CodeOffset;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::ir::{Function, InstructionData, Opcode};
+use crate::isa::{EncInfo, TargetIsa};
+use crate::iterators::IteratorExtras;
+use crate::regalloc::RegDiversions;
+use crate::timing;
+use crate::CodegenResult;
+use log::debug;
 
 /// Relax branches and compute the final layout of EBB headers in `func`.
 ///
 /// Fill in the `func.offsets` table so the function is ready for binary emission.
 pub fn relax_branches(func: &mut Function, isa: &TargetIsa) -> CodegenResult<CodeOffset> {
     let _tt = timing::relax_branches();
 
     let encinfo = isa.encoding_info();
--- a/third_party/rust/cranelift-codegen/src/binemit/shrink.rs
+++ b/third_party/rust/cranelift-codegen/src/binemit/shrink.rs
@@ -1,20 +1,21 @@
 //! Instruction shrinking.
 //!
 //! Sometimes there are multiple valid encodings for a given instruction. Cranelift often initially
 //! chooses the largest one, because this typically provides the register allocator the most
 //! flexibility. However, once register allocation is done, this is no longer important, and we
 //! can switch to smaller encodings when possible.
 
-use ir::instructions::InstructionData;
-use ir::Function;
-use isa::TargetIsa;
-use regalloc::RegDiversions;
-use timing;
+use crate::ir::instructions::InstructionData;
+use crate::ir::Function;
+use crate::isa::TargetIsa;
+use crate::regalloc::RegDiversions;
+use crate::timing;
+use log::debug;
 
 /// Pick the smallest valid encodings for instructions.
 pub fn shrink_instructions(func: &mut Function, isa: &TargetIsa) {
     let _tt = timing::shrink_instructions();
 
     let encinfo = isa.encoding_info();
     let mut divert = RegDiversions::new();
 
--- a/third_party/rust/cranelift-codegen/src/bitset.rs
+++ b/third_party/rust/cranelift-codegen/src/bitset.rs
@@ -1,18 +1,18 @@
 //! Small Bitset
 //!
 //! This module defines a struct `BitSet<T>` encapsulating a bitset built over the type T.
 //! T is intended to be a primitive unsigned type. Currently it can be any type between u8 and u32
 //!
 //! If you would like to add support for larger bitsets in the future, you need to change the trait
 //! bound Into<u32> and the u32 in the implementation of `max_bits()`.
-use std::convert::{From, Into};
-use std::mem::size_of;
-use std::ops::{Add, BitOr, Shl, Sub};
+use core::convert::{From, Into};
+use core::mem::size_of;
+use core::ops::{Add, BitOr, Shl, Sub};
 
 /// A small bitset built on a single primitive integer type
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub struct BitSet<T>(pub T);
 
 impl<T> BitSet<T>
 where
     T: Into<u32>
--- a/third_party/rust/cranelift-codegen/src/cfg_printer.rs
+++ b/third_party/rust/cranelift-codegen/src/cfg_printer.rs
@@ -1,15 +1,15 @@
 //! The `CFGPrinter` utility.
 
-use std::fmt::{Display, Formatter, Result, Write};
+use core::fmt::{Display, Formatter, Result, Write};
 
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::instructions::BranchInfo;
-use ir::Function;
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::instructions::BranchInfo;
+use crate::ir::Function;
 
 /// A utility for pretty-printing the CFG of a `Function`.
 pub struct CFGPrinter<'a> {
     func: &'a Function,
     cfg: ControlFlowGraph,
 }
 
 /// A utility for pretty-printing the CFG of a `Function`.
--- a/third_party/rust/cranelift-codegen/src/context.rs
+++ b/third_party/rust/cranelift-codegen/src/context.rs
@@ -4,38 +4,38 @@
 //! deallocating the data structures needed for compilation. The `Context` struct is used to hold
 //! on to memory allocations between function compilations.
 //!
 //! The context does not hold a `TargetIsa` instance which has to be provided as an argument
 //! instead. This is because an ISA instance is immutable and can be used by multiple compilation
 //! contexts concurrently. Typically, you would have one context per compilation thread and only a
 //! single ISA instance.
 
-use binemit::{
+use crate::binemit::{
     relax_branches, shrink_instructions, CodeOffset, MemoryCodeSink, RelocSink, TrapSink,
 };
-use dce::do_dce;
-use dominator_tree::DominatorTree;
-use flowgraph::ControlFlowGraph;
-use ir::Function;
-use isa::TargetIsa;
-use legalize_function;
-use licm::do_licm;
-use loop_analysis::LoopAnalysis;
-use nan_canonicalization::do_nan_canonicalization;
-use postopt::do_postopt;
-use regalloc;
-use result::CodegenResult;
-use settings::{FlagsOrIsa, OptLevel};
-use simple_gvn::do_simple_gvn;
-use simple_preopt::do_preopt;
+use crate::dce::do_dce;
+use crate::dominator_tree::DominatorTree;
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::Function;
+use crate::isa::TargetIsa;
+use crate::legalize_function;
+use crate::licm::do_licm;
+use crate::loop_analysis::LoopAnalysis;
+use crate::nan_canonicalization::do_nan_canonicalization;
+use crate::postopt::do_postopt;
+use crate::regalloc;
+use crate::result::CodegenResult;
+use crate::settings::{FlagsOrIsa, OptLevel};
+use crate::simple_gvn::do_simple_gvn;
+use crate::simple_preopt::do_preopt;
+use crate::timing;
+use crate::unreachable_code::eliminate_unreachable_code;
+use crate::verifier::{verify_context, verify_locations, VerifierErrors, VerifierResult};
 use std::vec::Vec;
-use timing;
-use unreachable_code::eliminate_unreachable_code;
-use verifier::{verify_context, verify_locations, VerifierErrors, VerifierResult};
 
 /// Persistent data structures and compilation pipeline.
 pub struct Context {
     /// The function we're compiling.
     pub func: Function,
 
     /// The control flow graph of `func`.
     pub cfg: ControlFlowGraph,
--- a/third_party/rust/cranelift-codegen/src/cursor.rs
+++ b/third_party/rust/cranelift-codegen/src/cursor.rs
@@ -1,14 +1,14 @@
 //! Cursor library.
 //!
 //! This module defines cursor data types that can be used for inserting instructions.
 
-use ir;
-use isa::TargetIsa;
+use crate::ir;
+use crate::isa::TargetIsa;
 
 /// The possible positions of a cursor.
 #[derive(Clone, Copy, PartialEq, Eq, Debug)]
 pub enum CursorPosition {
     /// Cursor is not pointing anywhere. No instructions can be inserted.
     Nowhere,
     /// Cursor is pointing at an existing instruction.
     /// New instructions will be inserted *before* the current instruction.
@@ -746,17 +746,17 @@ impl<'c, 'f> ir::InstInserterBase<'c> fo
         self.insert_inst(inst);
         self.built_inst = Some(inst);
 
         if !self.srcloc.is_default() {
             self.func.srclocs[inst] = self.srcloc;
         }
         // Assign an encoding.
         // XXX Is there a way to describe this error to the user?
-        #[cfg_attr(feature = "cargo-clippy", allow(match_wild_err_arm))]
+        #[cfg_attr(feature = "cargo-clippy", allow(clippy::match_wild_err_arm))]
         match self
             .isa
             .encode(&self.func, &self.func.dfg[inst], ctrl_typevar)
         {
             Ok(e) => self.func.encodings[inst] = e,
             Err(_) => panic!("can't encode {}", self.display_inst(inst)),
         }
 
--- a/third_party/rust/cranelift-codegen/src/dbg.rs
+++ b/third_party/rust/cranelift-codegen/src/dbg.rs
@@ -1,10 +1,10 @@
 //! Debug tracing helpers.
-use std::fmt;
+use core::fmt;
 
 /// Prefix added to the log file names, just before the thread name or id.
 pub static LOG_FILENAME_PREFIX: &str = "cranelift.dbg.";
 
 /// Helper for printing lists.
 pub struct DisplayList<'a, T>(pub &'a [T])
 where
     T: 'a + fmt::Display;
--- a/third_party/rust/cranelift-codegen/src/dce.rs
+++ b/third_party/rust/cranelift-codegen/src/dce.rs
@@ -1,20 +1,19 @@
 //! A Dead-Code Elimination (DCE) pass.
 //!
 //! Dead code here means instructions that have no side effects and have no
 //! result values used by other instructions.
 
-use cursor::{Cursor, FuncCursor};
-use dominator_tree::DominatorTree;
-use entity::EntityRef;
-use ir::instructions::InstructionData;
-use ir::{DataFlowGraph, Function, Inst, Opcode};
-use std::vec::Vec;
-use timing;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::entity::EntityRef;
+use crate::ir::instructions::InstructionData;
+use crate::ir::{DataFlowGraph, Function, Inst, Opcode};
+use crate::timing;
 
 /// Test whether the given opcode is unsafe to even consider for DCE.
 fn trivially_unsafe_for_dce(opcode: Opcode) -> bool {
     opcode.is_call()
         || opcode.is_branch()
         || opcode.is_terminator()
         || opcode.is_return()
         || opcode.can_trap()
@@ -41,19 +40,17 @@ fn is_load_with_defined_trapping(opcode:
     }
 }
 
 /// Perform DCE on `func`.
 pub fn do_dce(func: &mut Function, domtree: &mut DominatorTree) {
     let _tt = timing::dce();
     debug_assert!(domtree.is_valid());
 
-    let mut live = Vec::with_capacity(func.dfg.num_values());
-    live.resize(func.dfg.num_values(), false);
-
+    let mut live = vec![false; func.dfg.num_values()];
     for &ebb in domtree.cfg_postorder() {
         let mut pos = FuncCursor::new(func).at_bottom(ebb);
         while let Some(inst) = pos.prev_inst() {
             {
                 let data = &pos.func.dfg[inst];
                 let opcode = data.opcode();
                 if trivially_unsafe_for_dce(opcode)
                     || is_load_with_defined_trapping(opcode, &data)
--- a/third_party/rust/cranelift-codegen/src/divconst_magic_numbers.rs
+++ b/third_party/rust/cranelift-codegen/src/divconst_magic_numbers.rs
@@ -3,49 +3,47 @@
 //! Math helpers for division by (non-power-of-2) constants. This is based
 //! on the presentation in "Hacker's Delight" by Henry Warren, 2003. There
 //! are four cases: {unsigned, signed} x {32 bit, 64 bit}. The word size
 //! makes little difference, but the signed-vs-unsigned aspect has a large
 //! effect. Therefore everything is presented in the order U32 U64 S32 S64
 //! so as to emphasise the similarity of the U32 and U64 cases and the S32
 //! and S64 cases.
 
-#![allow(non_snake_case)]
-
 // Structures to hold the "magic numbers" computed.
 
 #[derive(PartialEq, Debug)]
 pub struct MU32 {
-    pub mulBy: u32,
-    pub doAdd: bool,
-    pub shiftBy: i32,
+    pub mul_by: u32,
+    pub do_add: bool,
+    pub shift_by: i32,
 }
 
 #[derive(PartialEq, Debug)]
 pub struct MU64 {
-    pub mulBy: u64,
-    pub doAdd: bool,
-    pub shiftBy: i32,
+    pub mul_by: u64,
+    pub do_add: bool,
+    pub shift_by: i32,
 }
 
 #[derive(PartialEq, Debug)]
 pub struct MS32 {
-    pub mulBy: i32,
-    pub shiftBy: i32,
+    pub mul_by: i32,
+    pub shift_by: i32,
 }
 
 #[derive(PartialEq, Debug)]
 pub struct MS64 {
-    pub mulBy: i64,
-    pub shiftBy: i32,
+    pub mul_by: i64,
+    pub shift_by: i32,
 }
 
 // The actual "magic number" generators follow.
 
-pub fn magicU32(d: u32) -> MU32 {
+pub fn magic_u32(d: u32) -> MU32 {
     debug_assert_ne!(d, 0);
     debug_assert_ne!(d, 1); // d==1 generates out of range shifts.
 
     let mut do_add: bool = false;
     let mut p: i32 = 31;
     let nc: u32 = 0xFFFFFFFFu32 - u32::wrapping_neg(d) % d;
     let mut q1: u32 = 0x80000000u32 / nc;
     let mut r1: u32 = 0x80000000u32 - q1 * nc;
@@ -75,23 +73,23 @@ pub fn magicU32(d: u32) -> MU32 {
         }
         let delta: u32 = d - 1 - r2;
         if !(p < 64 && (q1 < delta || (q1 == delta && r1 == 0))) {
             break;
         }
     }
 
     MU32 {
-        mulBy: q2 + 1,
-        doAdd: do_add,
-        shiftBy: p - 32,
+        mul_by: q2 + 1,
+        do_add: do_add,
+        shift_by: p - 32,
     }
 }
 
-pub fn magicU64(d: u64) -> MU64 {
+pub fn magic_u64(d: u64) -> MU64 {
     debug_assert_ne!(d, 0);
     debug_assert_ne!(d, 1); // d==1 generates out of range shifts.
 
     let mut do_add: bool = false;
     let mut p: i32 = 63;
     let nc: u64 = 0xFFFFFFFFFFFFFFFFu64 - u64::wrapping_neg(d) % d;
     let mut q1: u64 = 0x8000000000000000u64 / nc;
     let mut r1: u64 = 0x8000000000000000u64 - q1 * nc;
@@ -121,23 +119,23 @@ pub fn magicU64(d: u64) -> MU64 {
         }
         let delta: u64 = d - 1 - r2;
         if !(p < 128 && (q1 < delta || (q1 == delta && r1 == 0))) {
             break;
         }
     }
 
     MU64 {
-        mulBy: q2 + 1,
-        doAdd: do_add,
-        shiftBy: p - 64,
+        mul_by: q2 + 1,
+        do_add: do_add,
+        shift_by: p - 64,
     }
 }
 
-pub fn magicS32(d: i32) -> MS32 {
+pub fn magic_s32(d: i32) -> MS32 {
     debug_assert_ne!(d, -1);
     debug_assert_ne!(d, 0);
     debug_assert_ne!(d, 1);
     let two31: u32 = 0x80000000u32;
     let mut p: i32 = 31;
     let ad: u32 = i32::wrapping_abs(d) as u32;
     let t: u32 = two31 + ((d as u32) >> 31);
     let anc: u32 = u32::wrapping_sub(t - 1, t % ad);
@@ -161,26 +159,26 @@ pub fn magicS32(d: i32) -> MS32 {
         }
         let delta: u32 = ad - r2;
         if !(q1 < delta || (q1 == delta && r1 == 0)) {
             break;
         }
     }
 
     MS32 {
-        mulBy: (if d < 0 {
+        mul_by: (if d < 0 {
             u32::wrapping_neg(q2 + 1)
         } else {
             q2 + 1
         }) as i32,
-        shiftBy: p - 32,
+        shift_by: p - 32,
     }
 }
 
-pub fn magicS64(d: i64) -> MS64 {
+pub fn magic_s64(d: i64) -> MS64 {
     debug_assert_ne!(d, -1);
     debug_assert_ne!(d, 0);
     debug_assert_ne!(d, 1);
     let two63: u64 = 0x8000000000000000u64;
     let mut p: i32 = 63;
     let ad: u64 = i64::wrapping_abs(d) as u64;
     let t: u64 = two63 + ((d as u64) >> 63);
     let anc: u64 = u64::wrapping_sub(t - 1, t % ad);
@@ -204,344 +202,389 @@ pub fn magicS64(d: i64) -> MS64 {
         }
         let delta: u64 = ad - r2;
         if !(q1 < delta || (q1 == delta && r1 == 0)) {
             break;
         }
     }
 
     MS64 {
-        mulBy: (if d < 0 {
+        mul_by: (if d < 0 {
             u64::wrapping_neg(q2 + 1)
         } else {
             q2 + 1
         }) as i64,
-        shiftBy: p - 64,
+        shift_by: p - 64,
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use super::{magicS32, magicS64, magicU32, magicU64};
+    use super::{magic_s32, magic_s64, magic_u32, magic_u64};
     use super::{MS32, MS64, MU32, MU64};
 
-    fn mkMU32(mulBy: u32, doAdd: bool, shiftBy: i32) -> MU32 {
+    fn make_mu32(mul_by: u32, do_add: bool, shift_by: i32) -> MU32 {
         MU32 {
-            mulBy,
-            doAdd,
-            shiftBy,
+            mul_by,
+            do_add,
+            shift_by,
         }
     }
 
-    fn mkMU64(mulBy: u64, doAdd: bool, shiftBy: i32) -> MU64 {
+    fn make_mu64(mul_by: u64, do_add: bool, shift_by: i32) -> MU64 {
         MU64 {
-            mulBy,
-            doAdd,
-            shiftBy,
+            mul_by,
+            do_add,
+            shift_by,
         }
     }
 
-    fn mkMS32(mulBy: i32, shiftBy: i32) -> MS32 {
-        MS32 { mulBy, shiftBy }
+    fn make_ms32(mul_by: i32, shift_by: i32) -> MS32 {
+        MS32 { mul_by, shift_by }
     }
 
-    fn mkMS64(mulBy: i64, shiftBy: i32) -> MS64 {
-        MS64 { mulBy, shiftBy }
+    fn make_ms64(mul_by: i64, shift_by: i32) -> MS64 {
+        MS64 { mul_by, shift_by }
     }
 
     #[test]
     fn test_magicU32() {
-        assert_eq!(magicU32(2u32), mkMU32(0x80000000u32, false, 0));
-        assert_eq!(magicU32(3u32), mkMU32(0xaaaaaaabu32, false, 1));
-        assert_eq!(magicU32(4u32), mkMU32(0x40000000u32, false, 0));
-        assert_eq!(magicU32(5u32), mkMU32(0xcccccccdu32, false, 2));
-        assert_eq!(magicU32(6u32), mkMU32(0xaaaaaaabu32, false, 2));
-        assert_eq!(magicU32(7u32), mkMU32(0x24924925u32, true, 3));
-        assert_eq!(magicU32(9u32), mkMU32(0x38e38e39u32, false, 1));
-        assert_eq!(magicU32(10u32), mkMU32(0xcccccccdu32, false, 3));
-        assert_eq!(magicU32(11u32), mkMU32(0xba2e8ba3u32, false, 3));
-        assert_eq!(magicU32(12u32), mkMU32(0xaaaaaaabu32, false, 3));
-        assert_eq!(magicU32(25u32), mkMU32(0x51eb851fu32, false, 3));
-        assert_eq!(magicU32(125u32), mkMU32(0x10624dd3u32, false, 3));
-        assert_eq!(magicU32(625u32), mkMU32(0xd1b71759u32, false, 9));
-        assert_eq!(magicU32(1337u32), mkMU32(0x88233b2bu32, true, 11));
-        assert_eq!(magicU32(65535u32), mkMU32(0x80008001u32, false, 15));
-        assert_eq!(magicU32(65536u32), mkMU32(0x00010000u32, false, 0));
-        assert_eq!(magicU32(65537u32), mkMU32(0xffff0001u32, false, 16));
-        assert_eq!(magicU32(31415927u32), mkMU32(0x445b4553u32, false, 23));
-        assert_eq!(magicU32(0xdeadbeefu32), mkMU32(0x93275ab3u32, false, 31));
-        assert_eq!(magicU32(0xfffffffdu32), mkMU32(0x40000001u32, false, 30));
-        assert_eq!(magicU32(0xfffffffeu32), mkMU32(0x00000003u32, true, 32));
-        assert_eq!(magicU32(0xffffffffu32), mkMU32(0x80000001u32, false, 31));
+        assert_eq!(magic_u32(2u32), make_mu32(0x80000000u32, false, 0));
+        assert_eq!(magic_u32(3u32), make_mu32(0xaaaaaaabu32, false, 1));
+        assert_eq!(magic_u32(4u32), make_mu32(0x40000000u32, false, 0));
+        assert_eq!(magic_u32(5u32), make_mu32(0xcccccccdu32, false, 2));
+        assert_eq!(magic_u32(6u32), make_mu32(0xaaaaaaabu32, false, 2));
+        assert_eq!(magic_u32(7u32), make_mu32(0x24924925u32, true, 3));
+        assert_eq!(magic_u32(9u32), make_mu32(0x38e38e39u32, false, 1));
+        assert_eq!(magic_u32(10u32), make_mu32(0xcccccccdu32, false, 3));
+        assert_eq!(magic_u32(11u32), make_mu32(0xba2e8ba3u32, false, 3));
+        assert_eq!(magic_u32(12u32), make_mu32(0xaaaaaaabu32, false, 3));
+        assert_eq!(magic_u32(25u32), make_mu32(0x51eb851fu32, false, 3));
+        assert_eq!(magic_u32(125u32), make_mu32(0x10624dd3u32, false, 3));
+        assert_eq!(magic_u32(625u32), make_mu32(0xd1b71759u32, false, 9));
+        assert_eq!(magic_u32(1337u32), make_mu32(0x88233b2bu32, true, 11));
+        assert_eq!(magic_u32(65535u32), make_mu32(0x80008001u32, false, 15));
+        assert_eq!(magic_u32(65536u32), make_mu32(0x00010000u32, false, 0));
+        assert_eq!(magic_u32(65537u32), make_mu32(0xffff0001u32, false, 16));
+        assert_eq!(magic_u32(31415927u32), make_mu32(0x445b4553u32, false, 23));
+        assert_eq!(
+            magic_u32(0xdeadbeefu32),
+            make_mu32(0x93275ab3u32, false, 31)
+        );
+        assert_eq!(
+            magic_u32(0xfffffffdu32),
+            make_mu32(0x40000001u32, false, 30)
+        );
+        assert_eq!(magic_u32(0xfffffffeu32), make_mu32(0x00000003u32, true, 32));
+        assert_eq!(
+            magic_u32(0xffffffffu32),
+            make_mu32(0x80000001u32, false, 31)
+        );
     }
     #[test]
     fn test_magicU64() {
-        assert_eq!(magicU64(2u64), mkMU64(0x8000000000000000u64, false, 0));
-        assert_eq!(magicU64(3u64), mkMU64(0xaaaaaaaaaaaaaaabu64, false, 1));
-        assert_eq!(magicU64(4u64), mkMU64(0x4000000000000000u64, false, 0));
-        assert_eq!(magicU64(5u64), mkMU64(0xcccccccccccccccdu64, false, 2));
-        assert_eq!(magicU64(6u64), mkMU64(0xaaaaaaaaaaaaaaabu64, false, 2));
-        assert_eq!(magicU64(7u64), mkMU64(0x2492492492492493u64, true, 3));
-        assert_eq!(magicU64(9u64), mkMU64(0xe38e38e38e38e38fu64, false, 3));
-        assert_eq!(magicU64(10u64), mkMU64(0xcccccccccccccccdu64, false, 3));
-        assert_eq!(magicU64(11u64), mkMU64(0x2e8ba2e8ba2e8ba3u64, false, 1));
-        assert_eq!(magicU64(12u64), mkMU64(0xaaaaaaaaaaaaaaabu64, false, 3));
-        assert_eq!(magicU64(25u64), mkMU64(0x47ae147ae147ae15u64, true, 5));
-        assert_eq!(magicU64(125u64), mkMU64(0x0624dd2f1a9fbe77u64, true, 7));
-        assert_eq!(magicU64(625u64), mkMU64(0x346dc5d63886594bu64, false, 7));
-        assert_eq!(magicU64(1337u64), mkMU64(0xc4119d952866a139u64, false, 10));
+        assert_eq!(magic_u64(2u64), make_mu64(0x8000000000000000u64, false, 0));
+        assert_eq!(magic_u64(3u64), make_mu64(0xaaaaaaaaaaaaaaabu64, false, 1));
+        assert_eq!(magic_u64(4u64), make_mu64(0x4000000000000000u64, false, 0));
+        assert_eq!(magic_u64(5u64), make_mu64(0xcccccccccccccccdu64, false, 2));
+        assert_eq!(magic_u64(6u64), make_mu64(0xaaaaaaaaaaaaaaabu64, false, 2));
+        assert_eq!(magic_u64(7u64), make_mu64(0x2492492492492493u64, true, 3));
+        assert_eq!(magic_u64(9u64), make_mu64(0xe38e38e38e38e38fu64, false, 3));
+        assert_eq!(magic_u64(10u64), make_mu64(0xcccccccccccccccdu64, false, 3));
+        assert_eq!(magic_u64(11u64), make_mu64(0x2e8ba2e8ba2e8ba3u64, false, 1));
+        assert_eq!(magic_u64(12u64), make_mu64(0xaaaaaaaaaaaaaaabu64, false, 3));
+        assert_eq!(magic_u64(25u64), make_mu64(0x47ae147ae147ae15u64, true, 5));
+        assert_eq!(magic_u64(125u64), make_mu64(0x0624dd2f1a9fbe77u64, true, 7));
         assert_eq!(
-            magicU64(31415927u64),
-            mkMU64(0x116d154b9c3d2f85u64, true, 25)
+            magic_u64(625u64),
+            make_mu64(0x346dc5d63886594bu64, false, 7)
         );
         assert_eq!(
-            magicU64(0x00000000deadbeefu64),
-            mkMU64(0x93275ab2dfc9094bu64, false, 31)
+            magic_u64(1337u64),
+            make_mu64(0xc4119d952866a139u64, false, 10)
         );
         assert_eq!(
-            magicU64(0x00000000fffffffdu64),
-            mkMU64(0x8000000180000005u64, false, 31)
+            magic_u64(31415927u64),
+            make_mu64(0x116d154b9c3d2f85u64, true, 25)
+        );
+        assert_eq!(
+            magic_u64(0x00000000deadbeefu64),
+            make_mu64(0x93275ab2dfc9094bu64, false, 31)
         );
         assert_eq!(
-            magicU64(0x00000000fffffffeu64),
-            mkMU64(0x0000000200000005u64, true, 32)
+            magic_u64(0x00000000fffffffdu64),
+            make_mu64(0x8000000180000005u64, false, 31)
         );
         assert_eq!(
-            magicU64(0x00000000ffffffffu64),
-            mkMU64(0x8000000080000001u64, false, 31)
+            magic_u64(0x00000000fffffffeu64),
+            make_mu64(0x0000000200000005u64, true, 32)
         );
         assert_eq!(
-            magicU64(0x0000000100000000u64),
-            mkMU64(0x0000000100000000u64, false, 0)
+            magic_u64(0x00000000ffffffffu64),
+            make_mu64(0x8000000080000001u64, false, 31)
+        );
+        assert_eq!(
+            magic_u64(0x0000000100000000u64),
+            make_mu64(0x0000000100000000u64, false, 0)
         );
         assert_eq!(
-            magicU64(0x0000000100000001u64),
-            mkMU64(0xffffffff00000001u64, false, 32)
+            magic_u64(0x0000000100000001u64),
+            make_mu64(0xffffffff00000001u64, false, 32)
         );
         assert_eq!(
-            magicU64(0x0ddc0ffeebadf00du64),
-            mkMU64(0x2788e9d394b77da1u64, true, 60)
+            magic_u64(0x0ddc0ffeebadf00du64),
+            make_mu64(0x2788e9d394b77da1u64, true, 60)
         );
         assert_eq!(
-            magicU64(0xfffffffffffffffdu64),
-            mkMU64(0x4000000000000001u64, false, 62)
+            magic_u64(0xfffffffffffffffdu64),
+            make_mu64(0x4000000000000001u64, false, 62)
         );
         assert_eq!(
-            magicU64(0xfffffffffffffffeu64),
-            mkMU64(0x0000000000000003u64, true, 64)
+            magic_u64(0xfffffffffffffffeu64),
+            make_mu64(0x0000000000000003u64, true, 64)
         );
         assert_eq!(
-            magicU64(0xffffffffffffffffu64),
-            mkMU64(0x8000000000000001u64, false, 63)
+            magic_u64(0xffffffffffffffffu64),
+            make_mu64(0x8000000000000001u64, false, 63)
         );
     }
     #[test]
     fn test_magicS32() {
-        assert_eq!(magicS32(-0x80000000i32), mkMS32(0x7fffffffu32 as i32, 30));
-        assert_eq!(magicS32(-0x7FFFFFFFi32), mkMS32(0xbfffffffu32 as i32, 29));
-        assert_eq!(magicS32(-0x7FFFFFFEi32), mkMS32(0x7ffffffdu32 as i32, 30));
-        assert_eq!(magicS32(-31415927i32), mkMS32(0xbba4baadu32 as i32, 23));
-        assert_eq!(magicS32(-1337i32), mkMS32(0x9df73135u32 as i32, 9));
-        assert_eq!(magicS32(-256i32), mkMS32(0x7fffffffu32 as i32, 7));
-        assert_eq!(magicS32(-5i32), mkMS32(0x99999999u32 as i32, 1));
-        assert_eq!(magicS32(-3i32), mkMS32(0x55555555u32 as i32, 1));
-        assert_eq!(magicS32(-2i32), mkMS32(0x7fffffffu32 as i32, 0));
-        assert_eq!(magicS32(2i32), mkMS32(0x80000001u32 as i32, 0));
-        assert_eq!(magicS32(3i32), mkMS32(0x55555556u32 as i32, 0));
-        assert_eq!(magicS32(4i32), mkMS32(0x80000001u32 as i32, 1));
-        assert_eq!(magicS32(5i32), mkMS32(0x66666667u32 as i32, 1));
-        assert_eq!(magicS32(6i32), mkMS32(0x2aaaaaabu32 as i32, 0));
-        assert_eq!(magicS32(7i32), mkMS32(0x92492493u32 as i32, 2));
-        assert_eq!(magicS32(9i32), mkMS32(0x38e38e39u32 as i32, 1));
-        assert_eq!(magicS32(10i32), mkMS32(0x66666667u32 as i32, 2));
-        assert_eq!(magicS32(11i32), mkMS32(0x2e8ba2e9u32 as i32, 1));
-        assert_eq!(magicS32(12i32), mkMS32(0x2aaaaaabu32 as i32, 1));
-        assert_eq!(magicS32(25i32), mkMS32(0x51eb851fu32 as i32, 3));
-        assert_eq!(magicS32(125i32), mkMS32(0x10624dd3u32 as i32, 3));
-        assert_eq!(magicS32(625i32), mkMS32(0x68db8badu32 as i32, 8));
-        assert_eq!(magicS32(1337i32), mkMS32(0x6208cecbu32 as i32, 9));
-        assert_eq!(magicS32(31415927i32), mkMS32(0x445b4553u32 as i32, 23));
-        assert_eq!(magicS32(0x7ffffffei32), mkMS32(0x80000003u32 as i32, 30));
-        assert_eq!(magicS32(0x7fffffffi32), mkMS32(0x40000001u32 as i32, 29));
+        assert_eq!(
+            magic_s32(-0x80000000i32),
+            make_ms32(0x7fffffffu32 as i32, 30)
+        );
+        assert_eq!(
+            magic_s32(-0x7FFFFFFFi32),
+            make_ms32(0xbfffffffu32 as i32, 29)
+        );
+        assert_eq!(
+            magic_s32(-0x7FFFFFFEi32),
+            make_ms32(0x7ffffffdu32 as i32, 30)
+        );
+        assert_eq!(magic_s32(-31415927i32), make_ms32(0xbba4baadu32 as i32, 23));
+        assert_eq!(magic_s32(-1337i32), make_ms32(0x9df73135u32 as i32, 9));
+        assert_eq!(magic_s32(-256i32), make_ms32(0x7fffffffu32 as i32, 7));
+        assert_eq!(magic_s32(-5i32), make_ms32(0x99999999u32 as i32, 1));
+        assert_eq!(magic_s32(-3i32), make_ms32(0x55555555u32 as i32, 1));
+        assert_eq!(magic_s32(-2i32), make_ms32(0x7fffffffu32 as i32, 0));
+        assert_eq!(magic_s32(2i32), make_ms32(0x80000001u32 as i32, 0));
+        assert_eq!(magic_s32(3i32), make_ms32(0x55555556u32 as i32, 0));
+        assert_eq!(magic_s32(4i32), make_ms32(0x80000001u32 as i32, 1));
+        assert_eq!(magic_s32(5i32), make_ms32(0x66666667u32 as i32, 1));
+        assert_eq!(magic_s32(6i32), make_ms32(0x2aaaaaabu32 as i32, 0));
+        assert_eq!(magic_s32(7i32), make_ms32(0x92492493u32 as i32, 2));
+        assert_eq!(magic_s32(9i32), make_ms32(0x38e38e39u32 as i32, 1));
+        assert_eq!(magic_s32(10i32), make_ms32(0x66666667u32 as i32, 2));
+        assert_eq!(magic_s32(11i32), make_ms32(0x2e8ba2e9u32 as i32, 1));
+        assert_eq!(magic_s32(12i32), make_ms32(0x2aaaaaabu32 as i32, 1));
+        assert_eq!(magic_s32(25i32), make_ms32(0x51eb851fu32 as i32, 3));
+        assert_eq!(magic_s32(125i32), make_ms32(0x10624dd3u32 as i32, 3));
+        assert_eq!(magic_s32(625i32), make_ms32(0x68db8badu32 as i32, 8));
+        assert_eq!(magic_s32(1337i32), make_ms32(0x6208cecbu32 as i32, 9));
+        assert_eq!(magic_s32(31415927i32), make_ms32(0x445b4553u32 as i32, 23));
+        assert_eq!(
+            magic_s32(0x7ffffffei32),
+            make_ms32(0x80000003u32 as i32, 30)
+        );
+        assert_eq!(
+            magic_s32(0x7fffffffi32),
+            make_ms32(0x40000001u32 as i32, 29)
+        );
     }
     #[test]
     fn test_magicS64() {
         assert_eq!(
-            magicS64(-0x8000000000000000i64),
-            mkMS64(0x7fffffffffffffffu64 as i64, 62)
+            magic_s64(-0x8000000000000000i64),
+            make_ms64(0x7fffffffffffffffu64 as i64, 62)
+        );
+        assert_eq!(
+            magic_s64(-0x7FFFFFFFFFFFFFFFi64),
+            make_ms64(0xbfffffffffffffffu64 as i64, 61)
         );
         assert_eq!(
-            magicS64(-0x7FFFFFFFFFFFFFFFi64),
-            mkMS64(0xbfffffffffffffffu64 as i64, 61)
+            magic_s64(-0x7FFFFFFFFFFFFFFEi64),
+            make_ms64(0x7ffffffffffffffdu64 as i64, 62)
         );
         assert_eq!(
-            magicS64(-0x7FFFFFFFFFFFFFFEi64),
-            mkMS64(0x7ffffffffffffffdu64 as i64, 62)
+            magic_s64(-0x0ddC0ffeeBadF00di64),
+            make_ms64(0x6c3b8b1635a4412fu64 as i64, 59)
         );
         assert_eq!(
-            magicS64(-0x0ddC0ffeeBadF00di64),
-            mkMS64(0x6c3b8b1635a4412fu64 as i64, 59)
+            magic_s64(-0x100000001i64),
+            make_ms64(0x800000007fffffffu64 as i64, 31)
         );
         assert_eq!(
-            magicS64(-0x100000001i64),
-            mkMS64(0x800000007fffffffu64 as i64, 31)
+            magic_s64(-0x100000000i64),
+            make_ms64(0x7fffffffffffffffu64 as i64, 31)
         );
         assert_eq!(
-            magicS64(-0x100000000i64),
-            mkMS64(0x7fffffffffffffffu64 as i64, 31)
+            magic_s64(-0xFFFFFFFFi64),
+            make_ms64(0x7fffffff7fffffffu64 as i64, 31)
+        );
+        assert_eq!(
+            magic_s64(-0xFFFFFFFEi64),
+            make_ms64(0x7ffffffefffffffdu64 as i64, 31)
         );
         assert_eq!(
-            magicS64(-0xFFFFFFFFi64),
-            mkMS64(0x7fffffff7fffffffu64 as i64, 31)
+            magic_s64(-0xFFFFFFFDi64),
+            make_ms64(0x7ffffffe7ffffffbu64 as i64, 31)
         );
         assert_eq!(
-            magicS64(-0xFFFFFFFEi64),
-            mkMS64(0x7ffffffefffffffdu64 as i64, 31)
+            magic_s64(-0xDeadBeefi64),
+            make_ms64(0x6cd8a54d2036f6b5u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(-0xFFFFFFFDi64),
-            mkMS64(0x7ffffffe7ffffffbu64 as i64, 31)
+            magic_s64(-31415927i64),
+            make_ms64(0x7749755a31e1683du64 as i64, 24)
         );
         assert_eq!(
-            magicS64(-0xDeadBeefi64),
-            mkMS64(0x6cd8a54d2036f6b5u64 as i64, 31)
+            magic_s64(-1337i64),
+            make_ms64(0x9df731356bccaf63u64 as i64, 9)
         );
         assert_eq!(
-            magicS64(-31415927i64),
-            mkMS64(0x7749755a31e1683du64 as i64, 24)
+            magic_s64(-256i64),
+            make_ms64(0x7fffffffffffffffu64 as i64, 7)
         );
-        assert_eq!(magicS64(-1337i64), mkMS64(0x9df731356bccaf63u64 as i64, 9));
-        assert_eq!(magicS64(-256i64), mkMS64(0x7fffffffffffffffu64 as i64, 7));
-        assert_eq!(magicS64(-5i64), mkMS64(0x9999999999999999u64 as i64, 1));
-        assert_eq!(magicS64(-3i64), mkMS64(0x5555555555555555u64 as i64, 1));
-        assert_eq!(magicS64(-2i64), mkMS64(0x7fffffffffffffffu64 as i64, 0));
-        assert_eq!(magicS64(2i64), mkMS64(0x8000000000000001u64 as i64, 0));
-        assert_eq!(magicS64(3i64), mkMS64(0x5555555555555556u64 as i64, 0));
-        assert_eq!(magicS64(4i64), mkMS64(0x8000000000000001u64 as i64, 1));
-        assert_eq!(magicS64(5i64), mkMS64(0x6666666666666667u64 as i64, 1));
-        assert_eq!(magicS64(6i64), mkMS64(0x2aaaaaaaaaaaaaabu64 as i64, 0));
-        assert_eq!(magicS64(7i64), mkMS64(0x4924924924924925u64 as i64, 1));
-        assert_eq!(magicS64(9i64), mkMS64(0x1c71c71c71c71c72u64 as i64, 0));
-        assert_eq!(magicS64(10i64), mkMS64(0x6666666666666667u64 as i64, 2));
-        assert_eq!(magicS64(11i64), mkMS64(0x2e8ba2e8ba2e8ba3u64 as i64, 1));
-        assert_eq!(magicS64(12i64), mkMS64(0x2aaaaaaaaaaaaaabu64 as i64, 1));
-        assert_eq!(magicS64(25i64), mkMS64(0xa3d70a3d70a3d70bu64 as i64, 4));
-        assert_eq!(magicS64(125i64), mkMS64(0x20c49ba5e353f7cfu64 as i64, 4));
-        assert_eq!(magicS64(625i64), mkMS64(0x346dc5d63886594bu64 as i64, 7));
-        assert_eq!(magicS64(1337i64), mkMS64(0x6208ceca9433509du64 as i64, 9));
+        assert_eq!(magic_s64(-5i64), make_ms64(0x9999999999999999u64 as i64, 1));
+        assert_eq!(magic_s64(-3i64), make_ms64(0x5555555555555555u64 as i64, 1));
+        assert_eq!(magic_s64(-2i64), make_ms64(0x7fffffffffffffffu64 as i64, 0));
+        assert_eq!(magic_s64(2i64), make_ms64(0x8000000000000001u64 as i64, 0));
+        assert_eq!(magic_s64(3i64), make_ms64(0x5555555555555556u64 as i64, 0));
+        assert_eq!(magic_s64(4i64), make_ms64(0x8000000000000001u64 as i64, 1));
+        assert_eq!(magic_s64(5i64), make_ms64(0x6666666666666667u64 as i64, 1));
+        assert_eq!(magic_s64(6i64), make_ms64(0x2aaaaaaaaaaaaaabu64 as i64, 0));
+        assert_eq!(magic_s64(7i64), make_ms64(0x4924924924924925u64 as i64, 1));
+        assert_eq!(magic_s64(9i64), make_ms64(0x1c71c71c71c71c72u64 as i64, 0));
+        assert_eq!(magic_s64(10i64), make_ms64(0x6666666666666667u64 as i64, 2));
+        assert_eq!(magic_s64(11i64), make_ms64(0x2e8ba2e8ba2e8ba3u64 as i64, 1));
+        assert_eq!(magic_s64(12i64), make_ms64(0x2aaaaaaaaaaaaaabu64 as i64, 1));
+        assert_eq!(magic_s64(25i64), make_ms64(0xa3d70a3d70a3d70bu64 as i64, 4));
         assert_eq!(
-            magicS64(31415927i64),
-            mkMS64(0x88b68aa5ce1e97c3u64 as i64, 24)
+            magic_s64(125i64),
+            make_ms64(0x20c49ba5e353f7cfu64 as i64, 4)
         );
         assert_eq!(
-            magicS64(0x00000000deadbeefi64),
-            mkMS64(0x93275ab2dfc9094bu64 as i64, 31)
+            magic_s64(625i64),
+            make_ms64(0x346dc5d63886594bu64 as i64, 7)
+        );
+        assert_eq!(
+            magic_s64(1337i64),
+            make_ms64(0x6208ceca9433509du64 as i64, 9)
+        );
+        assert_eq!(
+            magic_s64(31415927i64),
+            make_ms64(0x88b68aa5ce1e97c3u64 as i64, 24)
         );
         assert_eq!(
-            magicS64(0x00000000fffffffdi64),
-            mkMS64(0x8000000180000005u64 as i64, 31)
+            magic_s64(0x00000000deadbeefi64),
+            make_ms64(0x93275ab2dfc9094bu64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x00000000fffffffei64),
-            mkMS64(0x8000000100000003u64 as i64, 31)
+            magic_s64(0x00000000fffffffdi64),
+            make_ms64(0x8000000180000005u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x00000000ffffffffi64),
-            mkMS64(0x8000000080000001u64 as i64, 31)
+            magic_s64(0x00000000fffffffei64),
+            make_ms64(0x8000000100000003u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x0000000100000000i64),
-            mkMS64(0x8000000000000001u64 as i64, 31)
+            magic_s64(0x00000000ffffffffi64),
+            make_ms64(0x8000000080000001u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x0000000100000001i64),
-            mkMS64(0x7fffffff80000001u64 as i64, 31)
+            magic_s64(0x0000000100000000i64),
+            make_ms64(0x8000000000000001u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x0ddc0ffeebadf00di64),
-            mkMS64(0x93c474e9ca5bbed1u64 as i64, 59)
+            magic_s64(0x0000000100000001i64),
+            make_ms64(0x7fffffff80000001u64 as i64, 31)
         );
         assert_eq!(
-            magicS64(0x7ffffffffffffffdi64),
-            mkMS64(0x2000000000000001u64 as i64, 60)
+            magic_s64(0x0ddc0ffeebadf00di64),
+            make_ms64(0x93c474e9ca5bbed1u64 as i64, 59)
         );
         assert_eq!(
-            magicS64(0x7ffffffffffffffei64),
-            mkMS64(0x8000000000000003u64 as i64, 62)
+            magic_s64(0x7ffffffffffffffdi64),
+            make_ms64(0x2000000000000001u64 as i64, 60)
         );
         assert_eq!(
-            magicS64(0x7fffffffffffffffi64),
-            mkMS64(0x4000000000000001u64 as i64, 61)
+            magic_s64(0x7ffffffffffffffei64),
+            make_ms64(0x8000000000000003u64 as i64, 62)
+        );
+        assert_eq!(
+            magic_s64(0x7fffffffffffffffi64),
+            make_ms64(0x4000000000000001u64 as i64, 61)
         );
     }
     #[test]
     fn test_magic_generators_dont_panic() {
         // The point of this is to check that the magic number generators
         // don't panic with integer wraparounds, especially at boundary
         // cases for their arguments. The actual results are thrown away.
         let mut total: u64 = 0;
-        // Testing UP magicU32
+        // Testing UP magic_u32
         for x in 2..(200 * 1000u32) {
-            let m = magicU32(x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
-            total = total - (if m.doAdd { 123 } else { 456 });
+            let m = magic_u32(x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
+            total = total - (if m.do_add { 123 } else { 456 });
         }
         assert_eq!(total, 1747815691);
-        // Testing DOWN magicU32
+        // Testing DOWN magic_u32
         for x in 0..(200 * 1000u32) {
-            let m = magicU32(0xFFFF_FFFFu32 - x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
-            total = total - (if m.doAdd { 123 } else { 456 });
+            let m = magic_u32(0xFFFF_FFFFu32 - x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
+            total = total - (if m.do_add { 123 } else { 456 });
         }
         assert_eq!(total, 2210292772);
 
-        // Testing UP magicU64
+        // Testing UP magic_u64
         for x in 2..(200 * 1000u64) {
-            let m = magicU64(x);
-            total = total ^ m.mulBy;
-            total = total + (m.shiftBy as u64);
-            total = total - (if m.doAdd { 123 } else { 456 });
+            let m = magic_u64(x);
+            total = total ^ m.mul_by;
+            total = total + (m.shift_by as u64);
+            total = total - (if m.do_add { 123 } else { 456 });
         }
         assert_eq!(total, 7430004084791260605);
-        // Testing DOWN magicU64
+        // Testing DOWN magic_u64
         for x in 0..(200 * 1000u64) {
-            let m = magicU64(0xFFFF_FFFF_FFFF_FFFFu64 - x);
-            total = total ^ m.mulBy;
-            total = total + (m.shiftBy as u64);
-            total = total - (if m.doAdd { 123 } else { 456 });
+            let m = magic_u64(0xFFFF_FFFF_FFFF_FFFFu64 - x);
+            total = total ^ m.mul_by;
+            total = total + (m.shift_by as u64);
+            total = total - (if m.do_add { 123 } else { 456 });
         }
         assert_eq!(total, 7547519887519825919);
 
-        // Testing UP magicS32
+        // Testing UP magic_s32
         for x in 0..(200 * 1000i32) {
-            let m = magicS32(-0x8000_0000i32 + x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
+            let m = magic_s32(-0x8000_0000i32 + x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
         }
         assert_eq!(total, 10899224186731671235);
-        // Testing DOWN magicS32
+        // Testing DOWN magic_s32
         for x in 0..(200 * 1000i32) {
-            let m = magicS32(0x7FFF_FFFFi32 - x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
+            let m = magic_s32(0x7FFF_FFFFi32 - x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
         }
         assert_eq!(total, 7547519887517897369);
 
-        // Testing UP magicS64
+        // Testing UP magic_s64
         for x in 0..(200 * 1000i64) {
-            let m = magicS64(-0x8000_0000_0000_0000i64 + x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
+            let m = magic_s64(-0x8000_0000_0000_0000i64 + x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
         }
         assert_eq!(total, 8029756891368555163);
-        // Testing DOWN magicS64
+        // Testing DOWN magic_s64
         for x in 0..(200 * 1000i64) {
-            let m = magicS64(0x7FFF_FFFF_FFFF_FFFFi64 - x);
-            total = total ^ (m.mulBy as u64);
-            total = total + (m.shiftBy as u64);
+            let m = magic_s64(0x7FFF_FFFF_FFFF_FFFFi64 - x);
+            total = total ^ (m.mul_by as u64);
+            total = total + (m.shift_by as u64);
         }
         // Force `total` -- and hence, the entire computation -- to
         // be used, so that rustc can't optimise it out.
         assert_eq!(total, 7547519887532559585u64);
     }
 }
--- a/third_party/rust/cranelift-codegen/src/dominator_tree.rs
+++ b/third_party/rust/cranelift-codegen/src/dominator_tree.rs
@@ -1,20 +1,20 @@
 //! A Dominator Tree represented as mappings of Ebbs to their immediate dominator.
 
-use entity::SecondaryMap;
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::instructions::BranchInfo;
-use ir::{Ebb, ExpandedProgramPoint, Function, Inst, Layout, ProgramOrder, Value};
-use packed_option::PackedOption;
-use std::cmp;
-use std::cmp::Ordering;
-use std::mem;
+use crate::entity::SecondaryMap;
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::instructions::BranchInfo;
+use crate::ir::{Ebb, ExpandedProgramPoint, Function, Inst, Layout, ProgramOrder, Value};
+use crate::packed_option::PackedOption;
+use crate::timing;
+use core::cmp;
+use core::cmp::Ordering;
+use core::mem;
 use std::vec::Vec;
-use timing;
 
 /// RPO numbers are not first assigned in a contiguous way but as multiples of STRIDE, to leave
 /// room for modifications of the dominator tree.
 const STRIDE: u32 = 4;
 
 /// Special RPO numbers used during `compute_postorder`.
 const DONE: u32 = 1;
 const SEEN: u32 = 2;
@@ -500,17 +500,17 @@ impl DominatorTree {
 /// Optional pre-order information that can be computed for a dominator tree.
 ///
 /// This data structure is computed from a `DominatorTree` and provides:
 ///
 /// - A forward traversable dominator tree through the `children()` iterator.
 /// - An ordering of EBBs according to a dominator tree pre-order.
 /// - Constant time dominance checks at the EBB granularity.
 ///
-/// The information in this auxillary data structure is not easy to update when the control flow
+/// The information in this auxiliary data structure is not easy to update when the control flow
 /// graph changes, which is why it is kept separate.
 pub struct DominatorTreePreorder {
     nodes: SecondaryMap<Ebb, ExtraNode>,
 
     // Scratch memory used by `compute_postorder()`.
     stack: Vec<Ebb>,
 }
 
@@ -666,22 +666,22 @@ impl DominatorTreePreorder {
         self.pre_cmp(da, db, &func.layout)
             .then_with(|| da.num().cmp(&db.num()))
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use cursor::{Cursor, FuncCursor};
-    use flowgraph::ControlFlowGraph;
-    use ir::types::*;
-    use ir::{Function, InstBuilder, TrapCode};
-    use settings;
-    use verifier::{verify_context, VerifierErrors};
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::flowgraph::ControlFlowGraph;
+    use crate::ir::types::*;
+    use crate::ir::{Function, InstBuilder, TrapCode};
+    use crate::settings;
+    use crate::verifier::{verify_context, VerifierErrors};
 
     #[test]
     fn empty() {
         let func = Function::new();
         let cfg = ControlFlowGraph::with_function(&func);
         debug_assert!(cfg.is_valid());
         let dtree = DominatorTree::with_function(&func, &cfg);
         assert_eq!(0, dtree.nodes.keys().count());
--- a/third_party/rust/cranelift-codegen/src/flowgraph.rs
+++ b/third_party/rust/cranelift-codegen/src/flowgraph.rs
@@ -18,22 +18,22 @@
 //!         ...
 //!
 //!         jmp Ebb2     ; end of basic block
 //! ```
 //!
 //! Here `Ebb1` and `Ebb2` would each have a single predecessor denoted as `(Ebb0, brz)`
 //! and `(Ebb0, jmp Ebb2)` respectively.
 
-use bforest;
-use entity::SecondaryMap;
-use ir::instructions::BranchInfo;
-use ir::{Ebb, Function, Inst};
-use std::mem;
-use timing;
+use crate::bforest;
+use crate::entity::SecondaryMap;
+use crate::ir::instructions::BranchInfo;
+use crate::ir::{Ebb, Function, Inst};
+use crate::timing;
+use core::mem;
 
 /// A basic block denoted by its enclosing Ebb and last instruction.
 #[derive(PartialEq, Eq)]
 pub struct BasicBlock {
     /// Enclosing Ebb key.
     pub ebb: Ebb,
     /// Last instruction in the basic block.
     pub inst: Inst,
@@ -207,18 +207,18 @@ impl<'a> Iterator for PredIter<'a> {
 }
 
 /// An iterator over EBB successors. The iterator type is `Ebb`.
 pub type SuccIter<'a> = bforest::SetIter<'a, Ebb>;
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use cursor::{Cursor, FuncCursor};
-    use ir::{types, Function, InstBuilder};
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::ir::{types, Function, InstBuilder};
     use std::vec::Vec;
 
     #[test]
     fn empty() {
         let func = Function::new();
         ControlFlowGraph::with_function(&func);
     }
 
--- a/third_party/rust/cranelift-codegen/src/fx.rs
+++ b/third_party/rust/cranelift-codegen/src/fx.rs
@@ -5,20 +5,20 @@
 // http://rust-lang.org/COPYRIGHT.
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::collections::{HashMap, HashSet};
-use std::default::Default;
-use std::hash::{BuildHasherDefault, Hash, Hasher};
-use std::ops::BitXor;
+use super::{HashMap, HashSet};
+use core::default::Default;
+use core::hash::{BuildHasherDefault, Hash, Hasher};
+use core::ops::BitXor;
 
 pub type FxHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
 pub type FxHashSet<V> = HashSet<V, BuildHasherDefault<FxHasher>>;
 
 #[allow(non_snake_case)]
 pub fn FxHashMap<K: Hash + Eq, V>() -> FxHashMap<K, V> {
     HashMap::default()
 }
--- a/third_party/rust/cranelift-codegen/src/ir/builder.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/builder.rs
@@ -1,18 +1,18 @@
 //! Cranelift instruction builder.
 //!
 //! A `Builder` provides a convenient interface for inserting instructions into a Cranelift
 //! function. Many of its methods are generated from the meta language instruction definitions.
 
-use ir;
-use ir::types;
-use ir::{DataFlowGraph, InstructionData};
-use ir::{Inst, Opcode, Type, Value};
-use isa;
+use crate::ir;
+use crate::ir::types;
+use crate::ir::{DataFlowGraph, InstructionData};
+use crate::ir::{Inst, Opcode, Type, Value};
+use crate::isa;
 
 /// Base trait for instruction builders.
 ///
 /// The `InstBuilderBase` trait provides the basic functionality required by the methods of the
 /// generated `InstBuilder` trait. These methods should not normally be used directly. Use the
 /// methods in the `InstBuilder` trait instead.
 ///
 /// Any data type that implements `InstBuilderBase` also gets all the methods of the `InstBuilder`
@@ -54,17 +54,17 @@ pub trait InstInserterBase<'f>: Sized {
 
     /// Get a mutable reference to the data flow graph.
     fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph;
 
     /// Insert a new instruction which belongs to the DFG.
     fn insert_built_inst(self, inst: Inst, ctrl_typevar: Type) -> &'f mut DataFlowGraph;
 }
 
-use std::marker::PhantomData;
+use core::marker::PhantomData;
 
 /// Builder that inserts an instruction at the current position.
 ///
 /// An `InsertBuilder` is a wrapper for an `InstInserterBase` that turns it into an instruction
 /// builder with some additional facilities for creating instructions that reuse existing values as
 /// their results.
 pub struct InsertBuilder<'f, IIB: InstInserterBase<'f>> {
     inserter: IIB,
@@ -157,17 +157,17 @@ where
         self.inserter.data_flow_graph_mut()
     }
 
     fn build(mut self, data: InstructionData, ctrl_typevar: Type) -> (Inst, &'f mut DataFlowGraph) {
         let inst;
         {
             let dfg = self.inserter.data_flow_graph_mut();
             inst = dfg.make_inst(data);
-            // Make an `Interator<Item = Option<Value>>`.
+            // Make an `Iterator<Item = Option<Value>>`.
             let ru = self.reuse.as_ref().iter().cloned();
             dfg.make_inst_results_reusing(inst, ctrl_typevar, ru);
         }
         (inst, self.inserter.insert_built_inst(inst, ctrl_typevar))
     }
 }
 
 /// Instruction builder that replaces an existing instruction.
@@ -210,20 +210,20 @@ impl<'f> InstBuilderBase<'f> for Replace
         }
 
         (self.inst, self.dfg)
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use cursor::{Cursor, FuncCursor};
-    use ir::condcodes::*;
-    use ir::types::*;
-    use ir::{Function, InstBuilder, ValueDef};
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::ir::condcodes::*;
+    use crate::ir::types::*;
+    use crate::ir::{Function, InstBuilder, ValueDef};
 
     #[test]
     fn types() {
         let mut func = Function::new();
         let ebb0 = func.dfg.make_ebb();
         let arg0 = func.dfg.append_ebb_param(ebb0, I32);
         let mut pos = FuncCursor::new(&mut func);
         pos.insert_ebb(ebb0);
--- a/third_party/rust/cranelift-codegen/src/ir/condcodes.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/condcodes.rs
@@ -1,16 +1,16 @@
 //! Condition codes for the Cranelift code generator.
 //!
 //! A condition code here is an enumerated type that determined how to compare two numbers. There
 //! are different rules for comparing integers and floating point numbers, so they use different
 //! condition codes.
 
-use std::fmt::{self, Display, Formatter};
-use std::str::FromStr;
+use core::fmt::{self, Display, Formatter};
+use core::str::FromStr;
 
 /// Common traits of condition codes.
 pub trait CondCode: Copy {
     /// Get the inverse condition code of `self`.
     ///
     /// The inverse condition code produces the opposite result for all comparisons.
     /// That is, `cmp CC, x, y` is true if and only if `cmp CC.inverse(), x, y` is false.
     #[must_use]
--- a/third_party/rust/cranelift-codegen/src/ir/dfg.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/dfg.rs
@@ -1,25 +1,25 @@
 //! Data flow graph tracking Instructions, Values, and EBBs.
 
-use entity::{self, PrimaryMap, SecondaryMap};
-use ir;
-use ir::builder::ReplaceBuilder;
-use ir::extfunc::ExtFuncData;
-use ir::instructions::{BranchInfo, CallInfo, InstructionData};
-use ir::types;
-use ir::{Ebb, FuncRef, Inst, SigRef, Signature, Type, Value, ValueList, ValueListPool};
-use isa::TargetIsa;
-use packed_option::ReservedValue;
-use std::fmt;
-use std::iter;
-use std::mem;
-use std::ops::{Index, IndexMut};
-use std::u16;
-use write::write_operands;
+use crate::entity::{self, PrimaryMap, SecondaryMap};
+use crate::ir;
+use crate::ir::builder::ReplaceBuilder;
+use crate::ir::extfunc::ExtFuncData;
+use crate::ir::instructions::{BranchInfo, CallInfo, InstructionData};
+use crate::ir::types;
+use crate::ir::{Ebb, FuncRef, Inst, SigRef, Signature, Type, Value, ValueList, ValueListPool};
+use crate::isa::TargetIsa;
+use crate::packed_option::ReservedValue;
+use crate::write::write_operands;
+use core::fmt;
+use core::iter;
+use core::mem;
+use core::ops::{Index, IndexMut};
+use core::u16;
 
 /// A data flow graph defines all instructions and extended basic blocks in a function as well as
 /// the data flow dependencies between them. The DFG also tracks values which can be either
 /// instruction results or EBB parameters.
 ///
 /// The layout of EBBs in the function and of instructions in each EBB is recorded by the
 /// `FunctionLayout` data structure which form the other half of the function representation.
 ///
@@ -1058,19 +1058,19 @@ impl DataFlowGraph {
             true
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use cursor::{Cursor, FuncCursor};
-    use ir::types;
-    use ir::{Function, InstructionData, Opcode, TrapCode};
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::ir::types;
+    use crate::ir::{Function, InstructionData, Opcode, TrapCode};
     use std::string::ToString;
 
     #[test]
     fn make_inst() {
         let mut dfg = DataFlowGraph::new();
 
         let idata = InstructionData::UnaryImm {
             opcode: Opcode::Iconst,
@@ -1213,18 +1213,18 @@ mod tests {
         assert_eq!(dfg.ebb_params(ebb), &[arg3]);
         dfg.swap_remove_ebb_param(arg3);
         assert_eq!(dfg.value_is_attached(arg3), false);
         assert_eq!(dfg.ebb_params(ebb), &[]);
     }
 
     #[test]
     fn aliases() {
-        use ir::condcodes::IntCC;
-        use ir::InstBuilder;
+        use crate::ir::condcodes::IntCC;
+        use crate::ir::InstBuilder;
 
         let mut func = Function::new();
         let ebb0 = func.dfg.make_ebb();
         let mut pos = FuncCursor::new(&mut func);
         pos.insert_ebb(ebb0);
 
         // Build a little test program.
         let v1 = pos.ins().iconst(types::I32, 42);
--- a/third_party/rust/cranelift-codegen/src/ir/entities.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/entities.rs
@@ -14,18 +14,19 @@
 //! representing an invalid reference. We prefer to use `Option<EntityRef>` whenever possible, but
 //! unfortunately that type is twice as large as the 32-bit index type on its own. Thus, compact
 //! data structures use the `PackedOption<EntityRef>` representation, while function arguments and
 //! return values prefer the more Rust-like `Option<EntityRef>` variant.
 //!
 //! The entity references all implement the `Display` trait in a way that matches the textual IR
 //! format.
 
-use std::fmt;
-use std::u32;
+use crate::entity::entity_impl;
+use core::fmt;
+use core::u32;
 
 /// An opaque reference to an extended basic block in a function.
 #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
 pub struct Ebb(u32);
 entity_impl!(Ebb, "ebb");
 
 impl Ebb {
     /// Create a new EBB reference from its number. This corresponds to the `ebbNN` representation.
@@ -299,31 +300,31 @@ impl From<Table> for AnyEntity {
     fn from(r: Table) -> Self {
         AnyEntity::Table(r)
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
+    use core::u32;
     use std::string::ToString;
-    use std::u32;
 
     #[test]
     fn value_with_number() {
         assert_eq!(Value::with_number(0).unwrap().to_string(), "v0");
         assert_eq!(Value::with_number(1).unwrap().to_string(), "v1");
 
         assert_eq!(Value::with_number(u32::MAX / 2), None);
         assert!(Value::with_number(u32::MAX / 2 - 1).is_some());
     }
 
     #[test]
     fn memory() {
-        use packed_option::PackedOption;
-        use std::mem;
+        use crate::packed_option::PackedOption;
+        use core::mem;
         // This is the whole point of `PackedOption`.
         assert_eq!(
             mem::size_of::<Value>(),
             mem::size_of::<PackedOption<Value>>()
         );
     }
 }
--- a/third_party/rust/cranelift-codegen/src/ir/extfunc.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/extfunc.rs
@@ -1,19 +1,19 @@
 //! External function calls.
 //!
 //! To a Cranelift function, all functions are "external". Directly called functions must be
 //! declared in the preamble, and all function calls must have a signature.
 //!
 //! This module declares the data types used to represent external functions and call signatures.
 
-use ir::{ArgumentLoc, ExternalName, SigRef, Type};
-use isa::{CallConv, RegInfo, RegUnit};
-use std::fmt;
-use std::str::FromStr;
+use crate::ir::{ArgumentLoc, ExternalName, SigRef, Type};
+use crate::isa::{CallConv, RegInfo, RegUnit};
+use core::fmt;
+use core::str::FromStr;
 use std::vec::Vec;
 
 /// Function signature.
 ///
 /// The function signature describes the types of formal parameters and return values along with
 /// other details that are needed to call a function correctly.
 ///
 /// A signature can optionally include ISA-specific ABI information which specifies exactly how
@@ -329,17 +329,17 @@ impl fmt::Display for ExtFuncData {
         }
         write!(f, "{} {}", self.name, self.signature)
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use ir::types::{B8, F32, I32};
+    use crate::ir::types::{B8, F32, I32};
     use std::string::ToString;
 
     #[test]
     fn argument_type() {
         let t = AbiParam::new(I32);
         assert_eq!(t.to_string(), "i32");
         let mut t = t.uext();
         assert_eq!(t.to_string(), "i32 uext");
--- a/third_party/rust/cranelift-codegen/src/ir/extname.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/extname.rs
@@ -1,18 +1,18 @@
 //! External names.
 //!
 //! These are identifiers for declaring entities defined outside the current
 //! function. The name of an external declaration doesn't have any meaning to
 //! Cranelift, which compiles functions independently.
 
-use ir::LibCall;
-use std::cmp;
-use std::fmt::{self, Write};
-use std::str::FromStr;
+use crate::ir::LibCall;
+use core::cmp;
+use core::fmt::{self, Write};
+use core::str::FromStr;
 
 const TESTCASE_NAME_LENGTH: usize = 16;
 
 /// The name of an external is either a reference to a user-defined symbol
 /// table, or a short sequence of ascii bytes so that test cases do not have
 /// to keep track of a symbol table.
 ///
 /// External names are primarily used as keys by code using Cranelift to map
@@ -114,19 +114,19 @@ impl FromStr for ExternalName {
             Err(_) => Ok(Self::testcase(s.as_bytes())),
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::ExternalName;
-    use ir::LibCall;
+    use crate::ir::LibCall;
+    use core::u32;
     use std::string::ToString;
-    use std::u32;
 
     #[test]
     fn display_testcase() {
         assert_eq!(ExternalName::testcase("").to_string(), "%");
         assert_eq!(ExternalName::testcase("x").to_string(), "%x");
         assert_eq!(ExternalName::testcase("x_1").to_string(), "%x_1");
         assert_eq!(
             ExternalName::testcase("longname12345678").to_string(),
--- a/third_party/rust/cranelift-codegen/src/ir/function.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/function.rs
@@ -1,27 +1,27 @@
 //! Intermediate representation of a function.
 //!
 //! The `Function` struct defined in this module owns all of its extended basic blocks and
 //! instructions.
 
-use binemit::CodeOffset;
-use entity::{PrimaryMap, SecondaryMap};
-use ir;
-use ir::{DataFlowGraph, ExternalName, Layout, Signature};
-use ir::{
+use crate::binemit::CodeOffset;
+use crate::entity::{PrimaryMap, SecondaryMap};
+use crate::ir;
+use crate::ir::{DataFlowGraph, ExternalName, Layout, Signature};
+use crate::ir::{
     Ebb, ExtFuncData, FuncRef, GlobalValue, GlobalValueData, Heap, HeapData, JumpTable,
     JumpTableData, SigRef, StackSlot, StackSlotData, Table, TableData,
 };
-use ir::{EbbOffsets, InstEncodings, SourceLocs, StackSlots, ValueLocations};
-use ir::{JumpTableOffsets, JumpTables};
-use isa::{CallConv, EncInfo, Encoding, Legalize, TargetIsa};
-use regalloc::RegDiversions;
-use std::fmt;
-use write::write_function;
+use crate::ir::{EbbOffsets, InstEncodings, SourceLocs, StackSlots, ValueLocations};
+use crate::ir::{JumpTableOffsets, JumpTables};
+use crate::isa::{CallConv, EncInfo, Encoding, Legalize, TargetIsa};
+use crate::regalloc::RegDiversions;
+use crate::write::write_function;
+use core::fmt;
 
 /// A function.
 ///
 /// Functions can be cloned, but it is not a very fast operation.
 /// The clone will have all the same entity numbers as the original.
 #[derive(Clone)]
 pub struct Function {
     /// Name of this function. Mostly used by `.clif` files.
--- a/third_party/rust/cranelift-codegen/src/ir/globalvalue.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/globalvalue.rs
@@ -1,14 +1,14 @@
 //! Global values.
 
-use ir::immediates::{Imm64, Offset32};
-use ir::{ExternalName, GlobalValue, Type};
-use isa::TargetIsa;
-use std::fmt;
+use crate::ir::immediates::{Imm64, Offset32};
+use crate::ir::{ExternalName, GlobalValue, Type};
+use crate::isa::TargetIsa;
+use core::fmt;
 
 /// Information about a global value declaration.
 #[derive(Clone)]
 pub enum GlobalValueData {
     /// Value is the address of the VM context struct.
     VMContext,
 
     /// Value is pointed to by another global value.
@@ -22,17 +22,18 @@ pub enum GlobalValueData {
         base: GlobalValue,
 
         /// Offset added to the base pointer before doing the load.
         offset: Offset32,
 
         /// Type of the loaded value.
         global_type: Type,
 
-        /// Specifies whether the memory that this refers to is readonly, allowing for the elimination of redundant loads.
+        /// Specifies whether the memory that this refers to is readonly, allowing for the
+        /// elimination of redundant loads.
         readonly: bool,
     },
 
     /// Value is an offset from another global value.
     IAddImm {
         /// The base pointer global value.
         base: GlobalValue,
 
--- a/third_party/rust/cranelift-codegen/src/ir/heap.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/heap.rs
@@ -1,13 +1,13 @@
 //! Heaps.
 
-use ir::immediates::Uimm64;
-use ir::{GlobalValue, Type};
-use std::fmt;
+use crate::ir::immediates::Uimm64;
+use crate::ir::{GlobalValue, Type};
+use core::fmt;
 
 /// Information about a heap declaration.
 #[derive(Clone)]
 pub struct HeapData {
     /// The address of the start of the heap's storage.
     pub base: GlobalValue,
 
     /// Guaranteed minimum heap size in bytes. Heap accesses before `min_size` don't need bounds
--- a/third_party/rust/cranelift-codegen/src/ir/immediates.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/immediates.rs
@@ -1,18 +1,18 @@
 //! Immediate operands for Cranelift instructions
 //!
 //! This module defines the types of immediate operands that can appear on Cranelift instructions.
 //! Each type here should have a corresponding definition in the `cranelift.immediates` Python
 //! module in the meta language.
 
-use std::fmt::{self, Display, Formatter};
-use std::mem;
-use std::str::FromStr;
-use std::{i32, u32};
+use core::fmt::{self, Display, Formatter};
+use core::mem;
+use core::str::FromStr;
+use core::{i32, u32};
 
 /// 64-bit immediate signed integer operand.
 ///
 /// An `Imm64` operand can also be used to represent immediate values of smaller integer types by
 /// sign-extending to `i64`.
 #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
 pub struct Imm64(i64);
 
@@ -724,20 +724,20 @@ impl FromStr for Ieee64 {
             Err(s) => Err(s),
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use std::fmt::Display;
-    use std::str::FromStr;
+    use core::fmt::Display;
+    use core::str::FromStr;
+    use core::{f32, f64};
     use std::string::ToString;
-    use std::{f32, f64};
 
     #[test]
     fn format_imm64() {
         assert_eq!(Imm64(0).to_string(), "0");
         assert_eq!(Imm64(9999).to_string(), "9999");
         assert_eq!(Imm64(10000).to_string(), "0x2710");
         assert_eq!(Imm64(-9999).to_string(), "-9999");
         assert_eq!(Imm64(-10000).to_string(), "0xffff_ffff_ffff_d8f0");
--- a/third_party/rust/cranelift-codegen/src/ir/instructions.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/instructions.rs
@@ -1,29 +1,29 @@
 //! Instruction formats and opcodes.
 //!
 //! The `instructions` module contains definitions for instruction formats, opcodes, and the
 //! in-memory representation of IR instructions.
 //!
 //! A large part of this module is auto-generated from the instruction descriptions in the meta
 //! directory.
 
-use std::fmt::{self, Display, Formatter};
-use std::ops::{Deref, DerefMut};
-use std::str::FromStr;
+use core::fmt::{self, Display, Formatter};
+use core::ops::{Deref, DerefMut};
+use core::str::FromStr;
 use std::vec::Vec;
 
-use ir;
-use ir::types;
-use ir::{Ebb, FuncRef, JumpTable, SigRef, Type, Value};
-use isa;
+use crate::ir;
+use crate::ir::types;
+use crate::ir::{Ebb, FuncRef, JumpTable, SigRef, Type, Value};
+use crate::isa;
 
-use bitset::BitSet;
-use entity;
-use ref_slice::{ref_slice, ref_slice_mut};
+use crate::bitset::BitSet;
+use crate::entity;
+use crate::ref_slice::{ref_slice, ref_slice_mut};
 
 /// Some instructions use an external list of argument values because there is not enough space in
 /// the 16-byte `InstructionData` struct. These value lists are stored in a memory pool in
 /// `dfg.value_lists`.
 pub type ValueList = entity::EntityList<Value>;
 
 /// Memory pool for holding value lists. See `ValueList`.
 pub type ValueListPool = entity::ListPool<Value>;
@@ -68,17 +68,17 @@ impl Opcode {
 // it critically depends on the `opcode_name()` function which is needed here anyway, it lives in
 // this module. This also saves us from running the build script twice to generate code for the two
 // separate crates.
 impl FromStr for Opcode {
     type Err = &'static str;
 
     /// Parse an Opcode name from a string.
     fn from_str(s: &str) -> Result<Self, &'static str> {
-        use constant_hash::{probe, simple_hash, Table};
+        use crate::constant_hash::{probe, simple_hash, Table};
 
         impl<'a> Table<&'a str> for [Option<Opcode>] {
             fn len(&self) -> usize {
                 self.len()
             }
 
             fn key(&self, idx: usize) -> Option<&'a str> {
                 self[idx].map(opcode_name)
@@ -330,18 +330,18 @@ pub struct OpcodeConstraints {
     /// Bits 5-7:
     ///     Number of fixed value arguments. The minimum required number of value operands.
     flags: u8,
 
     /// Permitted set of types for the controlling type variable as an index into `TYPE_SETS`.
     typeset_offset: u8,
 
     /// Offset into `OPERAND_CONSTRAINT` table of the descriptors for this opcode. The first
-    /// `num_fixed_results()` entries describe the result constraints, then follows constraints for the
-    /// fixed `Value` input operands. (`num_fixed_value_arguments()` of them).
+    /// `num_fixed_results()` entries describe the result constraints, then follows constraints for
+    /// the fixed `Value` input operands. (`num_fixed_value_arguments()` of them).
     constraint_offset: u16,
 }
 
 impl OpcodeConstraints {
     /// Can the controlling type variable for this opcode be inferred from the designated value
     /// input operand?
     /// This also implies that this opcode is polymorphic.
     pub fn use_typevar_operand(self) -> bool {
@@ -556,17 +556,17 @@ pub enum ResolvedConstraint {
 
 #[cfg(test)]
 mod tests {
     use super::*;
     use std::string::ToString;
 
     #[test]
     fn opcodes() {
-        use std::mem;
+        use core::mem;
 
         let x = Opcode::Iadd;
         let mut y = Opcode::Isub;
 
         assert!(x != y);
         y = Opcode::Iadd;
         assert_eq!(x, y);
         assert_eq!(x.format(), InstructionFormat::Binary);
@@ -585,17 +585,17 @@ mod tests {
         // Opcode included a variant NotAnOpcode to avoid the unnecessary bloat. Since then the Rust
         // compiler has brought in NonZero optimization, meaning that an enum not using the 0 value
         // can be optional for no size cost. We want to ensure Option<Opcode> remains small.
         assert_eq!(mem::size_of::<Opcode>(), mem::size_of::<Option<Opcode>>());
     }
 
     #[test]
     fn instruction_data() {
-        use std::mem;
+        use core::mem;
         // The size of the `InstructionData` enum is important for performance. It should not
         // exceed 16 bytes. Use `Box<FooData>` out-of-line payloads for instruction formats that
         // require more space than that. It would be fine with a data structure smaller than 16
         // bytes, but what are the odds of that?
         assert_eq!(mem::size_of::<InstructionData>(), 16);
     }
 
     #[test]
@@ -640,17 +640,17 @@ mod tests {
         assert!(cmp.use_typevar_operand());
         assert!(cmp.requires_typevar_operand());
         assert_eq!(cmp.num_fixed_results(), 1);
         assert_eq!(cmp.num_fixed_value_arguments(), 2);
     }
 
     #[test]
     fn value_set() {
-        use ir::types::*;
+        use crate::ir::types::*;
 
         let vts = ValueTypeSet {
             lanes: BitSet16::from_range(0, 8),
             ints: BitSet8::from_range(4, 7),
             floats: BitSet8::from_range(0, 0),
             bools: BitSet8::from_range(3, 7),
         };
         assert!(!vts.contains(I8));
--- a/third_party/rust/cranelift-codegen/src/ir/jumptable.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/jumptable.rs
@@ -1,16 +1,16 @@
 //! Jump table representation.
 //!
 //! Jump tables are declared in the preamble and assigned an `ir::entities::JumpTable` reference.
 //! The actual table of destinations is stored in a `JumpTableData` struct defined in this module.
 
-use ir::entities::Ebb;
-use std::fmt::{self, Display, Formatter};
-use std::slice::{Iter, IterMut};
+use crate::ir::entities::Ebb;
+use core::fmt::{self, Display, Formatter};
+use core::slice::{Iter, IterMut};
 use std::vec::Vec;
 
 /// Contents of a jump table.
 ///
 /// All jump tables use 0-based indexing and densely populated.
 #[derive(Clone)]
 pub struct JumpTableData {
     // Table entries.
@@ -78,18 +78,18 @@ impl Display for JumpTableData {
         }
         write!(fmt, "]")
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::JumpTableData;
-    use entity::EntityRef;
-    use ir::Ebb;
+    use crate::entity::EntityRef;
+    use crate::ir::Ebb;
     use std::string::ToString;
 
     #[test]
     fn empty() {
         let jt = JumpTableData::new();
 
         assert_eq!(jt.as_slice().get(0), None);
         assert_eq!(jt.as_slice().get(10), None);
--- a/third_party/rust/cranelift-codegen/src/ir/layout.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/layout.rs
@@ -1,20 +1,21 @@
 //! Function layout.
 //!
 //! The order of extended basic blocks in a function and the order of instructions in an EBB is
 //! determined by the `Layout` data structure defined in this module.
 
-use entity::SecondaryMap;
-use ir::progpoint::{ExpandedProgramPoint, ProgramOrder};
-use ir::{Ebb, Inst};
-use packed_option::PackedOption;
-use std::cmp;
-use std::iter::{IntoIterator, Iterator};
-use timing;
+use crate::entity::SecondaryMap;
+use crate::ir::progpoint::{ExpandedProgramPoint, ProgramOrder};
+use crate::ir::{Ebb, Inst};
+use crate::packed_option::PackedOption;
+use crate::timing;
+use core::cmp;
+use core::iter::{IntoIterator, Iterator};
+use log::debug;
 
 /// The `Layout` struct determines the layout of EBBs and instructions in a function. It does not
 /// contain definitions of instructions or EBBs, but depends on `Inst` and `Ebb` entity references
 /// being defined elsewhere.
 ///
 /// This data structure determines:
 ///
 /// - The order of EBBs in the function.
@@ -736,20 +737,20 @@ impl<'f> DoubleEndedIterator for Insts<'
         }
         rval
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::Layout;
-    use cursor::{Cursor, CursorPosition};
-    use entity::EntityRef;
-    use ir::{Ebb, Inst, ProgramOrder, SourceLoc};
-    use std::cmp::Ordering;
+    use crate::cursor::{Cursor, CursorPosition};
+    use crate::entity::EntityRef;
+    use crate::ir::{Ebb, Inst, ProgramOrder, SourceLoc};
+    use core::cmp::Ordering;
     use std::vec::Vec;
 
     struct LayoutCursor<'f> {
         /// Borrowed function layout. Public so it can be re-borrowed from this cursor.
         pub layout: &'f mut Layout,
         pos: CursorPosition,
     }
 
--- a/third_party/rust/cranelift-codegen/src/ir/libcall.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/libcall.rs
@@ -1,17 +1,17 @@
 //! Naming well-known routines in the runtime library.
 
-use ir::{
+use crate::ir::{
     types, AbiParam, ArgumentPurpose, ExtFuncData, ExternalName, FuncRef, Function, Inst, Opcode,
     Signature, Type,
 };
-use isa::{CallConv, RegUnit, TargetIsa};
-use std::fmt;
-use std::str::FromStr;
+use crate::isa::{CallConv, RegUnit, TargetIsa};
+use core::fmt;
+use core::str::FromStr;
 
 /// The name of a runtime library routine.
 ///
 /// Runtime library calls are generated for Cranelift IR instructions that don't have an equivalent
 /// ISA instruction or an easy macro expansion. A `LibCall` is used as a well-known name to refer to
 /// the runtime library routine. This way, Cranelift doesn't have to know about the naming
 /// convention in the embedding VM's runtime library.
 ///
--- a/third_party/rust/cranelift-codegen/src/ir/memflags.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/memflags.rs
@@ -1,11 +1,11 @@
 //! Memory operation flags.
 
-use std::fmt;
+use core::fmt;
 
 enum FlagBit {
     Notrap,
     Aligned,
     Readonly,
 }
 
 const NAMES: [&str; 3] = ["notrap", "aligned", "readonly"];
@@ -87,18 +87,18 @@ impl MemFlags {
 
     /// Set the `aligned` flag.
     pub fn set_aligned(&mut self) {
         self.set(FlagBit::Aligned)
     }
 
     /// Test if the `readonly` flag is set.
     ///
-    /// Loads with this flag have no memory dependendies.
-    /// This results in indefined behavior if the dereferenced memory is mutated at any time
+    /// Loads with this flag have no memory dependencies.
+    /// This results in undefined behavior if the dereferenced memory is mutated at any time
     /// between when the function is called and when it is exited.
     pub fn readonly(self) -> bool {
         self.read(FlagBit::Readonly)
     }
 
     /// Set the `readonly` flag.
     pub fn set_readonly(&mut self) {
         self.set(FlagBit::Readonly)
--- a/third_party/rust/cranelift-codegen/src/ir/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/mod.rs
@@ -18,42 +18,46 @@ mod memflags;
 mod progpoint;
 mod sourceloc;
 pub mod stackslot;
 mod table;
 mod trapcode;
 pub mod types;
 mod valueloc;
 
-pub use ir::builder::{InsertBuilder, InstBuilder, InstBuilderBase, InstInserterBase};
-pub use ir::dfg::{DataFlowGraph, ValueDef};
-pub use ir::entities::{
+pub use crate::ir::builder::{InsertBuilder, InstBuilder, InstBuilderBase, InstInserterBase};
+pub use crate::ir::dfg::{DataFlowGraph, ValueDef};
+pub use crate::ir::entities::{
     Ebb, FuncRef, GlobalValue, Heap, Inst, JumpTable, SigRef, StackSlot, Table, Value,
 };
-pub use ir::extfunc::{AbiParam, ArgumentExtension, ArgumentPurpose, ExtFuncData, Signature};
-pub use ir::extname::ExternalName;
-pub use ir::function::Function;
-pub use ir::globalvalue::GlobalValueData;
-pub use ir::heap::{HeapData, HeapStyle};
-pub use ir::instructions::{InstructionData, Opcode, ValueList, ValueListPool, VariableArgs};
-pub use ir::jumptable::JumpTableData;
-pub use ir::layout::Layout;
-pub use ir::libcall::{get_libcall_funcref, get_probestack_funcref, LibCall};
-pub use ir::memflags::MemFlags;
-pub use ir::progpoint::{ExpandedProgramPoint, ProgramOrder, ProgramPoint};
-pub use ir::sourceloc::SourceLoc;
-pub use ir::stackslot::{StackSlotData, StackSlotKind, StackSlots};
-pub use ir::table::TableData;
-pub use ir::trapcode::TrapCode;
-pub use ir::types::Type;
-pub use ir::valueloc::{ArgumentLoc, ValueLoc};
+pub use crate::ir::extfunc::{
+    AbiParam, ArgumentExtension, ArgumentPurpose, ExtFuncData, Signature,
+};
+pub use crate::ir::extname::ExternalName;
+pub use crate::ir::function::Function;
+pub use crate::ir::globalvalue::GlobalValueData;
+pub use crate::ir::heap::{HeapData, HeapStyle};
+pub use crate::ir::instructions::{
+    InstructionData, Opcode, ValueList, ValueListPool, VariableArgs,
+};
+pub use crate::ir::jumptable::JumpTableData;
+pub use crate::ir::layout::Layout;
+pub use crate::ir::libcall::{get_libcall_funcref, get_probestack_funcref, LibCall};
+pub use crate::ir::memflags::MemFlags;
+pub use crate::ir::progpoint::{ExpandedProgramPoint, ProgramOrder, ProgramPoint};
+pub use crate::ir::sourceloc::SourceLoc;
+pub use crate::ir::stackslot::{StackSlotData, StackSlotKind, StackSlots};
+pub use crate::ir::table::TableData;
+pub use crate::ir::trapcode::TrapCode;
+pub use crate::ir::types::Type;
+pub use crate::ir::valueloc::{ArgumentLoc, ValueLoc};
 
-use binemit;
-use entity::{PrimaryMap, SecondaryMap};
-use isa;
+use crate::binemit;
+use crate::entity::{PrimaryMap, SecondaryMap};
+use crate::isa;
 
 /// Map of value locations.
 pub type ValueLocations = SecondaryMap<Value, ValueLoc>;
 
 /// Map of jump tables.
 pub type JumpTables = PrimaryMap<JumpTable, JumpTableData>;
 
 /// Map of instruction encodings.
--- a/third_party/rust/cranelift-codegen/src/ir/progpoint.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/progpoint.rs
@@ -1,15 +1,15 @@
 //! Program points.
 
-use entity::EntityRef;
-use ir::{Ebb, Inst, ValueDef};
-use std::cmp;
-use std::fmt;
-use std::u32;
+use crate::entity::EntityRef;
+use crate::ir::{Ebb, Inst, ValueDef};
+use core::cmp;
+use core::fmt;
+use core::u32;
 
 /// A `ProgramPoint` represents a position in a function where the live range of an SSA value can
 /// begin or end. It can be either:
 ///
 /// 1. An instruction or
 /// 2. An EBB header.
 ///
 /// This corresponds more or less to the lines in the textual form of Cranelift IR.
@@ -141,18 +141,18 @@ pub trait ProgramOrder {
     ///
     /// This returns true if `inst` is the terminator in the EBB immediately before `ebb`.
     fn is_ebb_gap(&self, inst: Inst, ebb: Ebb) -> bool;
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use entity::EntityRef;
-    use ir::{Ebb, Inst};
+    use crate::entity::EntityRef;
+    use crate::ir::{Ebb, Inst};
     use std::string::ToString;
 
     #[test]
     fn convert() {
         let i5 = Inst::new(5);
         let b3 = Ebb::new(3);
 
         let pp1: ProgramPoint = i5.into();
--- a/third_party/rust/cranelift-codegen/src/ir/sourceloc.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/sourceloc.rs
@@ -1,14 +1,14 @@
 //! Source locations.
 //!
 //! Cranelift tracks the original source location of each instruction, and preserves the source
 //! location when instructions are transformed.
 
-use std::fmt;
+use core::fmt;
 
 /// A source location.
 ///
 /// This is an opaque 32-bit number attached to each Cranelift IR instruction. Cranelift does not
 /// interpret source locations in any way, they are simply preserved from the input to the output.
 ///
 /// The default source location uses the all-ones bit pattern `!0`. It is used for instructions
 /// that can't be given a real source location.
@@ -45,17 +45,17 @@ impl fmt::Display for SourceLoc {
         } else {
             write!(f, "@{:04x}", self.0)
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use ir::SourceLoc;
+    use crate::ir::SourceLoc;
     use std::string::ToString;
 
     #[test]
     fn display() {
         assert_eq!(SourceLoc::default().to_string(), "@-");
         assert_eq!(SourceLoc::new(0).to_string(), "@0000");
         assert_eq!(SourceLoc::new(16).to_string(), "@0010");
         assert_eq!(SourceLoc::new(0xabcdef).to_string(), "@abcdef");
--- a/third_party/rust/cranelift-codegen/src/ir/stackslot.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/stackslot.rs
@@ -1,21 +1,21 @@
 //! Stack slots.
 //!
 //! The `StackSlotData` struct keeps track of a single stack slot in a function.
 //!
 
-use entity::{Iter, IterMut, Keys, PrimaryMap};
-use ir::{StackSlot, Type};
-use packed_option::PackedOption;
-use std::cmp;
-use std::fmt;
-use std::ops::{Index, IndexMut};
-use std::slice;
-use std::str::FromStr;
+use crate::entity::{Iter, IterMut, Keys, PrimaryMap};
+use crate::ir::{StackSlot, Type};
+use crate::packed_option::PackedOption;
+use core::cmp;
+use core::fmt;
+use core::ops::{Index, IndexMut};
+use core::slice;
+use core::str::FromStr;
 use std::vec::Vec;
 
 /// The size of an object on the stack, or the size of a stack frame.
 ///
 /// We don't use `usize` to represent object sizes on the target platform because Cranelift supports
 /// cross-compilation, and `usize` is a type that depends on the host platform, not the target
 /// platform.
 pub type StackSize = u32;
@@ -335,18 +335,18 @@ impl StackSlots {
         self.emergency.push(ss);
         ss
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use ir::types;
-    use ir::Function;
+    use crate::ir::types;
+    use crate::ir::Function;
     use std::string::ToString;
 
     #[test]
     fn stack_slot() {
         let mut func = Function::new();
 
         let ss0 = func.create_stack_slot(StackSlotData::new(StackSlotKind::IncomingArg, 4));
         let ss1 = func.create_stack_slot(StackSlotData::new(StackSlotKind::SpillSlot, 8));
--- a/third_party/rust/cranelift-codegen/src/ir/table.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/table.rs
@@ -1,13 +1,13 @@
 //! Tables.
 
-use ir::immediates::Uimm64;
-use ir::{GlobalValue, Type};
-use std::fmt;
+use crate::ir::immediates::Uimm64;
+use crate::ir::{GlobalValue, Type};
+use core::fmt;
 
 /// Information about a table declaration.
 #[derive(Clone)]
 pub struct TableData {
     /// Global value giving the address of the start of the table.
     pub base_gv: GlobalValue,
 
     /// Guaranteed minimum table size in elements. Table accesses before `min_size` don't need
--- a/third_party/rust/cranelift-codegen/src/ir/trapcode.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/trapcode.rs
@@ -1,12 +1,12 @@
 //! Trap codes describing the reason for a trap.
 
-use std::fmt::{self, Display, Formatter};
-use std::str::FromStr;
+use core::fmt::{self, Display, Formatter};
+use core::str::FromStr;
 
 /// A trap code describing the reason for a trap.
 ///
 /// All trap instructions have an explicit trap code.
 #[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
 pub enum TrapCode {
     /// The current stack space was exhausted.
     ///
@@ -37,16 +37,19 @@ pub enum TrapCode {
     IntegerOverflow,
 
     /// An integer division by zero.
     IntegerDivisionByZero,
 
     /// Failed float-to-int conversion.
     BadConversionToInteger,
 
+    /// Code that was supposed to have been unreachable was reached.
+    UnreachableCodeReached,
+
     /// Execution has potentially run too long and may be interrupted.
     /// This trap is resumable.
     Interrupt,
 
     /// A user-defined trap code.
     User(u16),
 }
 
@@ -58,16 +61,17 @@ impl Display for TrapCode {
             HeapOutOfBounds => "heap_oob",
             TableOutOfBounds => "table_oob",
             OutOfBounds => "oob",
             IndirectCallToNull => "icall_null",
             BadSignature => "bad_sig",
             IntegerOverflow => "int_ovf",
             IntegerDivisionByZero => "int_divz",
             BadConversionToInteger => "bad_toint",
+            UnreachableCodeReached => "unreachable",
             Interrupt => "interrupt",
             User(x) => return write!(f, "user{}", x),
         };
         f.write_str(identifier)
     }
 }
 
 impl FromStr for TrapCode {
@@ -80,39 +84,42 @@ impl FromStr for TrapCode {
             "heap_oob" => Ok(HeapOutOfBounds),
             "table_oob" => Ok(TableOutOfBounds),
             "oob" => Ok(OutOfBounds),
             "icall_null" => Ok(IndirectCallToNull),
             "bad_sig" => Ok(BadSignature),
             "int_ovf" => Ok(IntegerOverflow),
             "int_divz" => Ok(IntegerDivisionByZero),
             "bad_toint" => Ok(BadConversionToInteger),
+            "unreachable" => Ok(UnreachableCodeReached),
             "interrupt" => Ok(Interrupt),
             _ if s.starts_with("user") => s[4..].parse().map(User).map_err(|_| ()),
             _ => Err(()),
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
     use std::string::ToString;
 
     // Everything but user-defined codes.
-    const CODES: [TrapCode; 9] = [
+    const CODES: [TrapCode; 11] = [
         TrapCode::StackOverflow,
         TrapCode::HeapOutOfBounds,
         TrapCode::TableOutOfBounds,
         TrapCode::OutOfBounds,
         TrapCode::IndirectCallToNull,
         TrapCode::BadSignature,
         TrapCode::IntegerOverflow,
         TrapCode::IntegerDivisionByZero,
         TrapCode::BadConversionToInteger,
+        TrapCode::UnreachableCodeReached,
+        TrapCode::Interrupt,
     ];
 
     #[test]
     fn display() {
         for r in &CODES {
             let tc = *r;
             assert_eq!(tc.to_string().parse(), Ok(tc));
         }
--- a/third_party/rust/cranelift-codegen/src/ir/types.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/types.rs
@@ -1,12 +1,12 @@
 //! Common types for the Cranelift code generator.
 
-use std::default::Default;
-use std::fmt::{self, Debug, Display, Formatter};
+use core::default::Default;
+use core::fmt::{self, Debug, Display, Formatter};
 use target_lexicon::{PointerWidth, Triple};
 
 /// The type of an SSA value.
 ///
 /// The `INVALID` type isn't a real type, and is used as a placeholder in the IR where a type
 /// field is present put no type is needed, such as the controlling type variable for a
 /// non-polymorphic instruction.
 ///
--- a/third_party/rust/cranelift-codegen/src/ir/valueloc.rs
+++ b/third_party/rust/cranelift-codegen/src/ir/valueloc.rs
@@ -1,16 +1,16 @@
 //! Value locations.
 //!
 //! The register allocator assigns every SSA value to either a register or a stack slot. This
 //! assignment is represented by a `ValueLoc` object.
 
-use ir::StackSlot;
-use isa::{RegInfo, RegUnit};
-use std::fmt;
+use crate::ir::StackSlot;
+use crate::isa::{RegInfo, RegUnit};
+use core::fmt;
 
 /// Value location.
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
 pub enum ValueLoc {
     /// This value has not been assigned to a location yet.
     Unassigned,
     /// Value is assigned to a register.
     Reg(RegUnit),
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/abi.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/abi.rs
@@ -1,15 +1,15 @@
 //! ARM ABI implementation.
 
 use super::registers::{D, GPR, Q, S};
-use ir;
-use isa::RegClass;
-use regalloc::RegisterSet;
-use settings as shared_settings;
+use crate::ir;
+use crate::isa::RegClass;
+use crate::regalloc::RegisterSet;
+use crate::settings as shared_settings;
 
 /// Legalize `sig`.
 pub fn legalize_signature(
     _sig: &mut ir::Signature,
     _flags: &shared_settings::Flags,
     _current: bool,
 ) {
     unimplemented!()
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/binemit.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/binemit.rs
@@ -1,7 +1,7 @@
 //! Emitting binary ARM32 machine code.
 
-use binemit::{bad_encoding, CodeSink};
-use ir::{Function, Inst};
-use regalloc::RegDiversions;
+use crate::binemit::{bad_encoding, CodeSink};
+use crate::ir::{Function, Inst};
+use crate::regalloc::RegDiversions;
 
 include!(concat!(env!("OUT_DIR"), "/binemit-arm32.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/enc_tables.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/enc_tables.rs
@@ -1,10 +1,9 @@
 //! Encoding tables for ARM32 ISA.
 
-use ir;
-use isa;
-use isa::constraints::*;
-use isa::enc_tables::*;
-use isa::encoding::RecipeSizing;
+use crate::isa;
+use crate::isa::constraints::*;
+use crate::isa::enc_tables::*;
+use crate::isa::encoding::RecipeSizing;
 
 include!(concat!(env!("OUT_DIR"), "/encoding-arm32.rs"));
 include!(concat!(env!("OUT_DIR"), "/legalize-arm32.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/mod.rs
@@ -3,25 +3,25 @@
 mod abi;
 mod binemit;
 mod enc_tables;
 mod registers;
 pub mod settings;
 
 use super::super::settings as shared_settings;
 #[cfg(feature = "testing_hooks")]
-use binemit::CodeSink;
-use binemit::{emit_function, MemoryCodeSink};
-use ir;
-use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
-use isa::Builder as IsaBuilder;
-use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
-use regalloc;
+use crate::binemit::CodeSink;
+use crate::binemit::{emit_function, MemoryCodeSink};
+use crate::ir;
+use crate::isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
+use crate::isa::Builder as IsaBuilder;
+use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
+use crate::regalloc;
+use core::fmt;
 use std::boxed::Box;
-use std::fmt;
 use target_lexicon::{Architecture, Triple};
 
 #[allow(dead_code)]
 struct Isa {
     triple: Triple,
     shared_flags: shared_settings::Flags,
     isa_flags: settings::Flags,
     cpumode: &'static [shared_enc_tables::Level1Entry<u16>],
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/registers.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/registers.rs
@@ -1,18 +1,18 @@
 //! ARM32 register descriptions.
 
-use isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
+use crate::isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
 
 include!(concat!(env!("OUT_DIR"), "/registers-arm32.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::{D, GPR, INFO, S};
-    use isa::RegUnit;
+    use crate::isa::RegUnit;
     use std::string::{String, ToString};
 
     #[test]
     fn unit_encodings() {
         assert_eq!(INFO.parse_regunit("s0"), Some(0));
         assert_eq!(INFO.parse_regunit("s31"), Some(31));
         assert_eq!(INFO.parse_regunit("s32"), Some(32));
         assert_eq!(INFO.parse_regunit("r0"), Some(64));
@@ -29,17 +29,17 @@ mod tests {
         assert_eq!(uname(1), "%s1");
         assert_eq!(uname(31), "%s31");
         assert_eq!(uname(64), "%r0");
     }
 
     #[test]
     fn overlaps() {
         // arm32 has the most interesting register geometries, so test `regs_overlap()` here.
-        use isa::regs_overlap;
+        use crate::isa::regs_overlap;
 
         let r0 = GPR.unit(0);
         let r1 = GPR.unit(1);
         let r2 = GPR.unit(2);
 
         assert!(regs_overlap(GPR, r0, GPR, r0));
         assert!(regs_overlap(GPR, r2, GPR, r2));
         assert!(!regs_overlap(GPR, r0, GPR, r1));
--- a/third_party/rust/cranelift-codegen/src/isa/arm32/settings.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm32/settings.rs
@@ -1,9 +1,9 @@
 //! ARM32 Settings.
 
-use settings::{self, detail, Builder};
-use std::fmt;
+use crate::settings::{self, detail, Builder};
+use core::fmt;
 
 // Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
 // `Flags` struct with an impl for all of the settings defined in
 // `lib/codegen/meta-python/isa/arm32/settings.py`.
 include!(concat!(env!("OUT_DIR"), "/settings-arm32.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/abi.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/abi.rs
@@ -1,15 +1,15 @@
 //! ARM 64 ABI implementation.
 
 use super::registers::{FPR, GPR};
-use ir;
-use isa::RegClass;
-use regalloc::RegisterSet;
-use settings as shared_settings;
+use crate::ir;
+use crate::isa::RegClass;
+use crate::regalloc::RegisterSet;
+use crate::settings as shared_settings;
 
 /// Legalize `sig`.
 pub fn legalize_signature(
     _sig: &mut ir::Signature,
     _flags: &shared_settings::Flags,
     _current: bool,
 ) {
     unimplemented!()
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/binemit.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/binemit.rs
@@ -1,7 +1,7 @@
 //! Emitting binary ARM64 machine code.
 
-use binemit::{bad_encoding, CodeSink};
-use ir::{Function, Inst};
-use regalloc::RegDiversions;
+use crate::binemit::{bad_encoding, CodeSink};
+use crate::ir::{Function, Inst};
+use crate::regalloc::RegDiversions;
 
 include!(concat!(env!("OUT_DIR"), "/binemit-arm64.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/enc_tables.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/enc_tables.rs
@@ -1,10 +1,9 @@
 //! Encoding tables for ARM64 ISA.
 
-use ir;
-use isa;
-use isa::constraints::*;
-use isa::enc_tables::*;
-use isa::encoding::RecipeSizing;
+use crate::isa;
+use crate::isa::constraints::*;
+use crate::isa::enc_tables::*;
+use crate::isa::encoding::RecipeSizing;
 
 include!(concat!(env!("OUT_DIR"), "/encoding-arm64.rs"));
 include!(concat!(env!("OUT_DIR"), "/legalize-arm64.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/mod.rs
@@ -3,25 +3,25 @@
 mod abi;
 mod binemit;
 mod enc_tables;
 mod registers;
 pub mod settings;
 
 use super::super::settings as shared_settings;
 #[cfg(feature = "testing_hooks")]
-use binemit::CodeSink;
-use binemit::{emit_function, MemoryCodeSink};
-use ir;
-use isa::enc_tables::{lookup_enclist, Encodings};
-use isa::Builder as IsaBuilder;
-use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
-use regalloc;
+use crate::binemit::CodeSink;
+use crate::binemit::{emit_function, MemoryCodeSink};
+use crate::ir;
+use crate::isa::enc_tables::{lookup_enclist, Encodings};
+use crate::isa::Builder as IsaBuilder;
+use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
+use crate::regalloc;
+use core::fmt;
 use std::boxed::Box;
-use std::fmt;
 use target_lexicon::Triple;
 
 #[allow(dead_code)]
 struct Isa {
     triple: Triple,
     shared_flags: shared_settings::Flags,
     isa_flags: settings::Flags,
 }
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/registers.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/registers.rs
@@ -1,18 +1,18 @@
 //! ARM64 register descriptions.
 
-use isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
+use crate::isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
 
 include!(concat!(env!("OUT_DIR"), "/registers-arm64.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::INFO;
-    use isa::RegUnit;
+    use crate::isa::RegUnit;
     use std::string::{String, ToString};
 
     #[test]
     fn unit_encodings() {
         assert_eq!(INFO.parse_regunit("x0"), Some(0));
         assert_eq!(INFO.parse_regunit("x31"), Some(31));
         assert_eq!(INFO.parse_regunit("v0"), Some(32));
         assert_eq!(INFO.parse_regunit("v31"), Some(63));
--- a/third_party/rust/cranelift-codegen/src/isa/arm64/settings.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/arm64/settings.rs
@@ -1,9 +1,9 @@
 //! ARM64 Settings.
 
-use settings::{self, detail, Builder};
-use std::fmt;
+use crate::settings::{self, detail, Builder};
+use core::fmt;
 
 // Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
 // `Flags` struct with an impl for all of the settings defined in
 // `lib/codegen/meta-python/isa/arm64/settings.py`.
 include!(concat!(env!("OUT_DIR"), "/settings-arm64.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/call_conv.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/call_conv.rs
@@ -1,10 +1,10 @@
-use std::fmt;
-use std::str;
+use core::fmt;
+use core::str;
 use target_lexicon::{CallingConvention, Triple};
 
 /// Calling convention identifiers.
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub enum CallConv {
     /// Best performance, not ABI-stable
     Fast,
     /// Smallest caller code size, not ABI-stable
--- a/third_party/rust/cranelift-codegen/src/isa/constraints.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/constraints.rs
@@ -2,20 +2,20 @@
 //!
 //! An encoding recipe specifies how an instruction is encoded as binary machine code, but it only
 //! works if the operands and results satisfy certain constraints. Constraints on immediate
 //! operands are checked by instruction predicates when the recipe is chosen.
 //!
 //! It is the register allocator's job to make sure that the register constraints on value operands
 //! are satisfied.
 
-use binemit::CodeOffset;
-use ir::{Function, Inst, ValueLoc};
-use isa::{RegClass, RegUnit};
-use regalloc::RegDiversions;
+use crate::binemit::CodeOffset;
+use crate::ir::{Function, Inst, ValueLoc};
+use crate::isa::{RegClass, RegUnit};
+use crate::regalloc::RegDiversions;
 
 /// Register constraint for a single value operand or instruction result.
 #[derive(PartialEq, Debug)]
 pub struct OperandConstraint {
     /// The kind of constraint.
     pub kind: ConstraintKind,
 
     /// The register class of the operand.
--- a/third_party/rust/cranelift-codegen/src/isa/enc_tables.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/enc_tables.rs
@@ -1,18 +1,18 @@
 //! Support types for generated encoding tables.
 //!
 //! This module contains types and functions for working with the encoding tables generated by
 //! `lib/codegen/meta-python/gen_encoding.py`.
 
-use constant_hash::{probe, Table};
-use ir::{Function, InstructionData, Opcode, Type};
-use isa::{Encoding, Legalize};
-use settings::PredicateView;
-use std::ops::Range;
+use crate::constant_hash::{probe, Table};
+use crate::ir::{Function, InstructionData, Opcode, Type};
+use crate::isa::{Encoding, Legalize};
+use crate::settings::PredicateView;
+use core::ops::Range;
 
 /// A recipe predicate.
 ///
 /// This is a predicate function capable of testing ISA and instruction predicates simultaneously.
 ///
 /// A None predicate is always satisfied.
 pub type RecipePredicate = Option<fn(PredicateView, &InstructionData) -> bool>;
 
--- a/third_party/rust/cranelift-codegen/src/isa/encoding.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/encoding.rs
@@ -1,15 +1,15 @@
 //! The `Encoding` struct.
 
-use binemit::CodeOffset;
-use ir::{Function, Inst};
-use isa::constraints::{BranchRange, RecipeConstraints};
-use regalloc::RegDiversions;
-use std::fmt;
+use crate::binemit::CodeOffset;
+use crate::ir::{Function, Inst};
+use crate::isa::constraints::{BranchRange, RecipeConstraints};
+use crate::regalloc::RegDiversions;
+use core::fmt;
 
 /// Bits needed to encode an instruction as binary machine code.
 ///
 /// The encoding consists of two parts, both specific to the target ISA: An encoding *recipe*, and
 /// encoding *bits*. The recipe determines the native instruction format and the mapping of
 /// operands to encoded bits. The encoding bits provide additional information to the recipe,
 /// typically parts of the opcode.
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
--- a/third_party/rust/cranelift-codegen/src/isa/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/mod.rs
@@ -41,34 +41,37 @@
 //!     }
 //! }
 //! # }
 //! ```
 //!
 //! The configured target ISA trait object is a `Box<TargetIsa>` which can be used for multiple
 //! concurrent function compilations.
 
-pub use isa::call_conv::CallConv;
-pub use isa::constraints::{BranchRange, ConstraintKind, OperandConstraint, RecipeConstraints};
-pub use isa::encoding::{base_size, EncInfo, Encoding};
-pub use isa::registers::{regs_overlap, RegClass, RegClassIndex, RegInfo, RegUnit};
-pub use isa::stack::{StackBase, StackBaseMask, StackRef};
+pub use crate::isa::call_conv::CallConv;
+pub use crate::isa::constraints::{
+    BranchRange, ConstraintKind, OperandConstraint, RecipeConstraints,
+};
+pub use crate::isa::encoding::{base_size, EncInfo, Encoding};
+pub use crate::isa::registers::{regs_overlap, RegClass, RegClassIndex, RegInfo, RegUnit};
+pub use crate::isa::stack::{StackBase, StackBaseMask, StackRef};
 
-use binemit;
-use flowgraph;
-use ir;
-use isa::enc_tables::Encodings;
-use regalloc;
-use result::CodegenResult;
-use settings;
-use settings::SetResult;
+use crate::binemit;
+use crate::flowgraph;
+use crate::ir;
+use crate::isa::enc_tables::Encodings;
+use crate::regalloc;
+use crate::result::CodegenResult;
+use crate::settings;
+use crate::settings::SetResult;
+use crate::timing;
+use core::fmt;
+use failure_derive::Fail;
 use std::boxed::Box;
-use std::fmt;
 use target_lexicon::{Architecture, PointerWidth, Triple};
-use timing;
 
 #[cfg(build_riscv)]
 mod riscv;
 
 #[cfg(build_x86)]
 mod x86;
 
 #[cfg(build_arm32)]
@@ -329,18 +332,18 @@ pub trait TargetIsa: fmt::Display + Sync
     fn allocatable_registers(&self, func: &ir::Function) -> regalloc::RegisterSet;
 
     /// Compute the stack layout and insert prologue and epilogue code into `func`.
     ///
     /// Return an error if the stack frame is too large.
     fn prologue_epilogue(&self, func: &mut ir::Function) -> CodegenResult<()> {
         let _tt = timing::prologue_epilogue();
         // This default implementation is unlikely to be good enough.
-        use ir::stackslot::{StackOffset, StackSize};
-        use stack_layout::layout_stack;
+        use crate::ir::stackslot::{StackOffset, StackSize};
+        use crate::stack_layout::layout_stack;
 
         let word_size = StackSize::from(self.pointer_bytes());
 
         // Account for the SpiderMonkey standard prologue pushes.
         if func.signature.call_conv == CallConv::Baldrdash {
             let bytes = StackSize::from(self.flags().baldrdash_prologue_words()) * word_size;
             let mut ss = ir::StackSlotData::new(ir::StackSlotKind::IncomingArg, bytes);
             ss.offset = Some(-(bytes as StackOffset));
--- a/third_party/rust/cranelift-codegen/src/isa/registers.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/registers.rs
@@ -1,12 +1,12 @@
 //! Data structures describing the registers in an ISA.
 
-use entity::EntityRef;
-use std::fmt;
+use crate::entity::EntityRef;
+use core::fmt;
 
 /// Register units are the smallest units of register allocation.
 ///
 /// Normally there is a 1-1 correspondence between registers and register units, but when an ISA
 /// has aliasing registers, the aliasing can be modeled with registers that cover multiple
 /// register units.
 ///
 /// The register allocator will enforce that each register unit only gets used for one thing.
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/abi.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/abi.rs
@@ -2,21 +2,21 @@
 //!
 //! This module implements the RISC-V calling convention through the primary `legalize_signature()`
 //! entry point.
 //!
 //! This doesn't support the soft-float ABI at the moment.
 
 use super::registers::{FPR, GPR};
 use super::settings;
-use abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
-use ir::{self, AbiParam, ArgumentExtension, ArgumentLoc, ArgumentPurpose, Type};
-use isa::RegClass;
-use regalloc::RegisterSet;
-use std::i32;
+use crate::abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
+use crate::ir::{self, AbiParam, ArgumentExtension, ArgumentLoc, ArgumentPurpose, Type};
+use crate::isa::RegClass;
+use crate::regalloc::RegisterSet;
+use core::i32;
 use target_lexicon::Triple;
 
 struct Args {
     pointer_bits: u8,
     pointer_bytes: u8,
     pointer_type: Type,
     regs: u32,
     reg_limit: u32,
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/binemit.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/binemit.rs
@@ -1,16 +1,16 @@
 //! Emitting binary RISC-V machine code.
 
-use binemit::{bad_encoding, CodeSink, Reloc};
-use ir::{Function, Inst, InstructionData};
-use isa::{RegUnit, StackBaseMask, StackRef};
-use predicates::is_signed_int;
-use regalloc::RegDiversions;
-use std::u32;
+use crate::binemit::{bad_encoding, CodeSink, Reloc};
+use crate::ir::{Function, Inst, InstructionData};
+use crate::isa::{RegUnit, StackBaseMask, StackRef};
+use crate::predicates::is_signed_int;
+use crate::regalloc::RegDiversions;
+use core::u32;
 
 include!(concat!(env!("OUT_DIR"), "/binemit-riscv.rs"));
 
 /// R-type instructions.
 ///
 ///   31     24  19  14     11 6
 ///   funct7 rs2 rs1 funct3 rd opcode
 ///       25  20  15     12  7      0
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/enc_tables.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/enc_tables.rs
@@ -1,16 +1,16 @@
 //! Encoding tables for RISC-V.
 
 use super::registers::*;
-use ir;
-use isa;
-use isa::constraints::*;
-use isa::enc_tables::*;
-use isa::encoding::{base_size, RecipeSizing};
+use crate::ir;
+use crate::isa;
+use crate::isa::constraints::*;
+use crate::isa::enc_tables::*;
+use crate::isa::encoding::{base_size, RecipeSizing};
 
 // Include the generated encoding tables:
 // - `LEVEL1_RV32`
 // - `LEVEL1_RV64`
 // - `LEVEL2`
 // - `ENCLIST`
 // - `INFO`
 include!(concat!(env!("OUT_DIR"), "/encoding-riscv.rs"));
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/mod.rs
@@ -3,25 +3,25 @@
 mod abi;
 mod binemit;
 mod enc_tables;
 mod registers;
 pub mod settings;
 
 use super::super::settings as shared_settings;
 #[cfg(feature = "testing_hooks")]
-use binemit::CodeSink;
-use binemit::{emit_function, MemoryCodeSink};
-use ir;
-use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
-use isa::Builder as IsaBuilder;
-use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
-use regalloc;
+use crate::binemit::CodeSink;
+use crate::binemit::{emit_function, MemoryCodeSink};
+use crate::ir;
+use crate::isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
+use crate::isa::Builder as IsaBuilder;
+use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
+use crate::regalloc;
+use core::fmt;
 use std::boxed::Box;
-use std::fmt;
 use target_lexicon::{PointerWidth, Triple};
 
 #[allow(dead_code)]
 struct Isa {
     triple: Triple,
     shared_flags: shared_settings::Flags,
     isa_flags: settings::Flags,
     cpumode: &'static [shared_enc_tables::Level1Entry<u16>],
@@ -120,23 +120,23 @@ impl TargetIsa for Isa {
 
     fn emit_function_to_memory(&self, func: &ir::Function, sink: &mut MemoryCodeSink) {
         emit_function(func, binemit::emit_inst, sink)
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use ir::{immediates, types};
-    use ir::{Function, InstructionData, Opcode};
-    use isa;
-    use settings::{self, Configurable};
-    use std::str::FromStr;
+    use crate::ir::{immediates, types};
+    use crate::ir::{Function, InstructionData, Opcode};
+    use crate::isa;
+    use crate::settings::{self, Configurable};
+    use core::str::FromStr;
     use std::string::{String, ToString};
-    use target_lexicon;
+    use target_lexicon::triple;
 
     fn encstr(isa: &isa::TargetIsa, enc: Result<isa::Encoding, isa::Legalize>) -> String {
         match enc {
             Ok(e) => isa.encoding_info().display(e).to_string(),
             Err(_) => "no encoding".to_string(),
         }
     }
 
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/registers.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/registers.rs
@@ -1,18 +1,18 @@
 //! RISC-V register descriptions.
 
-use isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
+use crate::isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
 
 include!(concat!(env!("OUT_DIR"), "/registers-riscv.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::{FPR, GPR, INFO};
-    use isa::RegUnit;
+    use crate::isa::RegUnit;
     use std::string::{String, ToString};
 
     #[test]
     fn unit_encodings() {
         assert_eq!(INFO.parse_regunit("x0"), Some(0));
         assert_eq!(INFO.parse_regunit("x31"), Some(31));
         assert_eq!(INFO.parse_regunit("f0"), Some(32));
         assert_eq!(INFO.parse_regunit("f31"), Some(63));
--- a/third_party/rust/cranelift-codegen/src/isa/riscv/settings.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/riscv/settings.rs
@@ -1,22 +1,22 @@
 //! RISC-V Settings.
 
-use settings::{self, detail, Builder};
-use std::fmt;
+use crate::settings::{self, detail, Builder};
+use core::fmt;
 
 // Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
 // `Flags` struct with an impl for all of the settings defined in
 // `lib/codegen/meta-python/isa/riscv/settings.py`.
 include!(concat!(env!("OUT_DIR"), "/settings-riscv.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::{builder, Flags};
-    use settings::{self, Configurable};
+    use crate::settings::{self, Configurable};
     use std::string::ToString;
 
     #[test]
     fn display_default() {
         let shared = settings::Flags::new(settings::builder());
         let b = builder();
         let f = Flags::new(&shared, b);
         assert_eq!(
--- a/third_party/rust/cranelift-codegen/src/isa/stack.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/stack.rs
@@ -1,16 +1,16 @@
 //! Low-level details of stack accesses.
 //!
 //! The `ir::StackSlots` type deals with stack slots and stack frame layout. The `StackRef` type
 //! defined in this module expresses the low-level details of accessing a stack slot from an
 //! encoded instruction.
 
-use ir::stackslot::{StackOffset, StackSlotKind, StackSlots};
-use ir::StackSlot;
+use crate::ir::stackslot::{StackOffset, StackSlotKind, StackSlots};
+use crate::ir::StackSlot;
 
 /// A method for referencing a stack slot in the current stack frame.
 ///
 /// Stack slots are addressed with a constant offset from a base register. The base can be the
 /// stack pointer, the frame pointer, or (in the future) a zone register pointing to an inner zone
 /// of a large stack frame.
 #[derive(Clone, Copy, Debug)]
 pub struct StackRef {
--- a/third_party/rust/cranelift-codegen/src/isa/x86/abi.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/abi.rs
@@ -1,25 +1,25 @@
 //! x86 ABI implementation.
 
 use super::registers::{FPR, GPR, RU};
-use abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
-use cursor::{Cursor, CursorPosition, EncCursor};
-use ir;
-use ir::immediates::Imm64;
-use ir::stackslot::{StackOffset, StackSize};
-use ir::{
+use crate::abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
+use crate::cursor::{Cursor, CursorPosition, EncCursor};
+use crate::ir;
+use crate::ir::immediates::Imm64;
+use crate::ir::stackslot::{StackOffset, StackSize};
+use crate::ir::{
     get_probestack_funcref, AbiParam, ArgumentExtension, ArgumentLoc, ArgumentPurpose, InstBuilder,
     ValueLoc,
 };
-use isa::{CallConv, RegClass, RegUnit, TargetIsa};
-use regalloc::RegisterSet;
-use result::CodegenResult;
-use stack_layout::layout_stack;
-use std::i32;
+use crate::isa::{CallConv, RegClass, RegUnit, TargetIsa};
+use crate::regalloc::RegisterSet;
+use crate::result::CodegenResult;
+use crate::stack_layout::layout_stack;
+use core::i32;
 use target_lexicon::{PointerWidth, Triple};
 
 /// Argument registers for x86-64
 static ARG_GPRS: [RU; 6] = [RU::rdi, RU::rsi, RU::rdx, RU::rcx, RU::r8, RU::r9];
 
 /// Return value registers.
 static RET_GPRS: [RU; 3] = [RU::rax, RU::rdx, RU::rcx];
 
@@ -94,17 +94,17 @@ impl ArgAssigner for Args {
             match arg.purpose {
                 // This is SpiderMonkey's `WasmTlsReg`.
                 ArgumentPurpose::VMContext => {
                     return ArgumentLoc::Reg(if self.pointer_bits == 64 {
                         RU::r14
                     } else {
                         RU::rsi
                     } as RegUnit)
-                    .into()
+                    .into();
                 }
                 // This is SpiderMonkey's `WasmTableCallSigReg`.
                 ArgumentPurpose::SignatureId => return ArgumentLoc::Reg(RU::r10 as RegUnit).into(),
                 _ => {}
             }
         }
 
         // Try to use a GPR.
@@ -506,17 +506,17 @@ fn insert_common_prologue(
             pos.ins().adjust_sp_down_imm(Imm64::new(stack_size));
         }
     }
 }
 
 /// Insert a check that generates a trap if the stack pointer goes
 /// below a value in `stack_limit_arg`.
 fn insert_stack_check(pos: &mut EncCursor, stack_size: i64, stack_limit_arg: ir::Value) {
-    use ir::condcodes::IntCC;
+    use crate::ir::condcodes::IntCC;
 
     // Copy `stack_limit_arg` into a %rax and use it for calculating
     // a SP threshold.
     let stack_limit_copy = pos.ins().copy(stack_limit_arg);
     pos.func.locations[stack_limit_copy] = ir::ValueLoc::Reg(RU::rax as RegUnit);
     let sp_threshold = pos.ins().iadd_imm(stack_limit_copy, stack_size);
     pos.func.locations[sp_threshold] = ir::ValueLoc::Reg(RU::rax as RegUnit);
 
--- a/third_party/rust/cranelift-codegen/src/isa/x86/binemit.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/binemit.rs
@@ -1,17 +1,17 @@
 //! Emitting binary x86 machine code.
 
 use super::enc_tables::{needs_offset, needs_sib_byte};
 use super::registers::RU;
-use binemit::{bad_encoding, CodeSink, Reloc};
-use ir::condcodes::{CondCode, FloatCC, IntCC};
-use ir::{Ebb, Function, Inst, InstructionData, JumpTable, Opcode, TrapCode};
-use isa::{RegUnit, StackBase, StackBaseMask, StackRef};
-use regalloc::RegDiversions;
+use crate::binemit::{bad_encoding, CodeSink, Reloc};
+use crate::ir::condcodes::{CondCode, FloatCC, IntCC};
+use crate::ir::{Ebb, Function, Inst, InstructionData, JumpTable, Opcode, TrapCode};
+use crate::isa::{RegUnit, StackBase, StackBaseMask, StackRef};
+use crate::regalloc::RegDiversions;
 
 include!(concat!(env!("OUT_DIR"), "/binemit-x86.rs"));
 
 // Convert a stack base to the corresponding register.
 fn stk_base(base: StackBase) -> RegUnit {
     let ru = match base {
         StackBase::SP => RU::rsp,
         StackBase::FP => RU::rbp,
@@ -265,17 +265,17 @@ fn sib<CS: CodeSink + ?Sized>(scale: u8,
 ///
 /// Add this offset to a base opcode for:
 ///
 /// ---- 0x70: Short conditional branch.
 /// 0x0f 0x80: Long conditional branch.
 /// 0x0f 0x90: SetCC.
 ///
 fn icc2opc(cond: IntCC) -> u16 {
-    use ir::condcodes::IntCC::*;
+    use crate::ir::condcodes::IntCC::*;
     match cond {
         // 0x0 = Overflow.
         // 0x1 = !Overflow.
         UnsignedLessThan => 0x2,
         UnsignedGreaterThanOrEqual => 0x3,
         Equal => 0x4,
         NotEqual => 0x5,
         UnsignedLessThanOrEqual => 0x6,
@@ -298,17 +298,17 @@ fn icc2opc(cond: IntCC) -> u16 {
 ///    ZPC OSA
 /// UN 111 000
 /// GT 000 000
 /// LT 001 000
 /// EQ 100 000
 ///
 /// Not all floating point condition codes are supported.
 fn fcc2opc(cond: FloatCC) -> u16 {
-    use ir::condcodes::FloatCC::*;
+    use crate::ir::condcodes::FloatCC::*;
     match cond {
         Ordered                    => 0xb, // EQ|LT|GT => *np (P=0)
         Unordered                  => 0xa, // UN       => *p  (P=1)
         OrderedNotEqual            => 0x5, // LT|GT    => *ne (Z=0),
         UnorderedOrEqual           => 0x4, // UN|EQ    => *e  (Z=1)
         GreaterThan                => 0x7, // GT       => *a  (C=0&Z=0)
         GreaterThanOrEqual         => 0x3, // GT|EQ    => *ae (C=0)
         UnorderedOrLessThan        => 0x2, // UN|LT    => *b  (C=1)
--- a/third_party/rust/cranelift-codegen/src/isa/x86/enc_tables.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/enc_tables.rs
@@ -1,23 +1,23 @@
 //! Encoding tables for x86 ISAs.
 
 use super::registers::*;
-use bitset::BitSet;
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::condcodes::IntCC;
-use ir::{self, Function, Inst, InstBuilder};
-use isa;
-use isa::constraints::*;
-use isa::enc_tables::*;
-use isa::encoding::base_size;
-use isa::encoding::RecipeSizing;
-use isa::RegUnit;
-use regalloc::RegDiversions;
+use crate::bitset::BitSet;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::condcodes::IntCC;
+use crate::ir::{self, Function, Inst, InstBuilder};
+use crate::isa;
+use crate::isa::constraints::*;
+use crate::isa::enc_tables::*;
+use crate::isa::encoding::base_size;
+use crate::isa::encoding::RecipeSizing;
+use crate::isa::RegUnit;
+use crate::regalloc::RegDiversions;
 
 include!(concat!(env!("OUT_DIR"), "/encoding-x86.rs"));
 include!(concat!(env!("OUT_DIR"), "/legalize-x86.rs"));
 
 pub fn needs_sib_byte(reg: RegUnit) -> bool {
     reg == RU::r12 as RegUnit || reg == RU::rsp as RegUnit
 }
 pub fn needs_offset(reg: RegUnit) -> bool {
@@ -223,17 +223,17 @@ fn expand_udivrem(
 /// Expand the `fmin` and `fmax` instructions using the x86 `x86_fmin` and `x86_fmax`
 /// instructions.
 fn expand_minmax(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::FloatCC;
+    use crate::ir::condcodes::FloatCC;
 
     let (x, y, x86_opc, bitwise_opc) = match func.dfg[inst] {
         ir::InstructionData::Binary {
             opcode: ir::Opcode::Fmin,
             args,
         } => (args[0], args[1], ir::Opcode::X86Fmin, ir::Opcode::Bor),
         ir::InstructionData::Binary {
             opcode: ir::Opcode::Fmax,
@@ -317,17 +317,17 @@ fn expand_minmax(
 /// x86 has no unsigned-to-float conversions. We handle the easy case of zero-extending i32 to
 /// i64 with a pattern, the rest needs more code.
 fn expand_fcvt_from_uint(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::IntCC;
+    use crate::ir::condcodes::IntCC;
 
     let x;
     match func.dfg[inst] {
         ir::InstructionData::Unary {
             opcode: ir::Opcode::FcvtFromUint,
             arg,
         } => x = arg,
         _ => panic!("Need fcvt_from_uint: {}", func.dfg.display_inst(inst, None)),
@@ -390,18 +390,18 @@ fn expand_fcvt_from_uint(
 }
 
 fn expand_fcvt_to_sint(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::{FloatCC, IntCC};
-    use ir::immediates::{Ieee32, Ieee64};
+    use crate::ir::condcodes::{FloatCC, IntCC};
+    use crate::ir::immediates::{Ieee32, Ieee64};
 
     let x = match func.dfg[inst] {
         ir::InstructionData::Unary {
             opcode: ir::Opcode::FcvtToSint,
             arg,
         } => arg,
         _ => panic!("Need fcvt_to_sint: {}", func.dfg.display_inst(inst, None)),
     };
@@ -486,18 +486,18 @@ fn expand_fcvt_to_sint(
 }
 
 fn expand_fcvt_to_sint_sat(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::{FloatCC, IntCC};
-    use ir::immediates::{Ieee32, Ieee64};
+    use crate::ir::condcodes::{FloatCC, IntCC};
+    use crate::ir::immediates::{Ieee32, Ieee64};
 
     let x = match func.dfg[inst] {
         ir::InstructionData::Unary {
             opcode: ir::Opcode::FcvtToSintSat,
             arg,
         } => arg,
         _ => panic!(
             "Need fcvt_to_sint_sat: {}",
@@ -606,18 +606,18 @@ fn expand_fcvt_to_sint_sat(
 }
 
 fn expand_fcvt_to_uint(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::{FloatCC, IntCC};
-    use ir::immediates::{Ieee32, Ieee64};
+    use crate::ir::condcodes::{FloatCC, IntCC};
+    use crate::ir::immediates::{Ieee32, Ieee64};
 
     let x = match func.dfg[inst] {
         ir::InstructionData::Unary {
             opcode: ir::Opcode::FcvtToUint,
             arg,
         } => arg,
         _ => panic!("Need fcvt_to_uint: {}", func.dfg.display_inst(inst, None)),
     };
@@ -688,18 +688,18 @@ fn expand_fcvt_to_uint(
 }
 
 fn expand_fcvt_to_uint_sat(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &isa::TargetIsa,
 ) {
-    use ir::condcodes::{FloatCC, IntCC};
-    use ir::immediates::{Ieee32, Ieee64};
+    use crate::ir::condcodes::{FloatCC, IntCC};
+    use crate::ir::immediates::{Ieee32, Ieee64};
 
     let x = match func.dfg[inst] {
         ir::InstructionData::Unary {
             opcode: ir::Opcode::FcvtToUintSat,
             arg,
         } => arg,
         _ => panic!(
             "Need fcvt_to_uint_sat: {}",
--- a/third_party/rust/cranelift-codegen/src/isa/x86/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/mod.rs
@@ -3,28 +3,28 @@
 mod abi;
 mod binemit;
 mod enc_tables;
 mod registers;
 pub mod settings;
 
 use super::super::settings as shared_settings;
 #[cfg(feature = "testing_hooks")]
-use binemit::CodeSink;
-use binemit::{emit_function, MemoryCodeSink};
-use ir;
-use isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
-use isa::Builder as IsaBuilder;
-use isa::{EncInfo, RegClass, RegInfo, TargetIsa};
-use regalloc;
-use result::CodegenResult;
+use crate::binemit::CodeSink;
+use crate::binemit::{emit_function, MemoryCodeSink};
+use crate::ir;
+use crate::isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encodings};
+use crate::isa::Builder as IsaBuilder;
+use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
+use crate::regalloc;
+use crate::result::CodegenResult;
+use crate::timing;
+use core::fmt;
 use std::boxed::Box;
-use std::fmt;
 use target_lexicon::{PointerWidth, Triple};
-use timing;
 
 #[allow(dead_code)]
 struct Isa {
     triple: Triple,
     shared_flags: shared_settings::Flags,
     isa_flags: settings::Flags,
     cpumode: &'static [shared_enc_tables::Level1Entry<u16>],
 }
--- a/third_party/rust/cranelift-codegen/src/isa/x86/registers.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/registers.rs
@@ -1,18 +1,18 @@
 //! x86 register descriptions.
 
-use isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
+use crate::isa::registers::{RegBank, RegClass, RegClassData, RegInfo, RegUnit};
 
 include!(concat!(env!("OUT_DIR"), "/registers-x86.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use isa::RegUnit;
+    use crate::isa::RegUnit;
     use std::string::{String, ToString};
 
     #[test]
     fn unit_encodings() {
         // The encoding of integer registers is not alphabetical.
         assert_eq!(INFO.parse_regunit("rax"), Some(0));
         assert_eq!(INFO.parse_regunit("rbx"), Some(3));
         assert_eq!(INFO.parse_regunit("rcx"), Some(1));
--- a/third_party/rust/cranelift-codegen/src/isa/x86/settings.rs
+++ b/third_party/rust/cranelift-codegen/src/isa/x86/settings.rs
@@ -1,22 +1,22 @@
 //! x86 Settings.
 
-use settings::{self, detail, Builder};
-use std::fmt;
+use crate::settings::{self, detail, Builder};
+use core::fmt;
 
 // Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
 // `Flags` struct with an impl for all of the settings defined in
 // `lib/codegen/meta-python/isa/x86/settings.py`.
 include!(concat!(env!("OUT_DIR"), "/settings-x86.rs"));
 
 #[cfg(test)]
 mod tests {
     use super::{builder, Flags};
-    use settings::{self, Configurable};
+    use crate::settings::{self, Configurable};
 
     #[test]
     fn presets() {
         let shared = settings::Flags::new(settings::builder());
 
         // Nehalem has SSE4.1 but not BMI1.
         let mut b0 = builder();
         b0.enable("nehalem").unwrap();
--- a/third_party/rust/cranelift-codegen/src/legalizer/boundary.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/boundary.rs
@@ -12,26 +12,27 @@
 //! 1. The `legalize_signatures` function rewrites all the preamble signatures with ABI information
 //!    and possibly new argument types. It also rewrites the entry block arguments to match.
 //! 2. The `handle_call_abi` and `handle_return_abi` functions rewrite call and return instructions
 //!    to match the new ABI signatures.
 //!
 //! Between the two phases, preamble signatures and call/return arguments don't match. This
 //! intermediate state doesn't type check.
 
-use abi::{legalize_abi_value, ValueConversion};
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::instructions::CallInfo;
-use ir::{
+use crate::abi::{legalize_abi_value, ValueConversion};
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::instructions::CallInfo;
+use crate::ir::{
     AbiParam, ArgumentLoc, ArgumentPurpose, DataFlowGraph, Ebb, Function, Inst, InstBuilder,
     SigRef, Signature, Type, Value, ValueLoc,
 };
-use isa::TargetIsa;
-use legalizer::split::{isplit, vsplit};
+use crate::isa::TargetIsa;
+use crate::legalizer::split::{isplit, vsplit};
+use log::debug;
 use std::vec::Vec;
 
 /// Legalize all the function signatures in `func`.
 ///
 /// This changes all signatures to be ABI-compliant with full `ArgumentLoc` annotations. It doesn't
 /// change the entry block arguments, calls, or return instructions, so this can leave the function
 /// in a state with type discrepancies.
 pub fn legalize_signatures(func: &mut Function, isa: &TargetIsa) {
--- a/third_party/rust/cranelift-codegen/src/legalizer/call.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/call.rs
@@ -1,17 +1,17 @@
 //! Legalization of calls.
 //!
 //! This module exports the `expand_call` function which transforms a `call`
 //! instruction into `func_addr` and `call_indirect` instructions.
 
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::{self, InstBuilder};
-use isa::TargetIsa;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::{self, InstBuilder};
+use crate::isa::TargetIsa;
 
 /// Expand a `call` instruction. This lowers it to a `call_indirect`, which
 /// is only done if the ABI doesn't support direct calls.
 pub fn expand_call(
     inst: ir::Inst,
     func: &mut ir::Function,
     _cfg: &mut ControlFlowGraph,
     isa: &TargetIsa,
--- a/third_party/rust/cranelift-codegen/src/legalizer/globalvalue.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/globalvalue.rs
@@ -1,17 +1,17 @@
 //! Legalization of global values.
 //!
 //! This module exports the `expand_global_value` function which transforms a `global_value`
 //! instruction into code that depends on the kind of global value referenced.
 
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::{self, InstBuilder};
-use isa::TargetIsa;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::{self, InstBuilder};
+use crate::isa::TargetIsa;
 
 /// Expand a `global_value` instruction according to the definition of the global value.
 pub fn expand_global_value(
     inst: ir::Inst,
     func: &mut ir::Function,
     _cfg: &mut ControlFlowGraph,
     isa: &TargetIsa,
 ) {
--- a/third_party/rust/cranelift-codegen/src/legalizer/heap.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/heap.rs
@@ -1,18 +1,18 @@
 //! Legalization of heaps.
 //!
 //! This module exports the `expand_heap_addr` function which transforms a `heap_addr`
 //! instruction into code that depends on the kind of heap referenced.
 
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::condcodes::IntCC;
-use ir::{self, InstBuilder};
-use isa::TargetIsa;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::condcodes::IntCC;
+use crate::ir::{self, InstBuilder};
+use crate::isa::TargetIsa;
 
 /// Expand a `heap_addr` instruction according to the definition of the heap.
 pub fn expand_heap_addr(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &TargetIsa,
 ) {
@@ -112,17 +112,17 @@ fn static_addr(
         let new_ebb = pos.func.dfg.make_ebb();
         pos.insert_ebb(new_ebb);
         cfg.recompute_ebb(pos.func, curr_ebb);
         cfg.recompute_ebb(pos.func, new_ebb);
         return;
     }
 
     // Check `offset > limit` which is now known non-negative.
-    let limit = bound - u64::from(access_size);
+    let limit = bound - access_size;
 
     // We may be able to omit the check entirely for 32-bit offsets if the heap bound is 4 GB or
     // more.
     if offset_ty != ir::types::I32 || limit < 0xffff_ffff {
         let oob = if limit & 1 == 1 {
             // Prefer testing `offset >= limit - 1` when limit is odd because an even number is
             // likely to be a convenient constant on ARM and other RISC architectures.
             pos.ins()
--- a/third_party/rust/cranelift-codegen/src/legalizer/libcall.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/libcall.rs
@@ -1,14 +1,14 @@
 //! Expanding instructions as runtime library calls.
 
-use ir;
-use ir::{get_libcall_funcref, InstBuilder};
-use isa::TargetIsa;
-use legalizer::boundary::legalize_libcall_signature;
+use crate::ir;
+use crate::ir::{get_libcall_funcref, InstBuilder};
+use crate::isa::TargetIsa;
+use crate::legalizer::boundary::legalize_libcall_signature;
 use std::vec::Vec;
 
 /// Try to expand `inst` as a library call, returning true is successful.
 pub fn expand_as_libcall(inst: ir::Inst, func: &mut ir::Function, isa: &TargetIsa) -> bool {
     // Does the opcode/ctrl_type combo even have a well-known runtime library name.
     let libcall = match ir::LibCall::for_inst(func.dfg[inst].opcode(), func.dfg.ctrl_typevar(inst))
     {
         Some(lc) => lc,
--- a/third_party/rust/cranelift-codegen/src/legalizer/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/mod.rs
@@ -8,23 +8,23 @@
 //! can be legal for one ISA and illegal for another.
 //!
 //! Besides transforming instructions, the legalizer also fills out the `function.encodings` map
 //! which provides a legal encoding recipe for every instruction.
 //!
 //! The legalizer does not deal with register allocation constraints. These constraints are derived
 //! from the encoding recipes, and solved later by the register allocator.
 
-use bitset::BitSet;
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::types::I32;
-use ir::{self, InstBuilder, MemFlags};
-use isa::TargetIsa;
-use timing;
+use crate::bitset::BitSet;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::types::I32;
+use crate::ir::{self, InstBuilder, MemFlags};
+use crate::isa::TargetIsa;
+use crate::timing;
 
 mod boundary;
 mod call;
 mod globalvalue;
 mod heap;
 mod libcall;
 mod split;
 mod table;
@@ -190,17 +190,17 @@ fn expand_br_table(
 
 /// Expand br_table to jump table.
 fn expand_br_table_jt(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     isa: &TargetIsa,
 ) {
-    use ir::condcodes::IntCC;
+    use crate::ir::condcodes::IntCC;
 
     let (arg, default_ebb, table) = match func.dfg[inst] {
         ir::InstructionData::BranchTable {
             opcode: ir::Opcode::BrTable,
             arg,
             destination,
             table,
         } => (arg, destination, table),
@@ -236,17 +236,17 @@ fn expand_br_table_jt(
 
 /// Expand br_table to series of conditionals.
 fn expand_br_table_conds(
     inst: ir::Inst,
     func: &mut ir::Function,
     cfg: &mut ControlFlowGraph,
     _isa: &TargetIsa,
 ) {
-    use ir::condcodes::IntCC;
+    use crate::ir::condcodes::IntCC;
 
     let (arg, default_ebb, table) = match func.dfg[inst] {
         ir::InstructionData::BranchTable {
             opcode: ir::Opcode::BrTable,
             arg,
             destination,
             table,
         } => (arg, destination, table),
--- a/third_party/rust/cranelift-codegen/src/legalizer/split.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/split.rs
@@ -59,20 +59,20 @@
 //! If all instructions that produce an `i64` value are legalized as above, we will eventually end
 //! up with no `i64` values anywhere, except for EBB arguments. We can work around this by
 //! iteratively splitting EBB arguments too. That should leave us with no illegal value types
 //! anywhere.
 //!
 //! It is possible to have circular dependencies of EBB arguments that are never used by any real
 //! instructions. These loops will remain in the program.
 
-use cursor::{Cursor, CursorPosition, FuncCursor};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::{self, Ebb, Inst, InstBuilder, InstructionData, Opcode, Type, Value, ValueDef};
-use std::iter;
+use crate::cursor::{Cursor, CursorPosition, FuncCursor};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::{self, Ebb, Inst, InstBuilder, InstructionData, Opcode, Type, Value, ValueDef};
+use core::iter;
 use std::vec::Vec;
 
 /// Split `value` into two values using the `isplit` semantics. Do this by reusing existing values
 /// if possible.
 pub fn isplit(
     func: &mut ir::Function,
     cfg: &ControlFlowGraph,
     pos: CursorPosition,
--- a/third_party/rust/cranelift-codegen/src/legalizer/table.rs
+++ b/third_party/rust/cranelift-codegen/src/legalizer/table.rs
@@ -1,19 +1,19 @@
 //! Legalization of tables.
 //!
 //! This module exports the `expand_table_addr` function which transforms a `table_addr`
 //! instruction into code that depends on the kind of table referenced.
 
-use cursor::{Cursor, FuncCursor};
-use flowgraph::ControlFlowGraph;
-use ir::condcodes::IntCC;
-use ir::immediates::Offset32;
-use ir::{self, InstBuilder};
-use isa::TargetIsa;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::condcodes::IntCC;
+use crate::ir::immediates::Offset32;
+use crate::ir::{self, InstBuilder};
+use crate::isa::TargetIsa;
 
 /// Expand a `table_addr` instruction according to the definition of the table.
 pub fn expand_table_addr(
     inst: ir::Inst,
     func: &mut ir::Function,
     _cfg: &mut ControlFlowGraph,
     _isa: &TargetIsa,
 ) {
--- a/third_party/rust/cranelift-codegen/src/lib.rs
+++ b/third_party/rust/cranelift-codegen/src/lib.rs
@@ -1,96 +1,89 @@
 //! Cranelift code generation library.
 
 #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
 #![warn(unused_import_braces)]
 #![cfg_attr(feature = "std", deny(unstable_features))]
 #![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
 #![cfg_attr(feature="cargo-clippy", allow(
 // Produces only a false positive:
-                while_let_loop,
+                clippy::while_let_loop,
 // Produces many false positives, but did produce some valid lints, now fixed:
-                needless_lifetimes,
+                clippy::needless_lifetimes,
 // Generated code makes some style transgressions, but readability doesn't suffer much:
-                many_single_char_names,
-                identity_op,
-                needless_borrow,
-                cast_lossless,
-                unreadable_literal,
-                assign_op_pattern,
-                empty_line_after_outer_attr,
+                clippy::many_single_char_names,
+                clippy::identity_op,
+                clippy::needless_borrow,
+                clippy::cast_lossless,
+                clippy::unreadable_literal,
+                clippy::assign_op_pattern,
+                clippy::empty_line_after_outer_attr,
 // Hard to avoid in generated code:
-                cyclomatic_complexity,
-                too_many_arguments,
+                clippy::cyclomatic_complexity,
+                clippy::too_many_arguments,
 // Code generator doesn't have a way to collapse identical arms:
-                match_same_arms,
+                clippy::match_same_arms,
 // These are relatively minor style issues, but would be easy to fix:
-                new_without_default,
-                new_without_default_derive,
-                should_implement_trait,
-                len_without_is_empty))]
+                clippy::new_without_default,
+                clippy::new_without_default_derive,
+                clippy::should_implement_trait,
+                clippy::len_without_is_empty))]
 #![cfg_attr(
     feature = "cargo-clippy",
     warn(
         clippy::float_arithmetic,
         clippy::mut_mut,
         clippy::nonminimal_bool,
         clippy::option_map_unwrap_or,
         clippy::option_map_unwrap_or_else,
         clippy::print_stdout,
         clippy::unicode_not_nfc,
         clippy::use_self
     )
 )]
-// Turns on no_std and alloc features if std is not available.
-#![cfg_attr(not(feature = "std"), no_std)]
+#![no_std]
 #![cfg_attr(not(feature = "std"), feature(alloc))]
-// TODO: Remove this workaround once https://github.com/rust-lang/rust/issues/27747 is done.
-#![cfg_attr(not(feature = "std"), feature(slice_concat_ext))]
 
 #[cfg(not(feature = "std"))]
 #[macro_use]
-extern crate alloc;
-extern crate failure;
+extern crate alloc as std;
+#[cfg(feature = "std")]
 #[macro_use]
-extern crate failure_derive;
-#[cfg_attr(test, macro_use)]
-extern crate target_lexicon;
-
-#[macro_use]
-extern crate log;
+extern crate std;
 
-pub use context::Context;
-pub use legalizer::legalize_function;
-pub use verifier::verify_function;
-pub use write::write_function;
+#[cfg(not(feature = "std"))]
+use hashmap_core::{map as hash_map, HashMap, HashSet};
+#[cfg(feature = "std")]
+use std::collections::{hash_map, HashMap, HashSet};
 
-/// Version number of the cranelift-codegen crate.
-pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+pub use crate::context::Context;
+pub use crate::legalizer::legalize_function;
+pub use crate::verifier::verify_function;
+pub use crate::write::write_function;
 
-#[macro_use]
-pub extern crate cranelift_entity as entity;
-pub extern crate cranelift_bforest as bforest;
+pub use cranelift_bforest as bforest;
+pub use cranelift_entity as entity;
 
 pub mod binemit;
 pub mod cfg_printer;
 pub mod cursor;
 pub mod dbg;
 pub mod dominator_tree;
 pub mod flowgraph;
 pub mod ir;
 pub mod isa;
 pub mod loop_analysis;
 pub mod print_errors;
 pub mod settings;
 pub mod timing;
 pub mod verifier;
 pub mod write;
 
-pub use entity::packed_option;
+pub use crate::entity::packed_option;
 
 mod abi;
 mod bitset;
 mod constant_hash;
 mod context;
 mod dce;
 mod divconst_magic_numbers;
 mod fx;
@@ -106,24 +99,12 @@ mod regalloc;
 mod result;
 mod scoped_hash_map;
 mod simple_gvn;
 mod simple_preopt;
 mod stack_layout;
 mod topo_order;
 mod unreachable_code;
 
-pub use result::{CodegenError, CodegenResult};
+pub use crate::result::{CodegenError, CodegenResult};
 
-/// This replaces `std` in builds with `core`.
-#[cfg(not(feature = "std"))]
-mod std {
-    pub use alloc::{boxed, slice, string, vec};
-    pub use core::*;
-    pub mod collections {
-        #[allow(unused_extern_crates)]
-        extern crate hashmap_core;
-
-        pub use self::hashmap_core::map as hash_map;
-        pub use self::hashmap_core::{HashMap, HashSet};
-        pub use alloc::collections::BTreeSet;
-    }
-}
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
--- a/third_party/rust/cranelift-codegen/src/licm.rs
+++ b/third_party/rust/cranelift-codegen/src/licm.rs
@@ -1,20 +1,20 @@
 //! A Loop Invariant Code Motion optimization pass
 
-use cursor::{Cursor, EncCursor, FuncCursor};
-use dominator_tree::DominatorTree;
-use entity::{EntityList, ListPool};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use fx::FxHashSet;
-use ir::{DataFlowGraph, Ebb, Function, Inst, InstBuilder, Layout, Opcode, Type, Value};
-use isa::TargetIsa;
-use loop_analysis::{Loop, LoopAnalysis};
+use crate::cursor::{Cursor, EncCursor, FuncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::entity::{EntityList, ListPool};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::fx::FxHashSet;
+use crate::ir::{DataFlowGraph, Ebb, Function, Inst, InstBuilder, Layout, Opcode, Type, Value};
+use crate::isa::TargetIsa;
+use crate::loop_analysis::{Loop, LoopAnalysis};
+use crate::timing;
 use std::vec::Vec;
-use timing;
 
 /// Performs the LICM pass by detecting loops within the CFG and moving
 /// loop-invariant instructions out of them.
 /// Changes the CFG and domtree in-place during the operation.
 pub fn do_licm(
     isa: &TargetIsa,
     func: &mut Function,
     cfg: &mut ControlFlowGraph,
@@ -186,17 +186,17 @@ fn remove_loop_invariant_instructions(
     let mut pos = FuncCursor::new(func);
     // We traverse the loop EBB in reverse post-order.
     for ebb in postorder_ebbs_loop(loop_analysis, cfg, lp).iter().rev() {
         // Arguments of the EBB are loop values
         for val in pos.func.dfg.ebb_params(*ebb) {
             loop_values.insert(*val);
         }
         pos.goto_top(*ebb);
-        #[cfg_attr(feature = "cargo-clippy", allow(block_in_if_condition_stmt))]
+        #[cfg_attr(feature = "cargo-clippy", allow(clippy::block_in_if_condition_stmt))]
         while let Some(inst) = pos.next_inst() {
             if is_loop_invariant(inst, &pos.func.dfg, &loop_values) {
                 // If all the instruction's argument are defined outside the loop
                 // then this instruction is loop-invariant
                 invariant_insts.push(inst);
                 // We remove it from the loop
                 pos.remove_inst_and_step_back();
             } else {
--- a/third_party/rust/cranelift-codegen/src/loop_analysis.rs
+++ b/third_party/rust/cranelift-codegen/src/loop_analysis.rs
@@ -1,19 +1,20 @@
 //! A loop analysis represented as mappings of loops to their header Ebb
 //! and parent in the loop tree.
 
-use dominator_tree::DominatorTree;
-use entity::SecondaryMap;
-use entity::{Keys, PrimaryMap};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::{Ebb, Function, Layout};
-use packed_option::PackedOption;
+use crate::dominator_tree::DominatorTree;
+use crate::entity::entity_impl;
+use crate::entity::SecondaryMap;
+use crate::entity::{Keys, PrimaryMap};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::{Ebb, Function, Layout};
+use crate::packed_option::PackedOption;
+use crate::timing;
 use std::vec::Vec;
-use timing;
 
 /// A opaque reference to a code loop.
 #[derive(Copy, Clone, PartialEq, Eq, Hash)]
 pub struct Loop(u32);
 entity_impl!(Loop, "loop");
 
 /// Loop tree information for a single function.
 ///
@@ -113,17 +114,17 @@ impl LoopAnalysis {
     ///
     /// Note that this doesn't perform any kind of validity checks. It simply checks if the
     /// `compute()` method has been called since the last `clear()`. It does not check that the
     /// loop analysis is consistent with the CFG.
     pub fn is_valid(&self) -> bool {
         self.valid
     }
 
-    /// Clear all the data structures contanted in the loop analysis. This will leave the
+    /// Clear all the data structures contained in the loop analysis. This will leave the
     /// analysis in a similar state to a context returned by `new()` except that allocated
     /// memory be retained.
     pub fn clear(&mut self) {
         self.loops.clear();
         self.ebb_loop_map.clear();
         self.valid = false;
     }
 
@@ -186,17 +187,17 @@ impl LoopAnalysis {
                     }
                     Some(node_loop) => {
                         // We copy the node_loop into a mutable reference passed along the while
                         let mut node_loop = node_loop;
                         // The node is part of a loop, which can be lp or an inner loop
                         let mut node_loop_parent_option = self.loops[node_loop].parent;
                         while let Some(node_loop_parent) = node_loop_parent_option.expand() {
                             if node_loop_parent == lp {
-                                // We have encounterd lp so we stop (already visited)
+                                // We have encountered lp so we stop (already visited)
                                 break;
                             } else {
                                 //
                                 node_loop = node_loop_parent;
                                 // We lookup the parent loop
                                 node_loop_parent_option = self.loops[node_loop].parent;
                             }
                         }
@@ -226,21 +227,21 @@ impl LoopAnalysis {
                 }
             }
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use cursor::{Cursor, FuncCursor};
-    use dominator_tree::DominatorTree;
-    use flowgraph::ControlFlowGraph;
-    use ir::{types, Function, InstBuilder};
-    use loop_analysis::{Loop, LoopAnalysis};
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::dominator_tree::DominatorTree;
+    use crate::flowgraph::ControlFlowGraph;
+    use crate::ir::{types, Function, InstBuilder};
+    use crate::loop_analysis::{Loop, LoopAnalysis};
     use std::vec::Vec;
 
     #[test]
     fn nested_loops_detection() {
         let mut func = Function::new();
         let ebb0 = func.dfg.make_ebb();
         let ebb1 = func.dfg.make_ebb();
         let ebb2 = func.dfg.make_ebb();
--- a/third_party/rust/cranelift-codegen/src/nan_canonicalization.rs
+++ b/third_party/rust/cranelift-codegen/src/nan_canonicalization.rs
@@ -1,19 +1,19 @@
 //! A NaN-canonicalizing rewriting pass. Patch floating point arithmetic
 //! instructions that may return a NaN result with a sequence of operations
 //! that will replace nondeterministic NaN's with a single canonical NaN value.
 
-use cursor::{Cursor, FuncCursor};
-use ir::condcodes::FloatCC;
-use ir::immediates::{Ieee32, Ieee64};
-use ir::types;
-use ir::types::Type;
-use ir::{Function, Inst, InstBuilder, InstructionData, Opcode, Value};
-use timing;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::ir::condcodes::FloatCC;
+use crate::ir::immediates::{Ieee32, Ieee64};
+use crate::ir::types;
+use crate::ir::types::Type;
+use crate::ir::{Function, Inst, InstBuilder, InstructionData, Opcode, Value};
+use crate::timing;
 
 // Canonical 32-bit and 64-bit NaN values.
 static CANON_32BIT_NAN: u32 = 0b01111111110000000000000000000000;
 static CANON_64BIT_NAN: u64 = 0b0111111111111000000000000000000000000000000000000000000000000000;
 
 /// Perform the NaN canonicalization pass.
 pub fn do_nan_canonicalization(func: &mut Function) {
     let _tt = timing::canonicalize_nans();
--- a/third_party/rust/cranelift-codegen/src/partition_slice.rs
+++ b/third_party/rust/cranelift-codegen/src/partition_slice.rs
@@ -1,11 +1,11 @@
 //! Rearrange the elements in a slice according to a predicate.
 
-use std::mem;
+use core::mem;
 
 /// Rearrange the elements of the mutable slice `s` such that elements where `p(t)` is true precede
 /// the elements where `p(t)` is false.
 ///
 /// The order of elements is not preserved, unless the slice is already partitioned.
 ///
 /// Returns the number of elements where `p(t)` is true.
 pub fn partition_slice<T, F>(s: &mut [T], mut p: F) -> usize
--- a/third_party/rust/cranelift-codegen/src/postopt.rs
+++ b/third_party/rust/cranelift-codegen/src/postopt.rs
@@ -1,20 +1,20 @@
 //! A post-legalization rewriting pass.
 
 #![allow(non_snake_case)]
 
-use cursor::{Cursor, EncCursor};
-use ir::condcodes::{CondCode, FloatCC, IntCC};
-use ir::dfg::ValueDef;
-use ir::immediates::{Imm64, Offset32};
-use ir::instructions::{Opcode, ValueList};
-use ir::{Ebb, Function, Inst, InstBuilder, InstructionData, MemFlags, Type, Value};
-use isa::TargetIsa;
-use timing;
+use crate::cursor::{Cursor, EncCursor};
+use crate::ir::condcodes::{CondCode, FloatCC, IntCC};
+use crate::ir::dfg::ValueDef;
+use crate::ir::immediates::{Imm64, Offset32};
+use crate::ir::instructions::{Opcode, ValueList};
+use crate::ir::{Ebb, Function, Inst, InstBuilder, InstructionData, MemFlags, Type, Value};
+use crate::isa::TargetIsa;
+use crate::timing;
 
 /// Information collected about a compare+branch sequence.
 struct CmpBrInfo {
     /// The branch instruction.
     br_inst: Inst,
     /// The icmp, icmp_imm, or fcmp instruction.
     cmp_inst: Inst,
     /// The destination of the branch.
--- a/third_party/rust/cranelift-codegen/src/predicates.rs
+++ b/third_party/rust/cranelift-codegen/src/predicates.rs
@@ -4,17 +4,17 @@
 //! `lib/codegen/meta-python/cdsl/predicates.py` classes.
 //!
 //! The predicates the operate on integer fields use `Into<i64>` as a shared trait bound. This
 //! bound is implemented by all the native integer types as well as `Imm64`.
 //!
 //! Some of these predicates may be unused in certain ISA configurations, so we suppress the
 //! dead code warning.
 
-use ir;
+use crate::ir;
 
 /// Check that a 64-bit floating point value is zero.
 #[allow(dead_code)]
 pub fn is_zero_64_bit_float<T: Into<ir::immediates::Ieee64>>(x: T) -> bool {
     let x64 = x.into();
     x64.bits() == 0
 }
 
@@ -88,17 +88,17 @@ mod tests {
         assert!(is_unsigned_int(x2, 1, 0));
         assert!(!is_unsigned_int(x2, 8, 4));
         assert!(!is_unsigned_int(x3, 1, 0));
         assert!(is_unsigned_int(x3, 32, 4));
     }
 
     #[test]
     fn cvt_imm64() {
-        use ir::immediates::Imm64;
+        use crate::ir::immediates::Imm64;
 
         let x1 = Imm64::new(-8);
         let x2 = Imm64::new(8);
 
         assert!(is_signed_int(x1, 16, 2));
         assert!(is_signed_int(x2, 16, 2));
         assert!(!is_signed_int(x1, 16, 4));
         assert!(!is_signed_int(x2, 16, 4));
--- a/third_party/rust/cranelift-codegen/src/print_errors.rs
+++ b/third_party/rust/cranelift-codegen/src/print_errors.rs
@@ -1,23 +1,23 @@
 //! Utility routines for pretty-printing error messages.
 
-use entity::SecondaryMap;
-use ir;
-use ir::entities::{AnyEntity, Ebb, Inst, Value};
-use ir::function::Function;
-use isa::TargetIsa;
-use result::CodegenError;
+use crate::entity::SecondaryMap;
+use crate::ir;
+use crate::ir::entities::{AnyEntity, Ebb, Inst, Value};
+use crate::ir::function::Function;
+use crate::isa::TargetIsa;
+use crate::result::CodegenError;
+use crate::verifier::{VerifierError, VerifierErrors};
+use crate::write::{decorate_function, FuncWriter, PlainWriter};
+use core::fmt;
+use core::fmt::Write;
 use std::boxed::Box;
-use std::fmt;
-use std::fmt::Write;
 use std::string::{String, ToString};
 use std::vec::Vec;
-use verifier::{VerifierError, VerifierErrors};
-use write::{decorate_function, FuncWriter, PlainWriter};
 
 /// Pretty-print a verifier error.
 pub fn pretty_verifier_error<'a>(
     func: &ir::Function,
     isa: Option<&TargetIsa>,
     func_w: Option<Box<FuncWriter + 'a>>,
     errors: VerifierErrors,
 ) -> String {
--- a/third_party/rust/cranelift-codegen/src/ref_slice.rs
+++ b/third_party/rust/cranelift-codegen/src/ref_slice.rs
@@ -2,17 +2,17 @@
 //!
 //! See also the [`ref_slice` crate](https://crates.io/crates/ref_slice).
 //!
 //! We define the functions here to avoid external dependencies, and to ensure that they are
 //! inlined in this crate.
 //!
 //! Despite their using an unsafe block, these functions are completely safe.
 
-use std::slice;
+use core::slice;
 
 pub fn ref_slice<T>(s: &T) -> &[T] {
     unsafe { slice::from_raw_parts(s, 1) }
 }
 
 pub fn ref_slice_mut<T>(s: &mut T) -> &mut [T] {
     unsafe { slice::from_raw_parts_mut(s, 1) }
 }
--- a/third_party/rust/cranelift-codegen/src/regalloc/affinity.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/affinity.rs
@@ -3,19 +3,19 @@
 //! An SSA value's affinity is a hint used to guide the register allocator. It specifies the class
 //! of allocation that is likely to cause the least amount of fixup moves in order to satisfy
 //! instruction operand constraints.
 //!
 //! For values that want to be in registers, the affinity hint includes a register class or
 //! subclass. This is just a hint, and the register allocator is allowed to pick a register from a
 //! larger register class instead.
 
-use ir::{AbiParam, ArgumentLoc};
-use isa::{ConstraintKind, OperandConstraint, RegClassIndex, RegInfo, TargetIsa};
-use std::fmt;
+use crate::ir::{AbiParam, ArgumentLoc};
+use crate::isa::{ConstraintKind, OperandConstraint, RegClassIndex, RegInfo, TargetIsa};
+use core::fmt;
 
 /// Preferred register allocation for an SSA value.
 #[derive(Clone, Copy, Debug)]
 pub enum Affinity {
     /// No affinity.
     ///
     /// This indicates a value that is not defined or used by any real instructions. It is a ghost
     /// value that won't appear in the final program.
--- a/third_party/rust/cranelift-codegen/src/regalloc/coalescing.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/coalescing.rs
@@ -1,32 +1,33 @@
 //! Constructing Conventional SSA form.
 //!
 //! Conventional SSA (CSSA) form is a subset of SSA form where any (transitively) phi-related
 //! values do not interfere. We construct CSSA by building virtual registers that are as large as
 //! possible and inserting copies where necessary such that all argument values passed to an EBB
 //! parameter will belong to the same virtual register as the EBB parameter value itself.
 
-use cursor::{Cursor, EncCursor};
-use dbg::DisplayList;
-use dominator_tree::{DominatorTree, DominatorTreePreorder};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use fx::FxHashMap;
-use ir::{self, InstBuilder, ProgramOrder};
-use ir::{Ebb, ExpandedProgramPoint, Function, Inst, Value};
-use isa::{EncInfo, TargetIsa};
-use regalloc::affinity::Affinity;
-use regalloc::liveness::Liveness;
-use regalloc::virtregs::{VirtReg, VirtRegs};
-use std::cmp;
-use std::fmt;
-use std::iter;
-use std::slice;
+use crate::cursor::{Cursor, EncCursor};
+use crate::dbg::DisplayList;
+use crate::dominator_tree::{DominatorTree, DominatorTreePreorder};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::fx::FxHashMap;
+use crate::ir::{self, InstBuilder, ProgramOrder};
+use crate::ir::{Ebb, ExpandedProgramPoint, Function, Inst, Value};
+use crate::isa::{EncInfo, TargetIsa};
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::virtregs::{VirtReg, VirtRegs};
+use crate::timing;
+use core::cmp;
+use core::fmt;
+use core::iter;
+use core::slice;
+use log::debug;
 use std::vec::Vec;
-use timing;
 
 // # Implementation
 //
 // The coalescing algorithm implemented follows this paper fairly closely:
 //
 //     Budimlic, Z., Cooper, K. D., Harvey, T. J., et al. (2002). Fast copy coalescing and
 //     live-range identification (Vol. 37, pp. 25–32). ACM. https://doi.org/10.1145/543552.512534
 //
--- a/third_party/rust/cranelift-codegen/src/regalloc/coloring.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/coloring.rs
@@ -37,32 +37,33 @@
 //!
 //! The first time we see a branch to an EBB, the EBB's argument values are colored to match the
 //! registers currently holding branch argument values passed to the predecessor branch. By
 //! visiting EBBs in a CFG topological order, we guarantee that at least one predecessor branch has
 //! been visited before the destination EBB. Therefore, the EBB's arguments are already colored.
 //!
 //! The exception is the entry block whose arguments are colored from the ABI requirements.
 
-use cursor::{Cursor, EncCursor};
-use dominator_tree::DominatorTree;
-use ir::{AbiParam, ArgumentLoc, InstBuilder, ValueDef};
-use ir::{Ebb, Function, Inst, Layout, SigRef, Value, ValueLoc};
-use isa::{regs_overlap, RegClass, RegInfo, RegUnit};
-use isa::{ConstraintKind, EncInfo, OperandConstraint, RecipeConstraints, TargetIsa};
-use packed_option::PackedOption;
-use regalloc::affinity::Affinity;
-use regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
-use regalloc::liveness::Liveness;
-use regalloc::liverange::{LiveRange, LiveRangeContext};
-use regalloc::register_set::RegisterSet;
-use regalloc::solver::{Solver, SolverError};
-use regalloc::RegDiversions;
-use std::mem;
-use timing;
+use crate::cursor::{Cursor, EncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::ir::{AbiParam, ArgumentLoc, InstBuilder, ValueDef};
+use crate::ir::{Ebb, Function, Inst, Layout, SigRef, Value, ValueLoc};
+use crate::isa::{regs_overlap, RegClass, RegInfo, RegUnit};
+use crate::isa::{ConstraintKind, EncInfo, OperandConstraint, RecipeConstraints, TargetIsa};
+use crate::packed_option::PackedOption;
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::liverange::{LiveRange, LiveRangeContext};
+use crate::regalloc::register_set::RegisterSet;
+use crate::regalloc::solver::{Solver, SolverError};
+use crate::regalloc::RegDiversions;
+use crate::timing;
+use core::mem;
+use log::debug;
 
 /// Data structures for the coloring pass.
 ///
 /// These are scratch space data structures that can be reused between invocations.
 pub struct Coloring {
     divert: RegDiversions,
     solver: Solver,
 }
@@ -649,36 +650,36 @@ impl<'a> Context<'a> {
     }
 
     /// Find all diverted registers where `pred` returns `true` and undo their diversion so they
     /// are reallocated to their global register assignments.
     fn undivert_regs<Pred>(&mut self, mut pred: Pred)
     where
         Pred: FnMut(&LiveRange, LiveRangeContext<Layout>) -> bool,
     {
-        for rdiv in self.divert.all() {
+        for (&value, rdiv) in self.divert.iter() {
             let lr = self
                 .liveness
-                .get(rdiv.value)
+                .get(value)
                 .expect("Missing live range for diverted register");
             if pred(lr, self.liveness.context(&self.cur.func.layout)) {
                 if let Affinity::Reg(rci) = lr.affinity {
                     let rc = self.reginfo.rc(rci);
                     // Stack diversions should not be possible here. The only live transiently
                     // during `shuffle_inputs()`.
                     self.solver.reassign_in(
-                        rdiv.value,
+                        value,
                         rc,
                         rdiv.to.unwrap_reg(),
                         rdiv.from.unwrap_reg(),
                     );
                 } else {
                     panic!(
                         "Diverted register {} with {} affinity",
-                        rdiv.value,
+                        value,
                         lr.affinity.display(&self.reginfo)
                     );
                 }
             }
         }
     }
 
     // Find existing live values that conflict with the fixed input register constraints programmed
@@ -896,17 +897,17 @@ impl<'a> Context<'a> {
     }
 
     /// Determine if `value` is live on a CFG edge from the current instruction.
     ///
     /// This means that the current instruction is a branch and `value` is live in to one of the
     /// branch destinations. Branch arguments and EBB parameters are not considered live on the
     /// edge.
     fn is_live_on_outgoing_edge(&self, value: Value) -> bool {
-        use ir::instructions::BranchInfo::*;
+        use crate::ir::instructions::BranchInfo::*;
 
         let inst = self.cur.current_inst().expect("Not on an instruction");
         let ctx = self.liveness.context(&self.cur.func.layout);
         match self.cur.func.dfg.analyze_branch(inst) {
             NotABranch => false,
             SingleDest(ebb, _) => {
                 let lr = &self.liveness[value];
                 lr.is_livein(ebb, ctx)
@@ -925,17 +926,17 @@ impl<'a> Context<'a> {
     /// Emit `regmove` instructions as needed to move the live registers into place before the
     /// instruction. Also update `self.divert` accordingly.
     ///
     /// The `self.cur` cursor is expected to point at the instruction. The register moves are
     /// inserted before.
     ///
     /// The solver needs to be reminded of the available registers before any moves are inserted.
     fn shuffle_inputs(&mut self, regs: &mut RegisterSet) {
-        use regalloc::solver::Move::*;
+        use crate::regalloc::solver::Move::*;
 
         let spills = self.solver.schedule_moves(regs);
 
         // The move operations returned by `schedule_moves` refer to emergency spill slots by
         // consecutive indexes starting from 0. Map these to real stack slots.
         // It is very unlikely (impossible?) that we would need more than one spill per top-level
         // register class, so avoid allocation by using a fixed array here.
         let mut slot = [PackedOption::default(); 8];
--- a/third_party/rust/cranelift-codegen/src/regalloc/context.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/context.rs
@@ -1,29 +1,31 @@
 //! Register allocator context.
 //!
 //! The `Context` struct contains data structures that should be preserved across invocations of
 //! the register allocator algorithm. This doesn't preserve any data between functions, but it
 //! avoids allocating data structures independently for each function begin compiled.
 
-use dominator_tree::DominatorTree;
-use flowgraph::ControlFlowGraph;
-use ir::Function;
-use isa::TargetIsa;
-use regalloc::coalescing::Coalescing;
-use regalloc::coloring::Coloring;
-use regalloc::live_value_tracker::LiveValueTracker;
-use regalloc::liveness::Liveness;
-use regalloc::reload::Reload;
-use regalloc::spilling::Spilling;
-use regalloc::virtregs::VirtRegs;
-use result::CodegenResult;
-use timing;
-use topo_order::TopoOrder;
-use verifier::{verify_context, verify_cssa, verify_liveness, verify_locations, VerifierErrors};
+use crate::dominator_tree::DominatorTree;
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir::Function;
+use crate::isa::TargetIsa;
+use crate::regalloc::coalescing::Coalescing;
+use crate::regalloc::coloring::Coloring;
+use crate::regalloc::live_value_tracker::LiveValueTracker;
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::reload::Reload;
+use crate::regalloc::spilling::Spilling;
+use crate::regalloc::virtregs::VirtRegs;
+use crate::result::CodegenResult;
+use crate::timing;
+use crate::topo_order::TopoOrder;
+use crate::verifier::{
+    verify_context, verify_cssa, verify_liveness, verify_locations, VerifierErrors,
+};
 
 /// Persistent memory allocations for register allocation.
 pub struct Context {
     liveness: Liveness,
     virtregs: VirtRegs,
     coalescing: Coalescing,
     topo: TopoOrder,
     tracker: LiveValueTracker,
--- a/third_party/rust/cranelift-codegen/src/regalloc/diversion.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/diversion.rs
@@ -2,78 +2,77 @@
 //!
 //! Normally, a value is assigned to a single register or stack location by the register allocator.
 //! Sometimes, it is necessary to move register values to a different register in order to satisfy
 //! instruction constraints.
 //!
 //! These register diversions are local to an EBB. No values can be diverted when entering a new
 //! EBB.
 
-use ir::{InstructionData, Opcode};
-use ir::{StackSlot, Value, ValueLoc, ValueLocations};
-use isa::{RegInfo, RegUnit};
-use std::fmt;
-use std::vec::Vec;
+use crate::fx::FxHashMap;
+use crate::hash_map::{Entry, Iter};
+use crate::ir::{InstructionData, Opcode};
+use crate::ir::{StackSlot, Value, ValueLoc, ValueLocations};
+use crate::isa::{RegInfo, RegUnit};
+use core::fmt;
 
 /// A diversion of a value from its original location to a new register or stack location.
 ///
 /// In IR, a diversion is represented by a `regmove` instruction, possibly a chain of them for the
 /// same value.
 ///
 /// When tracking diversions, the `from` field is the original assigned value location, and `to` is
 /// the current one.
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub struct Diversion {
-    /// The value that is diverted.
-    pub value: Value,
     /// The original value location.
     pub from: ValueLoc,
     /// The current value location.
     pub to: ValueLoc,
 }
 
 impl Diversion {
     /// Make a new diversion.
-    pub fn new(value: Value, from: ValueLoc, to: ValueLoc) -> Self {
+    pub fn new(from: ValueLoc, to: ValueLoc) -> Self {
         debug_assert!(from.is_assigned() && to.is_assigned());
-        Self { value, from, to }
+        Self { from, to }
     }
 }
 
 /// Keep track of diversions in an EBB.
 pub struct RegDiversions {
-    current: Vec<Diversion>,
+    current: FxHashMap<Value, Diversion>,
 }
 
 impl RegDiversions {
     /// Create a new empty diversion tracker.
     pub fn new() -> Self {
         Self {
-            current: Vec::new(),
+            current: FxHashMap::default(),
         }
     }
 
     /// Clear the tracker, preparing for a new EBB.
     pub fn clear(&mut self) {
         self.current.clear()
     }
 
     /// Are there any diversions?
     pub fn is_empty(&self) -> bool {
         self.current.is_empty()
     }
 
     /// Get the current diversion of `value`, if any.
     pub fn diversion(&self, value: Value) -> Option<&Diversion> {
-        self.current.iter().find(|d| d.value == value)
+        self.current.get(&value)
     }
 
     /// Get all current diversions.
-    pub fn all(&self) -> &[Diversion] {
-        self.current.as_slice()
+    pub fn iter(&self) -> Iter<'_, Value, Diversion> {
+        self.current.iter()
     }
 
     /// Get the current location for `value`. Fall back to the assignment map for non-diverted
     /// values
     pub fn get(&self, value: Value, locations: &ValueLocations) -> ValueLoc {
         match self.diversion(value) {
             Some(d) => d.to,
             None => locations[value],
@@ -90,25 +89,32 @@ impl RegDiversions {
         self.get(value, locations).unwrap_stack()
     }
 
     /// Record any kind of move.
     ///
     /// The `from` location must match an existing `to` location, if any.
     pub fn divert(&mut self, value: Value, from: ValueLoc, to: ValueLoc) {
         debug_assert!(from.is_assigned() && to.is_assigned());
-        if let Some(i) = self.current.iter().position(|d| d.value == value) {
-            debug_assert_eq!(self.current[i].to, from, "Bad regmove chain for {}", value);
-            if self.current[i].from != to {
-                self.current[i].to = to;
-            } else {
-                self.current.swap_remove(i);
+        match self.current.entry(value) {
+            Entry::Occupied(mut e) => {
+                // TODO: non-lexical lifetimes should allow removal of the scope and early return.
+                {
+                    let d = e.get_mut();
+                    debug_assert_eq!(d.to, from, "Bad regmove chain for {}", value);
+                    if d.from != to {
+                        d.to = to;
+                        return;
+                    }
+                }
+                e.remove();
             }
-        } else {
-            self.current.push(Diversion::new(value, from, to));
+            Entry::Vacant(e) => {
+                e.insert(Diversion::new(from, to));
+            }
         }
     }
 
     /// Record a register -> register move.
     pub fn regmove(&mut self, value: Value, from: RegUnit, to: RegUnit) {
         self.divert(value, ValueLoc::Reg(from), ValueLoc::Reg(to));
     }
 
@@ -149,64 +155,60 @@ impl RegDiversions {
             _ => {}
         }
     }
 
     /// Drop any recorded move for `value`.
     ///
     /// Returns the `to` location of the removed diversion.
     pub fn remove(&mut self, value: Value) -> Option<ValueLoc> {
-        self.current
-            .iter()
-            .position(|d| d.value == value)
-            .map(|i| self.current.swap_remove(i).to)
+        self.current.remove(&value).map(|d| d.to)
     }
 
     /// Return an object that can display the diversions.
     pub fn display<'a, R: Into<Option<&'a RegInfo>>>(&'a self, regs: R) -> DisplayDiversions<'a> {
         DisplayDiversions(self, regs.into())
     }
 }
 
 /// Object that displays register diversions.
 pub struct DisplayDiversions<'a>(&'a RegDiversions, Option<&'a RegInfo>);
 
 impl<'a> fmt::Display for DisplayDiversions<'a> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "{{")?;
-        for div in self.0.all() {
+        for (value, div) in self.0.iter() {
             write!(
                 f,
                 " {}: {} -> {}",
-                div.value,
+                value,
                 div.from.display(self.1),
                 div.to.display(self.1)
             )?
         }
         write!(f, " }}")
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use entity::EntityRef;
-    use ir::Value;
+    use crate::entity::EntityRef;
+    use crate::ir::Value;
 
     #[test]
     fn inserts() {
         let mut divs = RegDiversions::new();
         let v1 = Value::new(1);
         let v2 = Value::new(2);
 
         divs.regmove(v1, 10, 12);
         assert_eq!(
             divs.diversion(v1),
             Some(&Diversion {
-                value: v1,
                 from: ValueLoc::Reg(10),
                 to: ValueLoc::Reg(12),
             })
         );
         assert_eq!(divs.diversion(v2), None);
 
         divs.regmove(v1, 12, 11);
         assert_eq!(divs.diversion(v1).unwrap().to, ValueLoc::Reg(11));
--- a/third_party/rust/cranelift-codegen/src/regalloc/live_value_tracker.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/live_value_tracker.rs
@@ -1,22 +1,22 @@
 //! Track which values are live in an EBB with instruction granularity.
 //!
 //! The `LiveValueTracker` keeps track of the set of live SSA values at each instruction in an EBB.
 //! The sets of live values are computed on the fly as the tracker is moved from instruction to
 //! instruction, starting at the EBB header.
 
-use dominator_tree::DominatorTree;
-use entity::{EntityList, ListPool};
-use fx::FxHashMap;
-use ir::{DataFlowGraph, Ebb, ExpandedProgramPoint, Inst, Layout, Value};
-use partition_slice::partition_slice;
-use regalloc::affinity::Affinity;
-use regalloc::liveness::Liveness;
-use regalloc::liverange::LiveRange;
+use crate::dominator_tree::DominatorTree;
+use crate::entity::{EntityList, ListPool};
+use crate::fx::FxHashMap;
+use crate::ir::{DataFlowGraph, Ebb, ExpandedProgramPoint, Inst, Layout, Value};
+use crate::partition_slice::partition_slice;
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::liverange::LiveRange;
 use std::vec::Vec;
 
 type ValueList = EntityList<Value>;
 
 /// Compute and track live values throughout an EBB.
 pub struct LiveValueTracker {
     /// The set of values that are live at the current program point.
     live: LiveValueVec,
--- a/third_party/rust/cranelift-codegen/src/regalloc/liveness.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/liveness.rs
@@ -170,27 +170,27 @@
 //!   size to 32 bytes.
 //! - Related values should be stored on the same cache line. The current sparse set implementation
 //!   does a decent job of that.
 //! - For global values, the list of live-in intervals is very likely to fit on a single cache
 //!   line. These lists are very likely to be found in L2 cache at least.
 //!
 //! There is some room for improvement.
 
-use entity::SparseMap;
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::dfg::ValueDef;
-use ir::{Ebb, Function, Inst, Layout, ProgramPoint, Value};
-use isa::{EncInfo, OperandConstraint, TargetIsa};
-use regalloc::affinity::Affinity;
-use regalloc::liverange::{LiveRange, LiveRangeContext, LiveRangeForest};
-use std::mem;
-use std::ops::Index;
+use crate::entity::SparseMap;
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::dfg::ValueDef;
+use crate::ir::{Ebb, Function, Inst, Layout, ProgramPoint, Value};
+use crate::isa::{EncInfo, OperandConstraint, TargetIsa};
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::liverange::{LiveRange, LiveRangeContext, LiveRangeForest};
+use crate::timing;
+use core::mem;
+use core::ops::Index;
 use std::vec::Vec;
-use timing;
 
 /// A set of live ranges, indexed by value number.
 type LiveRangeSet = SparseMap<Value, LiveRange>;
 
 /// Get a mutable reference to the live range for `value`.
 /// Create it if necessary.
 fn get_or_create<'a>(
     lrset: &'a mut LiveRangeSet,
--- a/third_party/rust/cranelift-codegen/src/regalloc/liverange.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/liverange.rs
@@ -102,22 +102,22 @@
 //!
 //! ## B-tree representation
 //!
 //! A `BTreeMap<Ebb, Inst>` could also be used for the live-in intervals. It looks like the
 //! standard library B-tree doesn't provide the necessary interface for an efficient implementation
 //! of coalescing, so we would need to roll our own.
 //!
 
-use bforest;
-use entity::SparseMapValue;
-use ir::{Ebb, ExpandedProgramPoint, Inst, Layout, ProgramOrder, ProgramPoint, Value};
-use regalloc::affinity::Affinity;
-use std::cmp::Ordering;
-use std::marker::PhantomData;
+use crate::bforest;
+use crate::entity::SparseMapValue;
+use crate::ir::{Ebb, ExpandedProgramPoint, Inst, Layout, ProgramOrder, ProgramPoint, Value};
+use crate::regalloc::affinity::Affinity;
+use core::cmp::Ordering;
+use core::marker::PhantomData;
 
 /// Global live range of a single SSA value.
 ///
 /// As [explained in the module documentation](index.html#local-live-ranges), the live range of an
 /// SSA value is the disjoint union of a set of intervals, each local to a single EBB, and with at
 /// most one interval per EBB. We further distinguish between:
 ///
 /// 1. The *def interval* is the local interval in the EBB where the value is defined, and
@@ -452,21 +452,21 @@ impl<PO: ProgramOrder> SparseMapValue<Va
     fn key(&self) -> Value {
         self.value
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::{GenLiveRange, LiveRangeContext};
-    use bforest;
-    use entity::EntityRef;
-    use ir::{Ebb, Inst, Value};
-    use ir::{ExpandedProgramPoint, ProgramOrder};
-    use std::cmp::Ordering;
+    use crate::bforest;
+    use crate::entity::EntityRef;
+    use crate::ir::{Ebb, Inst, Value};
+    use crate::ir::{ExpandedProgramPoint, ProgramOrder};
+    use core::cmp::Ordering;
     use std::vec::Vec;
 
     // Dummy program order which simply compares indexes.
     // It is assumed that EBBs have indexes that are multiples of 10, and instructions have indexes
     // in between. `is_ebb_gap` assumes that terminator instructions have indexes of the form
     // ebb * 10 + 1. This is used in the coalesce test.
     struct ProgOrder {}
 
--- a/third_party/rust/cranelift-codegen/src/regalloc/pressure.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/pressure.rs
@@ -31,21 +31,21 @@
 //!
 //! We maintain two separate register counts per top-level register class: base counts and
 //! transient counts. The base counts are adjusted with the `take` and `free` functions. The
 //! transient counts are adjusted with `take_transient` and `free_transient`.
 
 // Remove once we're using the pressure tracker.
 #![allow(dead_code)]
 
-use isa::registers::{RegClass, RegClassMask, RegInfo, MAX_TRACKED_TOPRCS};
-use regalloc::RegisterSet;
-use std::cmp::min;
-use std::fmt;
-use std::iter::ExactSizeIterator;
+use crate::isa::registers::{RegClass, RegClassMask, RegInfo, MAX_TRACKED_TOPRCS};
+use crate::regalloc::RegisterSet;
+use core::cmp::min;
+use core::fmt;
+use core::iter::ExactSizeIterator;
 
 /// Information per top-level register class.
 ///
 /// Everything but the counts is static information computed from the constructor arguments.
 #[derive(Default)]
 struct TopRC {
     // Number of registers currently used from this register class.
     base_count: u32,
@@ -268,27 +268,27 @@ impl fmt::Display for Pressure {
         write!(f, " ]")
     }
 }
 
 #[cfg(test)]
 #[cfg(build_arm32)]
 mod tests {
     use super::Pressure;
-    use isa::{RegClass, TargetIsa};
-    use regalloc::RegisterSet;
-    use std::borrow::Borrow;
+    use crate::isa::{RegClass, TargetIsa};
+    use crate::regalloc::RegisterSet;
+    use core::borrow::Borrow;
+    use core::str::FromStr;
     use std::boxed::Box;
-    use std::str::FromStr;
-    use target_lexicon;
+    use target_lexicon::triple;
 
     // Make an arm32 `TargetIsa`, if possible.
     fn arm32() -> Option<Box<TargetIsa>> {
-        use isa;
-        use settings;
+        use crate::isa;
+        use crate::settings;
 
         let shared_builder = settings::builder();
         let shared_flags = settings::Flags::new(shared_builder);
 
         isa::lookup(triple!("arm"))
             .ok()
             .map(|b| b.finish(shared_flags))
     }
--- a/third_party/rust/cranelift-codegen/src/regalloc/register_set.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/register_set.rs
@@ -1,20 +1,20 @@
 //! Set of allocatable registers as a bit vector of register units.
 //!
 //! While allocating registers, we need to keep track of which registers are available and which
 //! registers are in use. Since registers can alias in different ways, we track this via the
 //! "register unit" abstraction. Every register contains one or more register units. Registers that
 //! share a register unit can't be in use at the same time.
 
-use isa::registers::{RegClass, RegInfo, RegUnit, RegUnitMask};
-use std::char;
-use std::fmt;
-use std::iter::ExactSizeIterator;
-use std::mem::size_of_val;
+use crate::isa::registers::{RegClass, RegInfo, RegUnit, RegUnitMask};
+use core::char;
+use core::fmt;
+use core::iter::ExactSizeIterator;
+use core::mem::size_of_val;
 
 /// Set of registers available for allocation.
 #[derive(Clone)]
 pub struct RegisterSet {
     avail: RegUnitMask,
 }
 
 // Given a register class and a register unit in the class, compute a word index and a bit mask of
@@ -223,17 +223,17 @@ impl fmt::Display for RegisterSet {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         self.display(None).fmt(f)
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use isa::registers::{RegClass, RegClassData};
+    use crate::isa::registers::{RegClass, RegClassData};
     use std::vec::Vec;
 
     // Register classes for testing.
     const GPR: RegClass = &RegClassData {
         name: "GPR",
         index: 0,
         width: 1,
         bank: 0,
--- a/third_party/rust/cranelift-codegen/src/regalloc/reload.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/reload.rs
@@ -4,29 +4,30 @@
 //! insert `spill` and `fill` instructions such that instruction operands expecting a register will
 //! get a value with register affinity, and operands expecting a stack slot will get a value with
 //! stack affinity.
 //!
 //! The secondary responsibility of the reload pass is to reuse values in registers as much as
 //! possible to minimize the number of `fill` instructions needed. This must not cause the register
 //! pressure limits to be exceeded.
 
-use cursor::{Cursor, EncCursor};
-use dominator_tree::DominatorTree;
-use entity::{SparseMap, SparseMapValue};
-use ir::{AbiParam, ArgumentLoc, InstBuilder};
-use ir::{Ebb, Function, Inst, InstructionData, Opcode, Value};
-use isa::RegClass;
-use isa::{ConstraintKind, EncInfo, Encoding, RecipeConstraints, TargetIsa};
-use regalloc::affinity::Affinity;
-use regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
-use regalloc::liveness::Liveness;
+use crate::cursor::{Cursor, EncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::entity::{SparseMap, SparseMapValue};
+use crate::ir::{AbiParam, ArgumentLoc, InstBuilder};
+use crate::ir::{Ebb, Function, Inst, InstructionData, Opcode, Value};
+use crate::isa::RegClass;
+use crate::isa::{ConstraintKind, EncInfo, Encoding, RecipeConstraints, TargetIsa};
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
+use crate::regalloc::liveness::Liveness;
+use crate::timing;
+use crate::topo_order::TopoOrder;
+use log::debug;
 use std::vec::Vec;
-use timing;
-use topo_order::TopoOrder;
 
 /// Reusable data structures for the reload pass.
 pub struct Reload {
     candidates: Vec<ReloadCandidate>,
     reloads: SparseMap<Value, ReloadedValue>,
 }
 
 /// Context data structure that gets instantiated once per pass.
--- a/third_party/rust/cranelift-codegen/src/regalloc/solver.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/solver.rs
@@ -94,25 +94,26 @@
 //! 3. Search for a solution that assigns each variable a register from its domain without
 //!    interference between variables.
 //!
 //! If the search fails to find a solution, we may need to reassign more registers. Find an
 //! appropriate candidate among the set of live register values, add it as a variable and start
 //! over.
 
 use super::RegisterSet;
-use dbg::DisplayList;
-use entity::{SparseMap, SparseMapValue};
-use ir::Value;
-use isa::{RegClass, RegUnit};
-use regalloc::register_set::RegSetIter;
-use std::cmp;
-use std::fmt;
-use std::mem;
-use std::u16;
+use crate::dbg::DisplayList;
+use crate::entity::{SparseMap, SparseMapValue};
+use crate::ir::Value;
+use crate::isa::{RegClass, RegUnit};
+use crate::regalloc::register_set::RegSetIter;
+use core::cmp;
+use core::fmt;
+use core::mem;
+use core::u16;
+use log::debug;
 use std::vec::Vec;
 
 /// A variable in the constraint problem.
 ///
 /// Variables represent register values that can be assigned to any register unit within the
 /// constraint register class. This includes live register values that can be reassigned to a new
 /// register and values defined by the instruction which must be assigned to a register.
 ///
@@ -289,17 +290,17 @@ impl Move {
                 rc: a.rc,
             })
         } else {
             None
         }
     }
 
     /// Get the "from" register and register class, if possible.
-    #[cfg_attr(feature = "cargo-clippy", allow(wrong_self_convention))]
+    #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))]
     fn from_reg(&self) -> Option<(RegClass, RegUnit)> {
         match *self {
             Move::Reg { rc, from, .. } | Move::Spill { rc, from, .. } => Some((rc, from)),
             Move::Fill { .. } => None,
         }
     }
 
     /// Get the "to" register and register class, if possible.
@@ -1124,28 +1125,28 @@ impl fmt::Display for Solver {
         writeln!(f, "}}")
     }
 }
 
 #[cfg(test)]
 #[cfg(build_arm32)]
 mod tests {
     use super::{Move, Solver};
-    use entity::EntityRef;
-    use ir::Value;
-    use isa::{RegClass, RegInfo, RegUnit, TargetIsa};
-    use regalloc::RegisterSet;
+    use crate::entity::EntityRef;
+    use crate::ir::Value;
+    use crate::isa::{RegClass, RegInfo, RegUnit, TargetIsa};
+    use crate::regalloc::RegisterSet;
+    use core::str::FromStr;
     use std::boxed::Box;
-    use std::str::FromStr;
-    use target_lexicon;
+    use target_lexicon::triple;
 
     // Make an arm32 `TargetIsa`, if possible.
     fn arm32() -> Option<Box<TargetIsa>> {
-        use isa;
-        use settings;
+        use crate::isa;
+        use crate::settings;
 
         let shared_builder = settings::builder();
         let shared_flags = settings::Flags::new(shared_builder);
 
         isa::lookup(triple!("arm"))
             .ok()
             .map(|b| b.finish(shared_flags))
     }
--- a/third_party/rust/cranelift-codegen/src/regalloc/spilling.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/spilling.rs
@@ -10,30 +10,31 @@
 //! inserting copies. The extra constraints are:
 //!
 //! 1. A value used by a tied operand must be killed by the instruction. This is resolved by
 //!    inserting a copy to a temporary value when necessary.
 //! 2. When the same value is used more than once by an instruction, the operand constraints must
 //!    be compatible. Otherwise, the value must be copied into a new register for some of the
 //!    operands.
 
-use cursor::{Cursor, EncCursor};
-use dominator_tree::DominatorTree;
-use ir::{ArgumentLoc, Ebb, Function, Inst, InstBuilder, SigRef, Value, ValueLoc};
-use isa::registers::{RegClass, RegClassIndex, RegClassMask, RegUnit};
-use isa::{ConstraintKind, EncInfo, RecipeConstraints, RegInfo, TargetIsa};
-use regalloc::affinity::Affinity;
-use regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
-use regalloc::liveness::Liveness;
-use regalloc::pressure::Pressure;
-use regalloc::virtregs::VirtRegs;
-use std::fmt;
+use crate::cursor::{Cursor, EncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::ir::{ArgumentLoc, Ebb, Function, Inst, InstBuilder, SigRef, Value, ValueLoc};
+use crate::isa::registers::{RegClass, RegClassIndex, RegClassMask, RegUnit};
+use crate::isa::{ConstraintKind, EncInfo, RecipeConstraints, RegInfo, TargetIsa};
+use crate::regalloc::affinity::Affinity;
+use crate::regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::pressure::Pressure;
+use crate::regalloc::virtregs::VirtRegs;
+use crate::timing;
+use crate::topo_order::TopoOrder;
+use core::fmt;
+use log::debug;
 use std::vec::Vec;
-use timing;
-use topo_order::TopoOrder;
 
 /// Return a top-level register class which contains `unit`.
 fn toprc_containing_regunit(unit: RegUnit, reginfo: &RegInfo) -> RegClass {
     let bank = reginfo.bank_containing_regunit(unit).unwrap();
     reginfo.classes[bank.first_toprc..(bank.first_toprc + bank.num_toprcs)]
         .iter()
         .find(|&rc| rc.contains(unit))
         .expect("reg unit should be in a toprc")
--- a/third_party/rust/cranelift-codegen/src/regalloc/virtregs.rs
+++ b/third_party/rust/cranelift-codegen/src/regalloc/virtregs.rs
@@ -6,25 +6,26 @@
 //!
 //! A virtual register is typically built by merging together SSA values that are "phi-related" -
 //! that is, one value is passed as an EBB argument to a branch and the other is the EBB parameter
 //! value itself.
 //!
 //! If any values in a virtual register are spilled, they will use the same stack slot. This avoids
 //! memory-to-memory copies when a spilled value is passed as an EBB argument.
 
-use dbg::DisplayList;
-use dominator_tree::DominatorTreePreorder;
-use entity::{EntityList, ListPool};
-use entity::{Keys, PrimaryMap, SecondaryMap};
-use ir::{Function, Value};
-use packed_option::PackedOption;
-use ref_slice::ref_slice;
-use std::cmp::Ordering;
-use std::fmt;
+use crate::dbg::DisplayList;
+use crate::dominator_tree::DominatorTreePreorder;
+use crate::entity::entity_impl;
+use crate::entity::{EntityList, ListPool};
+use crate::entity::{Keys, PrimaryMap, SecondaryMap};
+use crate::ir::{Function, Value};
+use crate::packed_option::PackedOption;
+use crate::ref_slice::ref_slice;
+use core::cmp::Ordering;
+use core::fmt;
 use std::vec::Vec;
 
 /// A virtual register reference.
 #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
 pub struct VirtReg(u32);
 entity_impl!(VirtReg, "vreg");
 
 type ValueList = EntityList<Value>;
@@ -91,17 +92,17 @@ impl VirtRegs {
     pub fn all_virtregs(&self) -> Keys<VirtReg> {
         self.vregs.keys()
     }
 
     /// Get the congruence class of `value`.
     ///
     /// If `value` belongs to a virtual register, the congruence class is the values of the virtual
     /// register. Otherwise it is just the value itself.
-    #[cfg_attr(feature = "cargo-clippy", allow(trivially_copy_pass_by_ref))]
+    #[cfg_attr(feature = "cargo-clippy", allow(clippy::trivially_copy_pass_by_ref))]
     pub fn congruence_class<'a, 'b>(&'a self, value: &'b Value) -> &'b [Value]
     where
         'a: 'b,
     {
         self.get(*value)
             .map_or_else(|| ref_slice(value), |vr| self.values(vr))
     }
 
@@ -394,18 +395,18 @@ impl VirtRegs {
         // sparse use takes time linear in the number of values in the function. Instead we reset
         // the entries that are known to be non-zero in the loop above.
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use entity::EntityRef;
-    use ir::Value;
+    use crate::entity::EntityRef;
+    use crate::ir::Value;
 
     #[test]
     fn empty_union_find() {
         let mut vregs = VirtRegs::new();
         vregs.finish_union_find(None);
         assert_eq!(vregs.all_virtregs().count(), 0);
     }
 
--- a/third_party/rust/cranelift-codegen/src/result.rs
+++ b/third_party/rust/cranelift-codegen/src/result.rs
@@ -1,11 +1,12 @@
 //! Result and error types representing the outcome of compiling a function.
 
-use verifier::VerifierErrors;
+use crate::verifier::VerifierErrors;
+use failure_derive::Fail;
 
 /// A compilation error.
 ///
 /// When Cranelift fails to compile a function, it will return one of these error codes.
 #[derive(Fail, Debug, PartialEq, Eq)]
 pub enum CodegenError {
     /// A list of IR verifier errors.
     ///
--- a/third_party/rust/cranelift-codegen/src/scoped_hash_map.rs
+++ b/third_party/rust/cranelift-codegen/src/scoped_hash_map.rs
@@ -1,40 +1,39 @@
 //! `ScopedHashMap`
 //!
-//! This module defines a struct `ScopedHashMap<K, V>` which defines a `HashMap`-like
+//! This module defines a struct `ScopedHashMap<K, V>` which defines a `FxHashMap`-like
 //! container that has a concept of scopes that can be entered and exited, such that
 //! values inserted while inside a scope aren't visible outside the scope.
 
-use fx::FxHashMap;
-use std::collections::hash_map;
-use std::hash::Hash;
-use std::mem;
+use crate::fx::FxHashMap;
+use core::hash::Hash;
+use core::mem;
 
 struct Val<K, V> {
     value: V,
     next_key: Option<K>,
     depth: usize,
 }
 
 /// A view into an occupied entry in a `ScopedHashMap`. It is part of the `Entry` enum.
 pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
-    entry: hash_map::OccupiedEntry<'a, K, Val<K, V>>,
+    entry: super::hash_map::OccupiedEntry<'a, K, Val<K, V>>,
 }
 
 impl<'a, K, V> OccupiedEntry<'a, K, V> {
     /// Gets a reference to the value in the entry.
     pub fn get(&self) -> &V {
         &self.entry.get().value
     }
 }
 
 /// A view into a vacant entry in a `ScopedHashMap`. It is part of the `Entry` enum.
 pub struct VacantEntry<'a, K: 'a, V: 'a> {
-    entry: hash_map::VacantEntry<'a, K, Val<K, V>>,
+    entry: super::hash_map::VacantEntry<'a, K, Val<K, V>>,
     next_key: Option<K>,
     depth: usize,
 }
 
 impl<'a, K, V> VacantEntry<'a, K, V> {
     /// Sets the value of the entry with the `VacantEntry`'s key.
     pub fn insert(self, value: V) {
         self.entry.insert(Val {
@@ -48,17 +47,17 @@ impl<'a, K, V> VacantEntry<'a, K, V> {
 /// A view into a single entry in a map, which may either be vacant or occupied.
 ///
 /// This enum is constructed from the `entry` method on `ScopedHashMap`.
 pub enum Entry<'a, K: 'a, V: 'a> {
     Occupied(OccupiedEntry<'a, K, V>),
     Vacant(VacantEntry<'a, K, V>),
 }
 
-/// A wrapper around a `HashMap` which adds the concept of scopes. Items inserted
+/// A wrapper around a `FxHashMap` which adds the concept of scopes. Items inserted
 /// within a scope are removed when the scope is exited.
 ///
 /// Shadowing, where one scope has entries with the same keys as a containing scope,
 /// is not supported in this implementation.
 pub struct ScopedHashMap<K, V> {
     map: FxHashMap<K, Val<K, V>>,
     last_insert: Option<K>,
     current_depth: usize,
@@ -72,20 +71,20 @@ where
     pub fn new() -> Self {
         Self {
             map: FxHashMap(),
             last_insert: None,
             current_depth: 0,
         }
     }
 
-    /// Similar to `HashMap::entry`, gets the given key's corresponding entry in the map for
+    /// Similar to `FxHashMap::entry`, gets the given key's corresponding entry in the map for
     /// in-place manipulation.
     pub fn entry(&mut self, key: K) -> Entry<K, V> {
-        use self::hash_map::Entry::*;
+        use super::hash_map::Entry::*;
         match self.map.entry(key) {
             Occupied(entry) => Entry::Occupied(OccupiedEntry { entry }),
             Vacant(entry) => {
                 let clone_key = entry.key().clone();
                 Entry::Vacant(VacantEntry {
                     entry,
                     next_key: mem::replace(&mut self.last_insert, Some(clone_key)),
                     depth: self.current_depth,
@@ -99,17 +98,17 @@ where
         // Increment the depth.
         self.current_depth = self.current_depth.checked_add(1).unwrap();
     }
 
     /// Exit the current scope.
     pub fn decrement_depth(&mut self) {
         // Remove all elements inserted at the current depth.
         while let Some(key) = self.last_insert.clone() {
-            use self::hash_map::Entry::*;
+            use crate::hash_map::Entry::*;
             match self.map.entry(key) {
                 Occupied(entry) => {
                     if entry.get().depth != self.current_depth {
                         break;
                     }
                     self.last_insert = entry.remove_entry().1.next_key;
                 }
                 Vacant(_) => panic!(),
--- a/third_party/rust/cranelift-codegen/src/settings.rs
+++ b/third_party/rust/cranelift-codegen/src/settings.rs
@@ -15,27 +15,24 @@
 //!
 //! let mut b = settings::builder();
 //! b.set("opt_level", "fastest");
 //!
 //! let f = settings::Flags::new(b);
 //! assert_eq!(f.opt_level(), settings::OptLevel::Fastest);
 //! ```
 
-use constant_hash::{probe, simple_hash};
-use isa::TargetIsa;
+use crate::constant_hash::{probe, simple_hash};
+use crate::isa::TargetIsa;
+use core::fmt;
+use core::str;
+use failure_derive::Fail;
 use std::boxed::Box;
-use std::fmt;
-use std::str;
 use std::string::{String, ToString};
 
-// TODO: Remove this workaround once https://github.com/rust-lang/rust/issues/27747 is done.
-#[cfg(not(feature = "std"))]
-use std::slice::SliceConcatExt;
-
 /// A string-based configurator for settings groups.
 ///
 /// The `Configurable` protocol allows settings to be modified by name before a finished `Flags`
 /// struct is created.
 pub trait Configurable {
     /// Set the string value of any setting by name.
     ///
     /// This can set any type of setting whether it is numeric, boolean, or enumerated.
@@ -105,20 +102,31 @@ fn parse_bool_value(value: &str) -> SetR
         "false" | "off" | "no" | "0" => Ok(false),
         _ => Err(SetError::BadValue("bool".to_string())),
     }
 }
 
 fn parse_enum_value(value: &str, choices: &[&str]) -> SetResult<u8> {
     match choices.iter().position(|&tag| tag == value) {
         Some(idx) => Ok(idx as u8),
-        None => Err(SetError::BadValue(format!(
-            "any among {}",
-            choices.join(", ")
-        ))),
+        None => {
+            // TODO: Use `join` instead of this code, once
+            // https://github.com/rust-lang/rust/issues/27747 is resolved.
+            let mut all_choices = String::new();
+            let mut first = true;
+            for choice in choices {
+                if first {
+                    first = false
+                } else {
+                    all_choices += ", ";
+                }
+                all_choices += choice;
+            }
+            Err(SetError::BadValue(format!("any among {}", all_choices)))
+        }
     }
 }
 
 impl Configurable for Builder {
     fn enable(&mut self, name: &str) -> SetResult<()> {
         use self::detail::Detail;
         let (offset, detail) = self.lookup(name)?;
         match detail {
@@ -197,18 +205,18 @@ impl<'a> PredicateView<'a> {
     }
 }
 
 /// Implementation details for generated code.
 ///
 /// This module holds definitions that need to be public so the can be instantiated by generated
 /// code in other modules.
 pub mod detail {
-    use constant_hash;
-    use std::fmt;
+    use crate::constant_hash;
+    use core::fmt;
 
     /// An instruction group template.
     pub struct Template {
         /// Name of the instruction group.
         pub name: &'static str,
         /// List of setting descriptors.
         pub descriptors: &'static [Descriptor],
         /// Union of all enumerators.
--- a/third_party/rust/cranelift-codegen/src/simple_gvn.rs
+++ b/third_party/rust/cranelift-codegen/src/simple_gvn.rs
@@ -1,18 +1,18 @@
 //! A simple GVN pass.
 
-use cursor::{Cursor, FuncCursor};
-use dominator_tree::DominatorTree;
-use ir::{Function, Inst, InstructionData, Opcode, Type};
-use scoped_hash_map::ScopedHashMap;
-use std::cell::{Ref, RefCell};
-use std::hash::{Hash, Hasher};
+use crate::cursor::{Cursor, FuncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::ir::{Function, Inst, InstructionData, Opcode, Type};
+use crate::scoped_hash_map::ScopedHashMap;
+use crate::timing;
+use core::cell::{Ref, RefCell};
+use core::hash::{Hash, Hasher};
 use std::vec::Vec;
-use timing;
 
 /// Test whether the given opcode is unsafe to even consider for GVN.
 fn trivially_unsafe_for_gvn(opcode: Opcode) -> bool {
     opcode.is_call()
         || opcode.is_branch()
         || opcode.is_terminator()
         || opcode.is_return()
         || opcode.can_trap()
@@ -116,17 +116,17 @@ pub fn do_simple_gvn(func: &mut Function
             }
 
             let ctrl_typevar = func.dfg.ctrl_typevar(inst);
             let key = HashKey {
                 inst: func.dfg[inst].clone(),
                 ty: ctrl_typevar,
                 pos: &pos,
             };
-            use scoped_hash_map::Entry::*;
+            use crate::scoped_hash_map::Entry::*;
             match visible_values.entry(key) {
                 Occupied(entry) => {
                     debug_assert!(domtree.dominates(*entry.get(), inst, &func.layout));
                     // If the redundant instruction is representing the current
                     // scope, pick a new representative.
                     let old = scope_stack.last_mut().unwrap();
                     if *old == inst {
                         *old = func.layout.next_inst(inst).unwrap();
--- a/third_party/rust/cranelift-codegen/src/simple_preopt.rs
+++ b/third_party/rust/cranelift-codegen/src/simple_preopt.rs
@@ -1,21 +1,21 @@
 //! A pre-legalization rewriting pass.
 
 #![allow(non_snake_case)]
 
-use cursor::{Cursor, FuncCursor};
-use divconst_magic_numbers::{magicS32, magicS64, magicU32, magicU64};
-use divconst_magic_numbers::{MS32, MS64, MU32, MU64};
-use ir::dfg::ValueDef;
-use ir::instructions::Opcode;
-use ir::types::{I32, I64};
-use ir::Inst;
-use ir::{DataFlowGraph, Function, InstBuilder, InstructionData, Type, Value};
-use timing;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::divconst_magic_numbers::{magic_s32, magic_s64, magic_u32, magic_u64};
+use crate::divconst_magic_numbers::{MS32, MS64, MU32, MU64};
+use crate::ir::dfg::ValueDef;
+use crate::ir::instructions::Opcode;
+use crate::ir::types::{I32, I64};
+use crate::ir::Inst;
+use crate::ir::{DataFlowGraph, Function, InstBuilder, InstructionData, Type, Value};
+use crate::timing;
 
 //----------------------------------------------------------------------
 //
 // Pattern-match helpers and transformation for div and rem by constants.
 
 // Simple math helpers
 
 /// if `x` is a power of two, or the negation thereof, return the power along
@@ -178,37 +178,37 @@ fn do_divrem_transformation(divrem_info:
                 pos.func.dfg.replace(inst).ushr_imm(n1, k as i64);
             }
         }
 
         // U32 div, rem by non-power-of-2
         DivRemByConstInfo::DivU32(n1, d) | DivRemByConstInfo::RemU32(n1, d) => {
             debug_assert!(d >= 3);
             let MU32 {
-                mulBy,
-                doAdd,
-                shiftBy,
-            } = magicU32(d);
+                mul_by,
+                do_add,
+                shift_by,
+            } = magic_u32(d);
             let qf; // final quotient
-            let q0 = pos.ins().iconst(I32, mulBy as i64);
+            let q0 = pos.ins().iconst(I32, mul_by as i64);
             let q1 = pos.ins().umulhi(n1, q0);
-            if doAdd {
-                debug_assert!(shiftBy >= 1 && shiftBy <= 32);
+            if do_add {
+                debug_assert!(shift_by >= 1 && shift_by <= 32);
                 let t1 = pos.ins().isub(n1, q1);
                 let t2 = pos.ins().ushr_imm(t1, 1);
                 let t3 = pos.ins().iadd(t2, q1);
-                // I never found any case where shiftBy == 1 here.
+                // I never found any case where shift_by == 1 here.
                 // So there's no attempt to fold out a zero shift.
-                debug_assert_ne!(shiftBy, 1);
-                qf = pos.ins().ushr_imm(t3, (shiftBy - 1) as i64);
+                debug_assert_ne!(shift_by, 1);
+                qf = pos.ins().ushr_imm(t3, (shift_by - 1) as i64);
             } else {
-                debug_assert!(shiftBy >= 0 && shiftBy <= 31);
-                // Whereas there are known cases here for shiftBy == 0.
-                if shiftBy > 0 {
-                    qf = pos.ins().ushr_imm(q1, shiftBy as i64);
+                debug_assert!(shift_by >= 0 && shift_by <= 31);
+                // Whereas there are known cases here for shift_by == 0.
+                if shift_by > 0 {
+                    qf = pos.ins().ushr_imm(q1, shift_by as i64);
                 } else {
                     qf = q1;
                 }
             }
             // Now qf holds the final quotient. If necessary calculate the
             // remainder instead.
             if isRem {
                 let tt = pos.ins().imul_imm(qf, d as i64);
@@ -248,37 +248,37 @@ fn do_divrem_transformation(divrem_info:
                 pos.func.dfg.replace(inst).ushr_imm(n1, k as i64);
             }
         }
 
         // U64 div, rem by non-power-of-2
         DivRemByConstInfo::DivU64(n1, d) | DivRemByConstInfo::RemU64(n1, d) => {
             debug_assert!(d >= 3);
             let MU64 {
-                mulBy,
-                doAdd,
-                shiftBy,
-            } = magicU64(d);
+                mul_by,
+                do_add,
+                shift_by,
+            } = magic_u64(d);
             let qf; // final quotient
-            let q0 = pos.ins().iconst(I64, mulBy as i64);
+            let q0 = pos.ins().iconst(I64, mul_by as i64);
             let q1 = pos.ins().umulhi(n1, q0);
-            if doAdd {
-                debug_assert!(shiftBy >= 1 && shiftBy <= 64);
+            if do_add {
+                debug_assert!(shift_by >= 1 && shift_by <= 64);
                 let t1 = pos.ins().isub(n1, q1);
                 let t2 = pos.ins().ushr_imm(t1, 1);
                 let t3 = pos.ins().iadd(t2, q1);
-                // I never found any case where shiftBy == 1 here.
+                // I never found any case where shift_by == 1 here.
                 // So there's no attempt to fold out a zero shift.
-                debug_assert_ne!(shiftBy, 1);
-                qf = pos.ins().ushr_imm(t3, (shiftBy - 1) as i64);
+                debug_assert_ne!(shift_by, 1);
+                qf = pos.ins().ushr_imm(t3, (shift_by - 1) as i64);
             } else {
-                debug_assert!(shiftBy >= 0 && shiftBy <= 63);
-                // Whereas there are known cases here for shiftBy == 0.
-                if shiftBy > 0 {
-                    qf = pos.ins().ushr_imm(q1, shiftBy as i64);
+                debug_assert!(shift_by >= 0 && shift_by <= 63);
+                // Whereas there are known cases here for shift_by == 0.
+                if shift_by > 0 {
+                    qf = pos.ins().ushr_imm(q1, shift_by as i64);
                 } else {
                     qf = q1;
                 }
             }
             // Now qf holds the final quotient. If necessary calculate the
             // remainder instead.
             if isRem {
                 let tt = pos.ins().imul_imm(qf, d as i64);
@@ -329,31 +329,31 @@ fn do_divrem_transformation(divrem_info:
                         pos.func.dfg.replace(inst).irsub_imm(t4, 0);
                     } else {
                         pos.func.dfg.replace(inst).copy(t4);
                     }
                 }
             } else {
                 // S32 div, rem by a non-power-of-2
                 debug_assert!(d < -2 || d > 2);
-                let MS32 { mulBy, shiftBy } = magicS32(d);
-                let q0 = pos.ins().iconst(I32, mulBy as i64);
+                let MS32 { mul_by, shift_by } = magic_s32(d);
+                let q0 = pos.ins().iconst(I32, mul_by as i64);
                 let q1 = pos.ins().smulhi(n1, q0);
-                let q2 = if d > 0 && mulBy < 0 {
+                let q2 = if d > 0 && mul_by < 0 {
                     pos.ins().iadd(q1, n1)
-                } else if d < 0 && mulBy > 0 {
+                } else if d < 0 && mul_by > 0 {
                     pos.ins().isub(q1, n1)
                 } else {
                     q1
                 };
-                debug_assert!(shiftBy >= 0 && shiftBy <= 31);
-                let q3 = if shiftBy == 0 {
+                debug_assert!(shift_by >= 0 && shift_by <= 31);
+                let q3 = if shift_by == 0 {
                     q2
                 } else {
-                    pos.ins().sshr_imm(q2, shiftBy as i64)
+                    pos.ins().sshr_imm(q2, shift_by as i64)
                 };
                 let t1 = pos.ins().ushr_imm(q3, 31);
                 let qf = pos.ins().iadd(q3, t1);
                 // Now qf holds the final quotient. If necessary calculate
                 // the remainder instead.
                 if isRem {
                     let tt = pos.ins().imul_imm(qf, d as i64);
                     pos.func.dfg.replace(inst).isub(n1, tt);
@@ -404,31 +404,31 @@ fn do_divrem_transformation(divrem_info:
                         pos.func.dfg.replace(inst).irsub_imm(t4, 0);
                     } else {
                         pos.func.dfg.replace(inst).copy(t4);
                     }
                 }
             } else {
                 // S64 div, rem by a non-power-of-2
                 debug_assert!(d < -2 || d > 2);
-                let MS64 { mulBy, shiftBy } = magicS64(d);
-                let q0 = pos.ins().iconst(I64, mulBy);
+                let MS64 { mul_by, shift_by } = magic_s64(d);
+                let q0 = pos.ins().iconst(I64, mul_by);
                 let q1 = pos.ins().smulhi(n1, q0);
-                let q2 = if d > 0 && mulBy < 0 {
+                let q2 = if d > 0 && mul_by < 0 {
                     pos.ins().iadd(q1, n1)
-                } else if d < 0 && mulBy > 0 {
+                } else if d < 0 && mul_by > 0 {
                     pos.ins().isub(q1, n1)
                 } else {
                     q1
                 };
-                debug_assert!(shiftBy >= 0 && shiftBy <= 63);
-                let q3 = if shiftBy == 0 {
+                debug_assert!(shift_by >= 0 && shift_by <= 63);
+                let q3 = if shift_by == 0 {
                     q2
                 } else {
-                    pos.ins().sshr_imm(q2, shiftBy as i64)
+                    pos.ins().sshr_imm(q2, shift_by as i64)
                 };
                 let t1 = pos.ins().ushr_imm(q3, 63);
                 let qf = pos.ins().iadd(q3, t1);
                 // Now qf holds the final quotient. If necessary calculate
                 // the remainder instead.
                 if isRem {
                     let tt = pos.ins().imul_imm(qf, d);
                     pos.func.dfg.replace(inst).isub(n1, tt);
--- a/third_party/rust/cranelift-codegen/src/stack_layout.rs
+++ b/third_party/rust/cranelift-codegen/src/stack_layout.rs
@@ -1,14 +1,14 @@
 //! Computing stack layout.
 
-use ir::stackslot::{StackOffset, StackSize, StackSlotKind};
-use ir::StackSlots;
-use result::{CodegenError, CodegenResult};
-use std::cmp::{max, min};
+use crate::ir::stackslot::{StackOffset, StackSize, StackSlotKind};
+use crate::ir::StackSlots;
+use crate::result::{CodegenError, CodegenResult};
+use core::cmp::{max, min};
 
 /// Compute the stack frame layout.
 ///
 /// Determine the total size of this stack frame and assign offsets to all `Spill` and
 /// `Explicit` stack slots.
 ///
 /// The total frame size will be a multiple of `alignment` which must be a power of two.
 ///
@@ -106,20 +106,20 @@ pub fn layout_stack(frame: &mut StackSlo
     let frame_size = (offset as StackSize).wrapping_neg();
     frame.frame_size = Some(frame_size);
     Ok(frame_size)
 }
 
 #[cfg(test)]
 mod tests {
     use super::layout_stack;
-    use ir::stackslot::StackOffset;
-    use ir::types;
-    use ir::{StackSlotData, StackSlotKind, StackSlots};
-    use result::CodegenError;
+    use crate::ir::stackslot::StackOffset;
+    use crate::ir::types;
+    use crate::ir::{StackSlotData, StackSlotKind, StackSlots};
+    use crate::result::CodegenError;
 
     #[test]
     fn layout() {
         let sss = &mut StackSlots::new();
 
         // An empty layout should have 0-sized stack frame.
         assert_eq!(layout_stack(sss, 1), Ok(0));
         assert_eq!(layout_stack(sss, 16), Ok(0));
--- a/third_party/rust/cranelift-codegen/src/timing.rs
+++ b/third_party/rust/cranelift-codegen/src/timing.rs
@@ -1,13 +1,13 @@
 //! Pass timing.
 //!
 //! This modules provides facilities for timing the execution of individual compilation passes.
 
-use std::fmt;
+use core::fmt;
 
 pub use self::details::{add_to_current, take_current, PassTimes, TimingToken};
 
 // Each pass that can be timed is predefined with the `define_passes!` macro. Each pass has a
 // snake_case name and a plain text description used when printing out the timing report.
 //
 // This macro defines:
 //
@@ -97,16 +97,17 @@ impl fmt::Display for Pass {
 /// Implementation details.
 ///
 /// This whole module can be gated on a `cfg` feature to provide a dummy implementation for
 /// performance-sensitive builds or restricted environments. The dummy implementation must provide
 /// `TimingToken` and `PassTimes` types and `take_current`, `add_to_current`, and `start_pass` funcs
 #[cfg(feature = "std")]
 mod details {
     use super::{Pass, DESCRIPTIONS, NUM_PASSES};
+    use log::debug;
     use std::cell::{Cell, RefCell};
     use std::fmt;
     use std::mem;
     use std::time::{Duration, Instant};
 
     /// A timing token is responsible for timing the currently running pass. Timing starts when it
     /// is created and ends when it is dropped.
     ///
@@ -152,17 +153,17 @@ mod details {
             writeln!(f, "   Total     Self  Pass")?;
             writeln!(f, "-------- --------  ----------------------------------")?;
             for (time, desc) in self.pass.iter().zip(&DESCRIPTIONS[..]) {
                 // Omit passes that haven't run.
                 if time.total == Duration::default() {
                     continue;
                 }
 
-                // Write a duration as secs.milis, trailing space.
+                // Write a duration as secs.millis, trailing space.
                 fn fmtdur(mut dur: Duration, f: &mut fmt::Formatter) -> fmt::Result {
                     // Round to nearest ms by adding 500us.
                     dur += Duration::new(0, 500_000);
                     let ms = dur.subsec_millis();
                     write!(f, "{:4}.{:03} ", dur.as_secs(), ms)
                 }
 
                 fmtdur(time.total, f)?;
--- a/third_party/rust/cranelift-codegen/src/topo_order.rs
+++ b/third_party/rust/cranelift-codegen/src/topo_order.rs
@@ -1,13 +1,13 @@
 //! Topological order of EBBs, according to the dominator tree.
 
-use dominator_tree::DominatorTree;
-use entity::SparseSet;
-use ir::{Ebb, Layout};
+use crate::dominator_tree::DominatorTree;
+use crate::entity::SparseSet;
+use crate::ir::{Ebb, Layout};
 use std::vec::Vec;
 
 /// Present EBBs in a topological order such that all dominating EBBs are guaranteed to be visited
 /// before the current EBB.
 ///
 /// There are many topological orders of the EBBs in a function, so it is possible to provide a
 /// preferred order, and the `TopoOrder` will present EBBs in an order that is as close as possible
 /// to the preferred order.
@@ -85,21 +85,21 @@ impl TopoOrder {
         }
         self.stack.pop()
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use cursor::{Cursor, FuncCursor};
-    use dominator_tree::DominatorTree;
-    use flowgraph::ControlFlowGraph;
-    use ir::{Function, InstBuilder};
-    use std::iter;
+    use crate::cursor::{Cursor, FuncCursor};
+    use crate::dominator_tree::DominatorTree;
+    use crate::flowgraph::ControlFlowGraph;
+    use crate::ir::{Function, InstBuilder};
+    use core::iter;
 
     #[test]
     fn empty() {
         let func = Function::new();
         let cfg = ControlFlowGraph::with_function(&func);
         let domtree = DominatorTree::with_function(&func, &cfg);
         let mut topo = TopoOrder::new();
 
--- a/third_party/rust/cranelift-codegen/src/unreachable_code.rs
+++ b/third_party/rust/cranelift-codegen/src/unreachable_code.rs
@@ -1,15 +1,16 @@
 //! Unreachable code elimination.
 
-use cursor::{Cursor, FuncCursor};
-use dominator_tree::DominatorTree;
-use flowgraph::ControlFlowGraph;
-use ir;
-use timing;
+use crate::cursor::{Cursor, FuncCursor};
+use crate::dominator_tree::DominatorTree;
+use crate::flowgraph::ControlFlowGraph;
+use crate::ir;
+use crate::timing;
+use log::debug;
 
 /// Eliminate unreachable code.
 ///
 /// This pass deletes whole EBBs that can't be reached from the entry block. It does not delete
 /// individual instructions whose results are unused.
 ///
 /// The reachability analysis is performed by the dominator tree analysis.
 pub fn eliminate_unreachable_code(
--- a/third_party/rust/cranelift-codegen/src/verifier/cssa.rs
+++ b/third_party/rust/cranelift-codegen/src/verifier/cssa.rs
@@ -1,18 +1,18 @@
 //! Verify conventional SSA form.
 
-use dbg::DisplayList;
-use dominator_tree::{DominatorTree, DominatorTreePreorder};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::{ExpandedProgramPoint, Function};
-use regalloc::liveness::Liveness;
-use regalloc::virtregs::VirtRegs;
-use timing;
-use verifier::{VerifierErrors, VerifierStepResult};
+use crate::dbg::DisplayList;
+use crate::dominator_tree::{DominatorTree, DominatorTreePreorder};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::{ExpandedProgramPoint, Function};
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::virtregs::VirtRegs;
+use crate::timing;
+use crate::verifier::{VerifierErrors, VerifierStepResult};
 
 /// Verify conventional SSA form for `func`.
 ///
 /// Conventional SSA form is represented in Cranelift with the help of virtual registers:
 ///
 /// - Two values are said to be *PHI-related* if one is an EBB argument and the other is passed as
 ///   a branch argument in a location that matches the first value.
 /// - PHI-related values must belong to the same virtual register.
--- a/third_party/rust/cranelift-codegen/src/verifier/flags.rs
+++ b/third_party/rust/cranelift-codegen/src/verifier/flags.rs
@@ -1,18 +1,18 @@
 //! Verify CPU flags values.
 
-use entity::{SecondaryMap, SparseSet};
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir;
-use ir::instructions::BranchInfo;
-use isa;
-use packed_option::PackedOption;
-use timing;
-use verifier::{VerifierErrors, VerifierStepResult};
+use crate::entity::{SecondaryMap, SparseSet};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir;
+use crate::ir::instructions::BranchInfo;
+use crate::isa;
+use crate::packed_option::PackedOption;
+use crate::timing;
+use crate::verifier::{VerifierErrors, VerifierStepResult};
 
 /// Verify that CPU flags are used correctly.
 ///
 /// The value types `iflags` and `fflags` represent CPU flags which usually live in a
 /// special-purpose register, so they can't be used as freely as other value types that can live in
 /// any register.
 ///
 /// We verify the following conditions:
--- a/third_party/rust/cranelift-codegen/src/verifier/liveness.rs
+++ b/third_party/rust/cranelift-codegen/src/verifier/liveness.rs
@@ -1,19 +1,19 @@
 //! Liveness verifier.
 
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir::entities::AnyEntity;
-use ir::{ExpandedProgramPoint, Function, Inst, ProgramOrder, ProgramPoint, Value};
-use isa::TargetIsa;
-use regalloc::liveness::Liveness;
-use regalloc::liverange::LiveRange;
-use std::cmp::Ordering;
-use timing;
-use verifier::{VerifierErrors, VerifierStepResult};
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir::entities::AnyEntity;
+use crate::ir::{ExpandedProgramPoint, Function, Inst, ProgramOrder, ProgramPoint, Value};
+use crate::isa::TargetIsa;
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::liverange::LiveRange;
+use crate::timing;
+use crate::verifier::{VerifierErrors, VerifierStepResult};
+use core::cmp::Ordering;
 
 /// Verify liveness information for `func`.
 ///
 /// The provided control flow graph is assumed to be sound.
 ///
 /// - All values in the program must have a live range.
 /// - The live range def point must match where the value is defined.
 /// - The live range must reach all uses.
@@ -181,17 +181,17 @@ impl<'a> LivenessVerifier<'a> {
         match lr.def_local_end().into() {
             ExpandedProgramPoint::Ebb(e) => {
                 return fatal!(
                     errors,
                     loc,
                     "Def local range for {} can't end at {}",
                     val,
                     e
-                )
+                );
             }
             ExpandedProgramPoint::Inst(i) => {
                 if self.func.layout.inst_ebb(i) != Some(def_ebb) {
                     return fatal!(errors, loc, "Def local end for {} in wrong ebb", val);
                 }
             }
         }
 
@@ -211,17 +211,17 @@ impl<'a> LivenessVerifier<'a> {
                 None => {
                     return fatal!(
                         errors,
                         loc,
                         "{} livein for {} ends at {} which is not in the layout",
                         val,
                         ebb,
                         end
-                    )
+                    );
                 }
             };
 
             // Check all the EBBs in the interval independently.
             loop {
                 // If `val` is live-in at `ebb`, it must be live at all the predecessors.
                 for BasicBlock { inst: pred, .. } in self.cfg.pred_iter(ebb) {
                     if !self.live_at_use(lr, pred) {
@@ -242,17 +242,17 @@ impl<'a> LivenessVerifier<'a> {
                     Some(e) => e,
                     None => {
                         return fatal!(
                             errors,
                             loc,
                             "end of {} livein ({}) never reached",
                             val,
                             end_ebb
-                        )
+                        );
                     }
                 };
             }
         }
 
         Ok(())
     }
 }
--- a/third_party/rust/cranelift-codegen/src/verifier/locations.rs
+++ b/third_party/rust/cranelift-codegen/src/verifier/locations.rs
@@ -1,16 +1,16 @@
 //! Verify value locations.
 
-use ir;
-use isa;
-use regalloc::liveness::Liveness;
-use regalloc::RegDiversions;
-use timing;
-use verifier::{VerifierErrors, VerifierStepResult};
+use crate::ir;
+use crate::isa;
+use crate::regalloc::liveness::Liveness;
+use crate::regalloc::RegDiversions;
+use crate::timing;
+use crate::verifier::{VerifierErrors, VerifierStepResult};
 
 /// Verify value locations for `func`.
 ///
 /// After register allocation, every value must be assigned to a location - either a register or a
 /// stack slot. These locations must be compatible with the constraints described by the
 /// instruction encoding recipes.
 ///
 /// Values can be temporarily diverted to a different location by using the `regmove`, `regspill`,
@@ -298,67 +298,67 @@ impl<'a> LocationVerifier<'a> {
     /// We have active diversions before a branch. Make sure none of the diverted values are live
     /// on the outgoing CFG edges.
     fn check_cfg_edges(
         &self,
         inst: ir::Inst,
         divert: &RegDiversions,
         errors: &mut VerifierErrors,
     ) -> VerifierStepResult<()> {
-        use ir::instructions::BranchInfo::*;
+        use crate::ir::instructions::BranchInfo::*;
 
         // We can only check CFG edges if we have a liveness analysis.
         let liveness = match self.liveness {
             Some(l) => l,
             None => return Ok(()),
         };
         let dfg = &self.func.dfg;
 
         match dfg.analyze_branch(inst) {
             NotABranch => panic!(
                 "No branch information for {}",
                 dfg.display_inst(inst, self.isa)
             ),
             SingleDest(ebb, _) => {
-                for d in divert.all() {
-                    let lr = &liveness[d.value];
+                for (&value, d) in divert.iter() {
+                    let lr = &liveness[value];
                     if lr.is_livein(ebb, liveness.context(&self.func.layout)) {
                         return fatal!(
                             errors,
                             inst,
                             "{} is diverted to {} and live in to {}",
-                            d.value,
+                            value,
                             d.to.display(&self.reginfo),
                             ebb
                         );
                     }
                 }
             }
             Table(jt, ebb) => {
-                for d in divert.all() {
-                    let lr = &liveness[d.value];
+                for (&value, d) in divert.iter() {
+                    let lr = &liveness[value];
                     if let Some(ebb) = ebb {
                         if lr.is_livein(ebb, liveness.context(&self.func.layout)) {
                             return fatal!(
                                 errors,
                                 inst,
                                 "{} is diverted to {} and live in to {}",
-                                d.value,
+                                value,
                                 d.to.display(&self.reginfo),
                                 ebb
                             );
                         }
                     }
                     for ebb in self.func.jump_tables[jt].iter() {
                         if lr.is_livein(*ebb, liveness.context(&self.func.layout)) {
                             return fatal!(
                                 errors,
                                 inst,
                                 "{} is diverted to {} and live in to {}",
-                                d.value,
+                                value,
                                 d.to.display(&self.reginfo),
                                 ebb
                             );
                         }
                     }
                 }
             }
         }
--- a/third_party/rust/cranelift-codegen/src/verifier/mod.rs
+++ b/third_party/rust/cranelift-codegen/src/verifier/mod.rs
@@ -52,57 +52,58 @@
 //! - Stack slot loads and stores must be in-bounds.
 //! - Immediate constraints for certain opcodes, like `udiv_imm v3, 0`.
 //! - `Insertlane` and `extractlane` instructions have immediate lane numbers that must be in
 //!   range for their polymorphic type.
 //! - Swizzle and shuffle instructions take a variable number of lane arguments. The number
 //!   of arguments must match the destination type, and the lane indexes must be in range.
 
 use self::flags::verify_flags;
-use dbg::DisplayList;
-use dominator_tree::DominatorTree;
-use entity::SparseSet;
-use flowgraph::{BasicBlock, ControlFlowGraph};
-use ir;
-use ir::entities::AnyEntity;
-use ir::instructions::{BranchInfo, CallInfo, InstructionFormat, ResolvedConstraint};
-use ir::{
+use crate::dbg::DisplayList;
+use crate::dominator_tree::DominatorTree;
+use crate::entity::SparseSet;
+use crate::flowgraph::{BasicBlock, ControlFlowGraph};
+use crate::ir;
+use crate::ir::entities::AnyEntity;
+use crate::ir::instructions::{BranchInfo, CallInfo, InstructionFormat, ResolvedConstraint};
+use crate::ir::{
     types, ArgumentLoc, Ebb, FuncRef, Function, GlobalValue, Inst, JumpTable, Opcode, SigRef,
     StackSlot, StackSlotKind, Type, Value, ValueDef, ValueList, ValueLoc,
 };
-use isa::TargetIsa;
-use iterators::IteratorExtras;
-use settings::FlagsOrIsa;
-use std::cmp::Ordering;
+use crate::isa::TargetIsa;
+use crate::iterators::IteratorExtras;
+use crate::settings::FlagsOrIsa;
+use crate::timing;
+use core::cmp::Ordering;
+use core::fmt::{self, Display, Formatter, Write};
+use failure_derive::Fail;
 use std::collections::BTreeSet;
-use std::fmt::{self, Display, Formatter, Write};
 use std::string::String;
 use std::vec::Vec;
-use timing;
 
 pub use self::cssa::verify_cssa;
 pub use self::liveness::verify_liveness;
 pub use self::locations::verify_locations;
 
 /// Report an error.
 ///
 /// The first argument must be a `&mut VerifierErrors` reference, and the following
 /// argument defines the location of the error and must implement `Into<AnyEntity>`.
 /// Finally, subsequent arguments will be formatted using `format!()` and set
 /// as the error message.
 macro_rules! report {
     ( $errors: expr, $loc: expr, $msg: tt ) => {
-        $errors.0.push(::verifier::VerifierError {
+        $errors.0.push(crate::verifier::VerifierError {
             location: $loc.into(),
             message: String::from($msg),
         })
     };
 
     ( $errors: expr, $loc: expr, $fmt: tt, $( $arg: expr ),+ ) => {
-        $errors.0.push(::verifier::VerifierError {
+        $errors.0.push(crate::verifier::VerifierError {
             location: $loc.into(),
             message: format!( $fmt, $( $arg ),+ ),
         })
     };
 }
 
 /// Diagnose a fatal error, and return `Err`.
 macro_rules! fatal {
@@ -546,17 +547,17 @@ impl<'a> Verifier<'a> {
         self.verify_entity_references(inst, errors)
     }
 
     fn verify_entity_references(
         &self,
         inst: Inst,
         errors: &mut VerifierErrors,
     ) -> VerifierStepResult<()> {
-        use ir::instructions::InstructionData::*;
+        use crate::ir::instructions::InstructionData::*;
 
         for &arg in self.func.dfg.inst_args(inst) {
             self.verify_inst_arg(inst, arg, errors)?;
 
             // All used values must be attached to something.
             let original = self.func.dfg.resolve_aliases(arg);
             if !self.func.dfg.value_is_attached(original) {
                 report!(
@@ -1635,17 +1636,17 @@ impl<'a> Verifier<'a> {
             match self.func.encode(inst, isa) {
                 Ok(enc) => {
                     return nonfatal!(
                         errors,
                         inst,
                         "{} must have an encoding (e.g., {})",
                         text,
                         isa.encoding_info().display(enc)
-                    )
+                    );
                 }
                 Err(_) => return nonfatal!(errors, inst, "{} must have an encoding", text),
             }
         }
 
         Ok(())
     }
 
@@ -1694,20 +1695,20 @@ impl<'a> Verifier<'a> {
 
         Ok(())
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::{Verifier, VerifierError, VerifierErrors};
-    use entity::EntityList;
-    use ir::instructions::{InstructionData, Opcode};
-    use ir::Function;
-    use settings;
+    use crate::entity::EntityList;
+    use crate::ir::instructions::{InstructionData, Opcode};
+    use crate::ir::Function;
+    use crate::settings;
 
     macro_rules! assert_err_with_msg {
         ($e:expr, $msg:expr) => {
             match $e.0.get(0) {
                 None => panic!("Expected an error"),
                 Some(&VerifierError { ref message, .. }) => {
                     if !message.contains($msg) {
                         #[cfg(feature = "std")]
--- a/third_party/rust/cranelift-codegen/src/write.rs
+++ b/third_party/rust/cranelift-codegen/src/write.rs
@@ -1,19 +1,19 @@
 //! Converting Cranelift IR to text.
 //!
 //! The `write` module provides the `write_function` function which converts an IR `Function` to an
 //! equivalent textual form. This textual form can be read back by the `cranelift-reader` crate.
 
-use entity::SecondaryMap;
-use ir::entities::AnyEntity;
-use ir::{DataFlowGraph, Ebb, Function, Inst, SigRef, Type, Value, ValueDef};
-use isa::{RegInfo, TargetIsa};
-use packed_option::ReservedValue;
-use std::fmt::{self, Write};
+use crate::entity::SecondaryMap;
+use crate::ir::entities::AnyEntity;
+use crate::ir::{DataFlowGraph, Ebb, Function, Inst, SigRef, Type, Value, ValueDef};
+use crate::isa::{RegInfo, TargetIsa};
+use crate::packed_option::ReservedValue;
+use core::fmt::{self, Write};
 use std::string::String;
 use std::vec::Vec;
 
 /// A `FuncWriter` used to decorate functions during printing.
 pub trait FuncWriter {
     /// Write the extended basic block header for the current function.
     fn write_ebb_header(
         &mut self,
@@ -37,16 +37,26 @@ pub trait FuncWriter {
 
     /// Write the preamble to `w`. By default, this uses `write_entity_definition`.
     fn write_preamble(
         &mut self,
         w: &mut Write,
         func: &Function,
         regs: Option<&RegInfo>,
     ) -> Result<bool, fmt::Error> {
+        self.super_preamble(w, func, regs)
+    }
+
+    /// Default impl of `write_preamble`
+    fn super_preamble(
+        &mut self,
+        w: &mut Write,
+        func: &Function,
+        regs: Option<&RegInfo>,
+    ) -> Result<bool, fmt::Error> {
         let mut any = false;
 
         for (ss, slot) in func.stack_slots.iter() {
             any = true;
             self.write_entity_definition(w, func, ss.into(), slot)?;
         }
 
         for (gv, gv_data) in &func.global_values {
@@ -86,18 +96,29 @@ pub trait FuncWriter {
             any = true;
             self.write_entity_definition(w, func, jt.into(), jt_data)?;
         }
 
         Ok(any)
     }
 
     /// Write an entity definition defined in the preamble to `w`.
+    fn write_entity_definition(
+        &mut self,
+        w: &mut Write,
+        func: &Function,
+        entity: AnyEntity,
+        value: &fmt::Display,
+    ) -> fmt::Result {
+        self.super_entity_definition(w, func, entity, value)
+    }
+
+    /// Default impl of `write_entity_definition`
     #[allow(unused_variables)]
-    fn write_entity_definition(
+    fn super_entity_definition(
         &mut self,
         w: &mut Write,
         func: &Function,
         entity: AnyEntity,
         value: &fmt::Display,
     ) -> fmt::Result {
         writeln!(w, "    {} = {}", entity, value)
     }
@@ -372,32 +393,32 @@ fn write_instruction(
     match type_suffix(func, inst) {
         Some(suf) => write!(w, "{}.{}", opcode, suf)?,
         None => write!(w, "{}", opcode)?,
     }
 
     write_operands(w, &func.dfg, isa, inst)?;
     writeln!(w)?;
 
-    // Value aliases come out on lines after the instruction defining the referrent.
+    // Value aliases come out on lines after the instruction defining the referent.
     for r in func.dfg.inst_results(inst) {
         write_value_aliases(w, aliases, *r, indent)?;
     }
     Ok(())
 }
 
 /// Write the operands of `inst` to `w` with a prepended space.
 pub fn write_operands(
     w: &mut Write,
     dfg: &DataFlowGraph,
     isa: Option<&TargetIsa>,
     inst: Inst,
 ) -> fmt::Result {
     let pool = &dfg.value_lists;
-    use ir::instructions::InstructionData::*;
+    use crate::ir::instructions::InstructionData::*;
     match dfg[inst] {
         Unary { arg, .. } => write!(w, " {}", arg),
         UnaryImm { imm, .. } => write!(w, " {}", imm),
         UnaryIeee32 { imm, .. } => write!(w, " {}", imm),
         UnaryIeee64 { imm, .. } => write!(w, " {}", imm),
         UnaryBool { imm, .. } => write!(w, " {}", imm),
         UnaryGlobalValue { global_value, .. } => write!(w, " {}", global_value),
         Binary { args, .. } => write!(w, " {}, {}", args[0], args[1]),
@@ -637,19 +658,19 @@ impl<'a> fmt::Display for DisplayValuesW
             }
         }
         Ok(())
     }
 }
 
 #[cfg(test)]
 mod tests {
-    use cursor::{Cursor, CursorPosition, FuncCursor};
-    use ir::types;
-    use ir::{ExternalName, Function, InstBuilder, StackSlotData, StackSlotKind};
+    use crate::cursor::{Cursor, CursorPosition, FuncCursor};
+    use crate::ir::types;
+    use crate::ir::{ExternalName, Function, InstBuilder, StackSlotData, StackSlotKind};
     use std::string::ToString;
 
     #[test]
     fn basic() {
         let mut f = Function::new();
         assert_eq!(f.to_string(), "function u0:0() fast {\n}\n");
 
         f.name = ExternalName::testcase("foo");
@@ -688,17 +709,17 @@ mod tests {
         assert_eq!(
             f.to_string(),
             "function %foo() fast {\n    ss0 = explicit_slot 4\n\nebb0(v0: i8, v1: f32x4):\n    return\n}\n"
         );
     }
 
     #[test]
     fn aliases() {
-        use ir::InstBuilder;
+        use crate::ir::InstBuilder;
 
         let mut func = Function::new();
         {
             let ebb0 = func.dfg.make_ebb();
             let mut pos = FuncCursor::new(&mut func);
             pos.insert_ebb(ebb0);
 
             // make some detached values for change_to_alias
--- a/third_party/rust/cranelift-entity/.cargo-checksum.json
+++ b/third_party/rust/cranelift-entity/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"a76fe4900987624504c61e99cf0c20c8dad64a42e77f0e43c0150c416679dd70","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"96ceffbfd88fb06e3b41aa4d3087cffbbf8441d04eba7ab09662a72ab600a321","src/boxed_slice.rs":"b17fae8f1bd8d970221ea0ff185a62dce0da2324abe95c8c8577b06c56cd11cb","src/iter.rs":"cd2336dc29891e4e5060fb24f1d2f885a4606ea6580e9bd0f261843f12e31a1b","src/keys.rs":"5eca885b3e7ba19936c24066253bf47ebbd9d0a808a84dc910041e8e7be86349","src/lib.rs":"dc3255cc56a089c696de14077ab7f49ceb95011c96ded22c6ca06d8418ff3b78","src/list.rs":"15d9762396439eb2e835401a7b85e190e097fa5eb863decfb67fb677f1093335","src/map.rs":"059ef89fa5022b56521162a2fe4b837d2bee84fdfcefd2c9973a910a6fa3417d","src/packed_option.rs":"19b2d49e0233e05e3dc39424187644af546934fe92b7200543fe10728ec831f6","src/primary.rs":"ccbafce1bc2fe15e35f844d32b511b3d422885dd9b4eaa20818b6f865cdb45f8","src/set.rs":"e227411e689c43c2cfea622ff46288598f05dfbe0e8ba652cfb04c6e3ecc192f","src/sparse.rs":"1a0a30f10203df406bd628aedb5242f71f51d35873142062c5b060ce3feae1ea"},"package":"d4df40e26c0cf7b4d86919cb995bb412ee3001cc18e4f3c83a903f30b7007d8b"}
\ No newline at end of file
+{"files":{"Cargo.toml":"5cf393cd6f9778b92793bce26ed00834913064d7a69f99632cd3703b198a1298","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"96ceffbfd88fb06e3b41aa4d3087cffbbf8441d04eba7ab09662a72ab600a321","src/boxed_slice.rs":"687428ee0442013c0d5962dd78d0964830233bc4cb19aa530d30da0f1dc437a9","src/iter.rs":"4a4d3309fe9aad14fd7702f02459f4277b4ddb50dba700e58dcc75665ffebfb3","src/keys.rs":"b8c2fba26dee15bf3d1880bb2b41e8d66fe1428d242ee6d9fd30ee94bbd0407d","src/lib.rs":"139fc0eeed2e8cde2b82b8b7402e8c7cd079a9fbbf1ec692622e5ad0c10d9faf","src/list.rs":"fc3decc81bcef92e106aae53e586a0ef21d70916fa53a48f7b813c5da44b8dc2","src/map.rs":"f35031459aca446734726c132c0a571482f1ec2ca8221b352d2e18c74950e977","src/packed_option.rs":"9d47f5b8302ee685c096817e376144e363507d1c77ef562d3ae4dbddae568195","src/primary.rs":"e95e4b2ed36413d80c4c0dcfc19dcf8a9f52e34467aaec196c774fd639747028","src/set.rs":"ec0ff7a9ee674c90ff9d06ea1fd4ab05039369146c2d259f476c6f612417933f","src/sparse.rs":"cf345a81d69a5dddaed4778b6aaaf06c70da2c1fd4cd21e366ed6ca5906ffdab"},"package":"c4ccc3743848cbb53e58b62685703dc12ea553c3bc8f21db76f23c68054eb69a"}
\ No newline at end of file
--- a/third_party/rust/cranelift-entity/Cargo.toml
+++ b/third_party/rust/cranelift-entity/Cargo.toml
@@ -6,27 +6,29 @@
 # to registry (e.g. crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
+edition = "2018"
 name = "cranelift-entity"
-version = "0.26.0"
+version = "0.28.0"
 authors = ["The Cranelift Project Developers"]
 description = "Data structures using entity references as mapping keys"
 documentation = "https://cranelift.readthedocs.io/"
 readme = "README.md"
 keywords = ["entity", "set", "map"]
 categories = ["no-std"]
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/CraneStation/cranelift"
 
 [features]
+core = []
 default = ["std"]
 std = []
 [badges.maintenance]
 status = "experimental"
 
 [badges.travis-ci]
 repository = "CraneStation/cranelift"
--- a/third_party/rust/cranelift-entity/src/boxed_slice.rs
+++ b/third_party/rust/cranelift-entity/src/boxed_slice.rs
@@ -1,16 +1,17 @@
 //! Boxed slices for `PrimaryMap`.
 
-use iter::{Iter, IterMut};
-use keys::Keys;
-use std::marker::PhantomData;
-use std::ops::{Index, IndexMut};
-use std::slice;
-use EntityRef;
+use crate::iter::{Iter, IterMut};
+use crate::keys::Keys;
+use crate::EntityRef;
+use core::marker::PhantomData;
+use core::ops::{Index, IndexMut};
+use core::slice;
+use std::boxed::Box;
 
 /// A slice mapping `K -> V` allocating dense entity references.
 ///
 /// The `BoxedSlice` data structure uses the dense index space to implement a map with a boxed
 /// slice.
 #[derive(Debug, Clone)]
 pub struct BoxedSlice<K, V>
 where
@@ -78,21 +79,16 @@ where
         Iter::new(self.elems.iter())
     }
 
     /// Iterate over all the keys and values in this map, mutable edition.
     pub fn iter_mut(&mut self) -> IterMut<K, V> {
         IterMut::new(self.elems.iter_mut())
     }
 
-    /// Get the key that will be assigned to the next pushed value.
-    pub fn next_key(&self) -> K {
-        K::new(self.elems.len())
-    }
-
     /// Returns the last element that was inserted in the map.
     pub fn last(&self) -> Option<&V> {
         self.elems.last()
     }
 }
 
 /// Immutable indexing into a `BoxedSlice`.
 /// The indexed value must be in the map.
@@ -139,17 +135,18 @@ where
     fn into_iter(self) -> Self::IntoIter {
         IterMut::new(self.elems.iter_mut())
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
-    use primary::PrimaryMap;
+    use crate::primary::PrimaryMap;
+    use std::vec::Vec;
 
     // `EntityRef` impl for testing.
     #[derive(Clone, Copy, Debug, PartialEq, Eq)]
     struct E(u32);
 
     impl EntityRef for E {
         fn new(i: usize) -> Self {
             E(i as u32)
--- a/third_party/rust/cranelift-entity/src/iter.rs
+++ b/third_party/rust/cranelift-entity/src/iter.rs
@@ -1,14 +1,14 @@
 //! A double-ended iterator over entity references and entities.
 
-use std::iter::Enumerate;
-use std::marker::PhantomData;
-use std::slice;
-use EntityRef;
+use crate::EntityRef;
+use core::iter::Enumerate;
+use core::marker::PhantomData;
+use core::slice;
 
 /// Iterate over all keys in order.
 pub struct Iter<'a, K: EntityRef, V>
 where
     V: 'a,
 {
     enumerate: Enumerate<slice::Iter<'a, V>>,
     unused: PhantomData<K>,
--- a/third_party/rust/cranelift-entity/src/keys.rs
+++ b/third_party/rust/cranelift-entity/src/keys.rs
@@ -1,15 +1,15 @@
 //! A double-ended iterator over entity references.
 //!
-//! When `std::iter::Step` is stablized, `Keys` could be implemented as a wrapper around
-//! `std::ops::Range`, but for now, we implment it manually.
+//! When `core::iter::Step` is stabilized, `Keys` could be implemented as a wrapper around
+//! `core::ops::Range`, but for now, we implement it manually.
 
-use std::marker::PhantomData;
-use EntityRef;
+use crate::EntityRef;
+use core::marker::PhantomData;
 
 /// Iterate over all keys in order.
 pub struct Keys<K: EntityRef> {
     pos: usize,
     rev_pos: usize,
     unused: PhantomData<K>,
 }
 
--- a/third_party/rust/cranelift-entity/src/lib.rs
+++ b/third_party/rust/cranelift-entity/src/lib.rs
@@ -10,19 +10,19 @@
 //!   purposes. The entity reference types can be smaller, allowing for more compact data
 //!   structures.
 //!
 //! The `EntityRef` trait should be implemented by types to be used as indexed. The `entity_impl!`
 //! macro provides convenient defaults for types wrapping `u32` which is common.
 //!
 //! - [`PrimaryMap`](struct.PrimaryMap.html) is used to keep track of a vector of entities,
 //!   assigning a unique entity reference to each.
-//! - [`SecondaryMap`](struct.SecondaryMap.html) is used to associate secondary information to an entity.
-//!   The map is implemented as a simple vector, so it does not keep track of which entities have
-//!   been inserted. Instead, any unknown entities map to the default value.
+//! - [`SecondaryMap`](struct.SecondaryMap.html) is used to associate secondary information to an
+//!   entity. The map is implemented as a simple vector, so it does not keep track of which
+//!   entities have been inserted. Instead, any unknown entities map to the default value.
 //! - [`SparseMap`](struct.SparseMap.html) is used to associate secondary information to a small
 //!   number of entities. It tracks accurately which entities have been inserted. This is a
 //!   specialized data structure which can use a lot of memory, so read the documentation before
 //!   using it.
 //! - [`EntitySet`](struct.EntitySet.html) is used to represent a secondary set of entities.
 //!   The set is implemented as a simple vector, so it does not keep track of which entities have
 //!   been inserted into the primary map. Instead, any unknown entities are not in the set.
 //! - [`EntityList`](struct.EntityList.html) is a compact representation of lists of entity
@@ -30,53 +30,51 @@
 //!   `Vec`.
 
 #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
 #![warn(unused_import_braces)]
 #![cfg_attr(feature = "std", deny(unstable_features))]
 #![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]