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

ices/80678.rs: fixed with errors #1382

Merged
merged 1 commit into from
Aug 13, 2022
Merged

ices/80678.rs: fixed with errors #1382

merged 1 commit into from
Aug 13, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#80678

#![allow(bare_trait_objects)]

trait Bar = PartialEq;
fn main() {
    a: Bar
}
=== stdout ===
=== stderr ===
error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/80678.rs:5:5
  |
5 |     a: Bar
  |     ^ expecting a type here because of type ascription
  |
help: you might have meant to write a `struct` literal
  |
4 ~ fn main() { SomeStruct {
5 |     a: Bar
6 ~ }}
  |

error[E0658]: trait aliases are experimental
 --> /home/runner/work/glacier/glacier/ices/80678.rs:3:1
  |
3 | trait Bar = PartialEq;
  | ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #41517 <https://github.com/rust-lang/rust/issues/41517> for more information
  = help: add `#![feature(trait_alias)]` to the crate attributes to enable

error[E0393]: the type parameter `Rhs` must be explicitly specified
 --> /home/runner/work/glacier/glacier/ices/80678.rs:5:8
  |
5 |     a: Bar
  |        ^^^ missing reference to `Rhs`
  |
  = note: because of the default `Self` reference, type parameters must be specified on object types

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/80678.rs:5:5
  |
5 |     a: Bar
  |     ^ expecting a type here because of type ascription
  |
help: you might have meant to write a `struct` literal
  |
4 ~ fn main() { SomeStruct {
5 |     a: Bar
6 ~ }}
  |

error[E0658]: trait aliases are experimental
 --> /home/runner/work/glacier/glacier/ices/80678.rs:3:1
  |
3 | trait Bar = PartialEq;
  | ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #41517 <rust-lang/rust#41517> for more information
  = help: add `#![feature(trait_alias)]` to the crate attributes to enable

error[E0393]: the type parameter `Rhs` must be explicitly specified
 --> /home/runner/work/glacier/glacier/ices/80678.rs:5:8
  |
5 |     a: Bar
  |        ^^^ missing reference to `Rhs`
  |
  = note: because of the default `Self` reference, type parameters must be specified on object types

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0393, E0425, E0658.
For more information about an error, try `rustc --explain E0393`.
==============
@Alexendoo Alexendoo merged commit 17f40f5 into master Aug 13, 2022
@Alexendoo Alexendoo deleted the autofix/ices/80678.rs branch August 13, 2022 14:18
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