Skip to content

Instantly share code, notes, and snippets.

const a = new FinalizationRegistry(v => {
console.log('a');
console.log('b', v);
for (const val in v) {
console.log(val);
}
});
function f() {
const obj = {a: 3};
#![crate_type = "rlib"]
pub enum Code {
A0,
A1,
A2,
A3,
A4,
A5,
A6,
#![crate_type = "rlib"]
pub enum Code {
A0,
A1,
A2,
A3,
A4,
A5,
A6,
A7,
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
--- 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
--- 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
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();
#![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::*;
#![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 {
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()))