Skip to content

Instantly share code, notes, and snippets.

#![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()))
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
fn main() {
let n = 42;
println!("fib({}) = {}", n, fib(n));
}
fn fib(n: u32) -> u32 {
if n <= 2 {
1
} else {
fib(n - 1) + fib(n - 2)
; ModuleID = 'foo.3a1fbbbh-cgu.0'
source_filename = "foo.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
; Function Attrs: nounwind
define void @bar() unnamed_addr #0 {
start:
tail call void @inline_me()
ret void
fn hex_encode_fallback<'a>(src: &[u8], dst: &'a mut [u8]) -> Result<&'a str, usize> {
fn hex(byte: u8) -> u8 {
static TABLE: &[u8] = b"0123456789abcdef";
TABLE[byte as usize]
}
for (byte, slots) in src.iter().zip(dst.chunks_mut(2)) {
slots[0] = hex((*byte >> 4) & 0xf);
slots[1] = hex(*byte & 0xf);
}
JITDUMP specification version 2
Last Revised: 09/15/2016
Author: Stephane Eranian <eranian@gmail.com>
--------------------------------------------------------
| Revision | Date | Description |
--------------------------------------------------------
| 1 | 09/07/2016 | Initial revision |
--------------------------------------------------------
| 2 | 09/15/2016 | Add JIT_CODE_UNWINDING_INFO |
#![allow(warnings)]
#![crate_type = "rlib"]
use std::io::Read;
type Result<T> = std::result::Result<T, ()>;
pub struct TypeSectionReader<'a>(&'a ());
pub struct ImportSectionReader<'a>(&'a ());
pub struct ModuleSectionReader<'a>(&'a ());
--- before 2020-06-25 13:55:56.943297377 -0700
+++ after 2020-06-25 13:56:35.715449471 -0700
@@ -1,8 +1,8 @@
if value != null:
value.ref_count += 1
let current_elem = table[index]
+table[index] = value
if current_elem != null:
current_elem.ref_count -= 1
if current_elem.ref_count == 0: