Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/85955.sh: fixed with no errors #848

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#85955

#!/bin/bash

cat << BLOCK > Cargo.toml
[package]
name = "abc"
version = "0.1.0"
edition = "2018"
BLOCK

mkdir -p src tests

cat << BLOCK > build.rs
fn main() {
    std::fs::write(
        &std::path::Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("crash.rs"),
        "pub struct A;",
    )
    .unwrap();
}
BLOCK

cat << BLOCK > src/lib.rs
include!(concat!(env!("OUT_DIR"), "/", "crash.rs"));
BLOCK

cat << BLOCK > tests/crash.rs
extern crate abc;
include!(concat!(env!("OUT_DIR"), "/", "crash.rs"));
BLOCK

cargo test
=== stdout ===

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== stderr ===
   Compiling abc v0.1.0 (/tmp/.tmpvFL91E)
    Finished test [unoptimized + debuginfo] target(s) in 1.71s
     Running unittests (target/debug/deps/abc-8f131f2288712604)
     Running tests/crash.rs (target/debug/deps/crash-51699346637589e5)
   Doc-tests abc
==============

=== stdout ===

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== stderr ===
   Compiling abc v0.1.0 (/tmp/.tmpvFL91E)
    Finished test [unoptimized + debuginfo] target(s) in 1.71s
     Running unittests (target/debug/deps/abc-8f131f2288712604)
     Running tests/crash.rs (target/debug/deps/crash-51699346637589e5)
   Doc-tests abc
==============
@Alexendoo Alexendoo merged commit 55478d9 into master Jun 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/85955.sh branch June 23, 2021 12:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants