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

ices/97698.rs: fixed with errors #1304

Merged
merged 1 commit into from
Jun 12, 2022
Merged

ices/97698.rs: fixed with errors #1304

merged 1 commit into from
Jun 12, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97698

use std::ffi::CString;

impl Lock {
    pub fn new() {
        if () == -1 {
            CString::new();
        }
    }
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0412]: cannot find type `Lock` in this scope
 --> /home/runner/work/glacier/glacier/ices/97698.rs:3:6
  |
3 | impl Lock {
  |      ^^^^ not found in this scope

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/97698.rs:5:18
  |
5 |         if () == -1 {
  |                  ^^ expected `()`, found integer

error[E0061]: this function takes 1 argument but 0 arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/97698.rs:6:13
  |
6 |             CString::new();
  |             ^^^^^^^^^^^^-- an argument is missing
  |
note: associated function defined here
help: provide the argument
  |
6 |             CString::new({_});
  |             ~~~~~~~~~~~~~~~~~

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0061, E0308, E0412.
For more information about an error, try `rustc --explain E0061`.
==============

=== stdout ===
=== stderr ===
error[E0412]: cannot find type `Lock` in this scope
 --> /home/runner/work/glacier/glacier/ices/97698.rs:3:6
  |
3 | impl Lock {
  |      ^^^^ not found in this scope

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/97698.rs:5:18
  |
5 |         if () == -1 {
  |                  ^^ expected `()`, found integer

error[E0061]: this function takes 1 argument but 0 arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/97698.rs:6:13
  |
6 |             CString::new();
  |             ^^^^^^^^^^^^-- an argument is missing
  |
note: associated function defined here
help: provide the argument
  |
6 |             CString::new({_});
  |             ~~~~~~~~~~~~~~~~~

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0061, E0308, E0412.
For more information about an error, try `rustc --explain E0061`.
==============
@JohnTitor JohnTitor merged commit 74551aa into master Jun 12, 2022
@JohnTitor JohnTitor deleted the autofix/ices/97698.rs branch June 12, 2022 09:41
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