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

ices/51388.sh: fixed with errors #1659

Merged
merged 1 commit into from
Sep 21, 2023
Merged

ices/51388.sh: fixed with errors #1659

merged 1 commit into from
Sep 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 6, 2023

Issue: rust-lang/rust#51388

#!/bin/bash

cat > bar.rs << 'EOF'
pub fn hello_world()
{
    println!("hello world");
}
EOF

cat > foo.rs << 'EOF'
extern crate bar;

pub fn foo()
{
    bar::hello_world();
}
EOF

rustc --crate-type rlib --emit metadata bar.rs
rustc --crate-type rlib --emit llvm-bc bar.rs
rustc --crate-type rlib --emit llvm-bc foo.rs -L .
=== stdout ===
=== stderr ===
error: missing optimized MIR for an item in the crate `bar`
  |
note: missing optimized MIR for this item (was the crate `bar` compiled with `--emit=metadata`?)
 --> /tmp/.tmpNaGwOW/bar.rs:1:1
  |
1 | pub fn hello_world()
  | ^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: missing optimized MIR for an item in the crate `bar`
  |
note: missing optimized MIR for this item (was the crate `bar` compiled with `--emit=metadata`?)
 --> /tmp/.tmpNaGwOW/bar.rs:1:1
  |
1 | pub fn hello_world()
  | ^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit bd054af into master Sep 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/51388.sh branch September 21, 2023 18:33
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