Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Crichton alexcrichton

View GitHub Profile
View foo.rs
#![crate_type = "rlib"]
pub enum Code {
A0,
A1,
A2,
A3,
A4,
A5,
A6,
View foo.rs
#![crate_type = "rlib"]
pub enum Code {
A0,
A1,
A2,
A3,
A4,
A5,
A6,
A7,
View gist:35f4f70b91f7999b840417816213f9cb
diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs
index 1187def1d..07d50041e 100644
--- a/src/cargo/core/package.rs
+++ b/src/cargo/core/package.rs
@@ -899,11 +899,9 @@ impl<'a, 'cfg> Downloads<'a, 'cfg> {
break Ok(pair);
}
assert!(!self.pending.is_empty());
- let timeout = self
- .set
View gist:5dacc81225d7df474b07588f8f7effe3
--- m2 2020-07-19 10:25:16.219914330 -0700
+++ m3 2020-07-19 10:25:18.543914882 -0700
@@ -118,8 +118,7 @@
7f6cdcaa6000-7f6cdcca6000 rw-p 00000000 00:00 0
7f6cdcca6000-7f6cdcca7000 ---p 00000000 00:00 0
7f6cdcca7000-7f6cdcea7000 rw-p 00000000 00:00 0
-7f6cdd147000-7f6cdd149000 rw-p 00000000 00:00 0
-7f6cdd149000-7f6cdd161000 r-xp 00000000 00:00 0
+7f6cdd147000-7f6cdd161000 r-xp 00000000 00:00 0
7f6cdd161000-7f6cdd162000 ---p 00000000 00:00 0
View gist:8e351fc17500fa2ef6f014f0100a4456
--- m1 2020-07-19 10:25:13.379913654 -0700
+++ m2 2020-07-19 10:25:16.219914330 -0700
@@ -118,6 +118,7 @@
7f6cdcaa6000-7f6cdcca6000 rw-p 00000000 00:00 0
7f6cdcca6000-7f6cdcca7000 ---p 00000000 00:00 0
7f6cdcca7000-7f6cdcea7000 rw-p 00000000 00:00 0
+7f6cdd147000-7f6cdd149000 rw-p 00000000 00:00 0
7f6cdd149000-7f6cdd161000 r-xp 00000000 00:00 0
7f6cdd161000-7f6cdd162000 ---p 00000000 00:00 0
7f6cdd162000-7f6cdd164000 rw-p 00000000 00:00 0
View wasmtime.rs
use wasmtime::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut config = Config::new();
config.profiler(ProfilingStrategy::JitDump)?;
let engine = Engine::new(&config);
let store = Store::new(&engine);
let module = Module::from_file(&engine, "./fib.wasm")?;
let instance = Instance::new(&store, &module, &[])?;
let start = instance.get_func("main").unwrap();
View foo.rs
#![crate_type = "rlib"]
#![cfg_attr(crate_level, allow(elided_lifetimes_in_paths))]
#![cfg_attr(crate_level_warnings, allow(warnings))]
mod foo {
#![allow(elided_lifetimes_in_paths)]
#![allow(warnings)]
use std::fmt::*;
View foo.rs
#![crate_type = "rlib"]
mod foo {
#![allow(elided_lifetimes_in_paths)]
use std::fmt::*;
struct A;
impl Debug for A {
fn fmt(&self, _f: &mut Formatter) -> Result {
View gist:ad665856b33acf2bdd0a1e366b1a895c
diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs
index cf406e8dd..77c164671 100644
--- a/src/cargo/sources/path.rs
+++ b/src/cargo/sources/path.rs
@@ -522,6 +522,7 @@ impl<'cfg> Source for PathSource<'cfg> {
fn fingerprint(&self, pkg: &Package) -> CargoResult<String> {
let (max, max_path) = self.last_modified_file(pkg)?;
+ let max_path = max_path.strip_prefix(&self.path).unwrap_or(&max_path);
Ok(format!("{} ({})", max, max_path.display()))
View out.log
failed test: tests/testsuite/proposals/function-references/br_on_null.wast
Caused by:
unexpected token, expected one of: `func`, `extern`, `any`, `exn`, `eq`, `i31`, an index
--> tests/testsuite/proposals/function-references/br_on_null.wast:20:66
|
20 | (func (export "nullable-null") (result i32) (call $n (ref.null (type $t))))
| ^
failed test: tests/testsuite/proposals/function-references/br_table.wast
You can’t perform that action at this time.