Skip to content

Instantly share code, notes, and snippets.

@sruggier
Created May 12, 2014 02:29
Show Gist options
  • Save sruggier/79ea3c87ea843a52d716 to your computer and use it in GitHub Desktop.
Save sruggier/79ea3c87ea843a52d716 to your computer and use it in GitHub Desktop.
Rust issue #13681 minimal trigger
#!/bin/bash
BUILD_DIR=./build
rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
RUST_ARGS=(-A dead-code -g -L "$BUILD_DIR" --out-dir="$BUILD_DIR")
echo "Building l" &&
rustc "${RUST_ARGS[@]}" l.rs &&
echo "Building C" &&
rustc "${RUST_ARGS[@]}" -Z lto C.rs
extern crate l;
pub struct C;
pub fn p() -> C {
C
}
fn main() { }
#![crate_type = "rlib"]
struct S;
impl S {
fn f(&mut self) { }
}
./build.sh 2>&1 | tee /tmp/build.log | grep -q 'Ty == resolve(Ty.getRef()) && "type was not uniqued'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment