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

ices/77179.rs: fixed with errors #879

Merged
merged 1 commit into from
Jul 23, 2021
Merged

ices/77179.rs: fixed with errors #879

merged 1 commit into from
Jul 23, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#77179

#![feature(type_alias_impl_trait)]

type Pointer<T> = impl std::ops::Deref<Target=T>;

fn main() {
    let p: Pointer<_> = Box::new(1);
}
=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/77179.rs:3:19
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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

warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/77179.rs:1:12
  |
1 | #![feature(type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/77179.rs:6:25
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ------------------------------ the expected opaque type
...
6 |     let p: Pointer<_> = Box::new(1);
  |            ----------   ^^^^^^^^^^^ expected opaque type, found struct `Box`
  |            |
  |            expected due to this
  |
  = note: expected opaque type `impl Deref`
                  found struct `Box<{integer}>`

error: could not find defining uses
 --> /home/runner/work/glacier/glacier/ices/77179.rs:3:19
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors; 1 warning emitted

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

=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/77179.rs:3:19
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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

warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/77179.rs:1:12
  |
1 | #![feature(type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63063 <rust-lang/rust#63063> for more information

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/77179.rs:6:25
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ------------------------------ the expected opaque type
...
6 |     let p: Pointer<_> = Box::new(1);
  |            ----------   ^^^^^^^^^^^ expected opaque type, found struct `Box`
  |            |
  |            expected due to this
  |
  = note: expected opaque type `impl Deref`
                  found struct `Box<{integer}>`

error: could not find defining uses
 --> /home/runner/work/glacier/glacier/ices/77179.rs:3:19
  |
3 | type Pointer<T> = impl std::ops::Deref<Target=T>;
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
==============
@Alexendoo Alexendoo merged commit 6cfef62 into master Jul 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/77179.rs branch July 23, 2021 18:44
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