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

ices/67945-3.rs: fixed with errors #350

Merged
merged 1 commit into from
May 6, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#67945

// Note: Centril asked in the issue to
// include all variants in a regression test.

// even more reduced version by Centril
#![feature(type_ascription)]

enum Bug<S> {
    Var = 0: S,
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `67945_3`
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:5:1
  |
5 | / #![feature(type_ascription)]
6 | |
7 | | enum Bug<S> {
8 | |     Var = 0: S,
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/67945-3.rs`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:8:11
  |
7 | enum Bug<S> {
  |          - this type parameter
8 |     Var = 0: S,
  |           ^ expected type parameter `S`, found integer
  |
  = note: expected type parameter `S`
                       found type `{integer}`
  = help: type parameters must be constrained to match other types
  = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:8:11
  |
7 | enum Bug<S> {
  |          - this type parameter
8 |     Var = 0: S,
  |           ^^^^ expected `isize`, found type parameter `S`
  |
  = note:        expected type `isize`
          found type parameter `S`
  = help: type parameters must be constrained to match other types
  = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `67945_3`
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:5:1
  |
5 | / #![feature(type_ascription)]
6 | |
7 | | enum Bug<S> {
8 | |     Var = 0: S,
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/67945-3.rs`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:8:11
  |
7 | enum Bug<S> {
  |          - this type parameter
8 |     Var = 0: S,
  |           ^ expected type parameter `S`, found integer
  |
  = note: expected type parameter `S`
                       found type `{integer}`
  = help: type parameters must be constrained to match other types
  = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/67945-3.rs:8:11
  |
7 | enum Bug<S> {
  |          - this type parameter
8 |     Var = 0: S,
  |           ^^^^ expected `isize`, found type parameter `S`
  |
  = note:        expected type `isize`
          found type parameter `S`
  = help: type parameters must be constrained to match other types
  = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0601.
For more information about an error, try `rustc --explain E0308`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one as well.

@JohnTitor JohnTitor merged commit 390e036 into master May 6, 2020
@JohnTitor JohnTitor deleted the autofix/ices/67945-3.rs branch May 6, 2020 05:21
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