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

ices/73993.rs: fixed with errors #440

Merged
merged 1 commit into from
Jul 17, 2020
Merged

ices/73993.rs: fixed with errors #440

merged 1 commit into from
Jul 17, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#73993

#![crate_type = "lib"]

pub struct Fixed64(i64);

pub fn div(f: Fixed64) {
    f.0 / 0;
}
=== stdout ===
=== stderr ===
warning: unused arithmetic operation that must be used
 --> /home/runner/work/glacier/glacier/ices/73993.rs:6:5
  |
6 |     f.0 / 0;
  |     ^^^^^^^
  |
  = note: `#[warn(unused_must_use)]` on by default

error: this operation will panic at runtime
 --> /home/runner/work/glacier/glacier/ices/73993.rs:6:5
  |
6 |     f.0 / 0;
  |     ^^^^^^^ attempt to divide _ by zero
  |
  = note: `#[deny(unconditional_panic)]` on by default

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused arithmetic operation that must be used
 --> /home/runner/work/glacier/glacier/ices/73993.rs:6:5
  |
6 |     f.0 / 0;
  |     ^^^^^^^
  |
  = note: `#[warn(unused_must_use)]` on by default

error: this operation will panic at runtime
 --> /home/runner/work/glacier/glacier/ices/73993.rs:6:5
  |
6 |     f.0 / 0;
  |     ^^^^^^^ attempt to divide _ by zero
  |
  = note: `#[deny(unconditional_panic)]` on by default

error: aborting due to previous error; 1 warning emitted

==============
@Alexendoo Alexendoo merged commit 707472c into master Jul 17, 2020
@JohnTitor JohnTitor deleted the autofix/ices/73993.rs branch July 19, 2020 14:34
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