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

ices/96638.rs: fixed with errors #1237

Merged
merged 1 commit into from
May 5, 2022
Merged

ices/96638.rs: fixed with errors #1237

merged 1 commit into from
May 5, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 4, 2022

Issue: rust-lang/rust#96638

fn f(_: usize, _: &usize, _: usize) {}

fn arg<T>() -> T { todo!() }

fn main() {
    let x = arg(); // `x` must be inferred
    f(&x, ""); // The reference on `&x` is important to reproduce the ICE
}
=== stdout ===
=== stderr ===
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/96638.rs:7:5
  |
7 |     f(&x, ""); // The reference on `&x` is important to reproduce the ICE
  |     ^ -- an argument of type `usize` is missing
  |
note: function defined here
 --> /home/runner/work/glacier/glacier/ices/96638.rs:1:4
  |
1 | fn f(_: usize, _: &usize, _: usize) {}
  |    ^ --------  ---------  --------
help: provide the argument
  |
7 |     f({usize}, &x, {usize}); // The reference on `&x` is important to reproduce the ICE
  |     ~~~~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.
==============

=== stdout ===
=== stderr ===
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/96638.rs:7:5
  |
7 |     f(&x, ""); // The reference on `&x` is important to reproduce the ICE
  |     ^ -- an argument of type `usize` is missing
  |
note: function defined here
 --> /home/runner/work/glacier/glacier/ices/96638.rs:1:4
  |
1 | fn f(_: usize, _: &usize, _: usize) {}
  |    ^ --------  ---------  --------
help: provide the argument
  |
7 |     f({usize}, &x, {usize}); // The reference on `&x` is important to reproduce the ICE
  |     ~~~~~~~~~~~~~~~~~~~~~~~

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.
==============
@Alexendoo Alexendoo merged commit ddc1403 into master May 5, 2022
@Alexendoo Alexendoo deleted the autofix/ices/96638.rs branch May 5, 2022 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