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

ices/83613.rs: fixed with errors #711

Merged
merged 1 commit into from
Apr 8, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 8, 2021

Issue: rust-lang/rust#83613

trait OpaqueTrait {}
impl<T> OpaqueTrait for T {}
type OpaqueType = impl OpaqueTrait;
fn mk_opaque() -> OpaqueType {
    || 0
}
trait AnotherTrait {}
impl<T: Send> AnotherTrait for T {}
impl AnotherTrait for OpaqueType {}
=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/83613.rs:3:19
  |
3 | type OpaqueType = impl OpaqueTrait;
  |                   ^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `83613`
 --> /home/runner/work/glacier/glacier/ices/83613.rs:1:1
  |
1 | / trait OpaqueTrait {}
2 | | impl<T> OpaqueTrait for T {}
3 | | type OpaqueType = impl OpaqueTrait;
4 | | fn mk_opaque() -> OpaqueType {
... |
8 | | impl<T: Send> AnotherTrait for T {}
9 | | impl AnotherTrait for OpaqueType {}
  | |___________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/83613.rs`

error[E0119]: conflicting implementations of trait `AnotherTrait` for type `impl OpaqueTrait`
 --> /home/runner/work/glacier/glacier/ices/83613.rs:9:1
  |
8 | impl<T: Send> AnotherTrait for T {}
  | -------------------------------- first implementation here
9 | impl AnotherTrait for OpaqueType {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `impl OpaqueTrait`

error: cannot implement trait on type alias impl trait
 --> /home/runner/work/glacier/glacier/ices/83613.rs:9:1
  |
9 | impl AnotherTrait for OpaqueType {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: type alias impl trait defined here
 --> /home/runner/work/glacier/glacier/ices/83613.rs:3:19
  |
3 | type OpaqueType = impl OpaqueTrait;
  |                   ^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

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

=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/83613.rs:3:19
  |
3 | type OpaqueType = impl OpaqueTrait;
  |                   ^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <rust-lang/rust#63063> for more information
  = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `83613`
 --> /home/runner/work/glacier/glacier/ices/83613.rs:1:1
  |
1 | / trait OpaqueTrait {}
2 | | impl<T> OpaqueTrait for T {}
3 | | type OpaqueType = impl OpaqueTrait;
4 | | fn mk_opaque() -> OpaqueType {
... |
8 | | impl<T: Send> AnotherTrait for T {}
9 | | impl AnotherTrait for OpaqueType {}
  | |___________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/83613.rs`

error[E0119]: conflicting implementations of trait `AnotherTrait` for type `impl OpaqueTrait`
 --> /home/runner/work/glacier/glacier/ices/83613.rs:9:1
  |
8 | impl<T: Send> AnotherTrait for T {}
  | -------------------------------- first implementation here
9 | impl AnotherTrait for OpaqueType {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `impl OpaqueTrait`

error: cannot implement trait on type alias impl trait
 --> /home/runner/work/glacier/glacier/ices/83613.rs:9:1
  |
9 | impl AnotherTrait for OpaqueType {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: type alias impl trait defined here
 --> /home/runner/work/glacier/glacier/ices/83613.rs:3:19
  |
3 | type OpaqueType = impl OpaqueTrait;
  |                   ^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0119, E0601, E0658.
For more information about an error, try `rustc --explain E0119`.
==============
@Alexendoo Alexendoo merged commit a1b153c into master Apr 8, 2021
@Alexendoo Alexendoo deleted the autofix/ices/83613.rs branch April 8, 2021 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