Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ impl Session {
let fuel = self.optimization_fuel_limit.get();
ret = fuel != 0;
if fuel == 0 && !self.out_of_fuel.get() {
println!("optimization-fuel-exhausted: {}", msg());
eprintln!("optimization-fuel-exhausted: {}", msg());
self.out_of_fuel.set(true);
} else if fuel > 0 {
self.optimization_fuel_limit.set(fuel - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
control.compilation_done.callback = box move |state| {
old_callback(state);
let sess = state.session;
println!("Fuel used by {}: {}",
eprintln!("Fuel used by {}: {}",
sess.print_fuel_crate.as_ref().unwrap(),
sess.print_fuel.get());
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/optimization-fuel-0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

use std::mem::size_of;

// compile-flags: -Z fuel=foo=0
// (#55495: The --error-format is to sidestep an issue in our test harness)
// compile-flags: --error-format human -Z fuel=foo=0

struct S1(u8, u16, u8);
struct S2(u8, u16, u8);
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/optimization-fuel-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

use std::mem::size_of;

// compile-flags: -Z fuel=foo=1
// (#55495: The --error-format is to sidestep an issue in our test harness)
// compile-flags: --error-format human -Z fuel=foo=1

struct S1(u8, u16, u8);
struct S2(u8, u16, u8);
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/print-fuel/print-fuel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#![crate_name="foo"]
#![allow(dead_code)]

// compile-flags: -Z print-fuel=foo
// (#55495: The --error-format is to sidestep an issue in our test harness)
// compile-flags: --error-format human -Z print-fuel=foo
// compile-pass

struct S1(u8, u16, u8);
Expand Down