Skip to content

Instantly share code, notes, and snippets.

--- good 2021-05-20 08:57:47.000000000 -0700
+++ bad 2021-05-20 08:56:49.000000000 -0700
@@ -227,11 +227,31 @@
INFO rustc_metadata::creader resolving crate `unwind`
INFO rustc_metadata::creader resolving crate `proc_macros`
INFO rustc_metadata::creader falling back to a load
-INFO rustc_metadata::locator dylib reading metadata from: /Users/acrichton/code/wat/target/debug/deps/libproc_macros-5d137cd480dff532.dylib
-INFO rustc_metadata::creader register crate `proc_macros` (cnum = 18. private_dep = false)
-INFO rustc_metadata::creader resolving crate `proc_macros`
-INFO rustc_metadata::creader resolving crate `proc_macros`
;; documentation comment
type $my_record = record {
;; field documentation
field1: u32,
field2: $other_record,
field3: list[string],
field4: in-buffer[u8],
}
;; comment on this type
(module
(import "" "" (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64)))
(func (export "a")
i64.const 0
i64.const 1
i64.const 2
i64.const 3
i64.const 4
i64.const 5
i64.const 6
diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs
index 0380c447d..a0cc41d85 100644
--- a/src/cargo/core/registry.rs
+++ b/src/cargo/core/registry.rs
@@ -726,7 +726,9 @@ fn lock(
// If this dependency did not have a locked version, then we query
// all known locked packages to see if they match this dependency.
- // If anything does then we lock it to that and move on.
+ // If anything does then we lock it to that and move on. This will help
0x0000 | 00 61 73 6d | version 1
| 01 00 00 00
0x0008 | 01 0f | type section
0x000a | 02 | 2 count
0x000b | 60 00 00 | [type 0] Func(FuncType { params: [], returns: [] })
0x000e | 62 02 01 66 | [type 1] Instance(InstanceType { exports: [ExportType { name: "f", ty: Function(0) }, ExportType { name: "g", ty: Global(GlobalType { content_type: I32, mutable: false }) }] })
| 00 00 01 67
| 03 7f 00
0x0019 | 02 06 | import section
0x001b | 01 | 1 count
use std::panic;
// Goal: Use catch_unwind() and extract the panic message from the result.
//
fn main() {
let result = panic::catch_unwind(|| {
panic!("oh no!");
});
assert!(result.is_err());
(module
(func $test (param i32) (result externref)
i32.const 0
if
else
end
local.get 0
table.get 0
)
(table 4 externref)
(module
(func)
(table $table 100 externref)
(func (export "run") (param externref externref externref externref externref externref externref externref externref externref)
(call 0)
(table.set $table (i32.const 2111897723) (table.get $table (i32.const 8380672)))
(table.set $table (i32.const 2246115459) (table.get $table (i32.const 8904960)))
(table.set $table (i32.const 2380333195) (table.get $table (i32.const 9429248)))
(table.set $table (i32.const 2514550931) (table.get $table (i32.const 9953536)))
(table.set $table (i32.const 2648768667) (table.get $table (i32.const 10477824)))
(elem $f3z)
(module $$esl
(func $qz??i32x4.bitmaske
(export "c $555in555E")
(export "0554M******+*****e 4$qq")
)
(module
(export "q**")
(export "00AGGGGle $$qq")
)