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

ices/97806.rs: fixed with errors #1305

Merged
merged 1 commit into from
Jun 12, 2022
Merged

ices/97806.rs: fixed with errors #1305

merged 1 commit into from
Jun 12, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97806

struct TestErr<T> {
     field: std::marker::PhantomData<T>,
}

impl<T> TestErr<T> {
    fn func_a() {}

    fn func_b() {
        Self::func_a();

        let variable = None;
    }
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0282]: type annotations needed for `Option<T>`
  --> /home/runner/work/glacier/glacier/ices/97806.rs:11:13
   |
11 |         let variable = None;
   |             ^^^^^^^^
   |
help: consider giving `variable` an explicit type, where the type for type parameter `T` is specified
   |
11 |         let variable: Option<T> = None;
   |                     +++++++++++

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0282]: type annotations needed for `Option<T>`
  --> /home/runner/work/glacier/glacier/ices/97806.rs:11:13
   |
11 |         let variable = None;
   |             ^^^^^^^^
   |
help: consider giving `variable` an explicit type, where the type for type parameter `T` is specified
   |
11 |         let variable: Option<T> = None;
   |                     +++++++++++

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
==============
@JohnTitor JohnTitor merged commit d322198 into master Jun 12, 2022
@JohnTitor JohnTitor deleted the autofix/ices/97806.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