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

ices/72076.rs: fixed with errors #378

Merged
merged 1 commit into from
May 23, 2020
Merged

ices/72076.rs: fixed with errors #378

merged 1 commit into from
May 23, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#72076

trait X {
    type S;
    fn f() -> Self::S {}
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/72076.rs:3:23
  |
3 |     fn f() -> Self::S {}
  |                       ^^ expected associated type, found `()`
  |
  = note: expected associated type `<Self as X>::S`
                   found unit type `()`
  = help: consider constraining the associated type `<Self as X>::S` to `()` or calling a method that returns `<Self as X>::S`
  = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/72076.rs:3:23
  |
3 |     fn f() -> Self::S {}
  |                       ^^ expected associated type, found `()`
  |
  = note: expected associated type `<Self as X>::S`
                   found unit type `()`
  = help: consider constraining the associated type `<Self as X>::S` to `()` or calling a method that returns `<Self as X>::S`
  = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
==============
@JohnTitor JohnTitor merged commit 9a3bedc into master May 23, 2020
@JohnTitor JohnTitor deleted the autofix/ices/72076.rs branch May 23, 2020 12:15
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