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

ices/77179.rs: fixed with errors #869

Closed
wants to merge 1 commit into from

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 test() -> Pointer<_> {
    Box::new(1)
}

fn main() {
    test();
}
=== 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[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
 --> /home/runner/work/glacier/glacier/ices/77179.rs:5:22
  |
5 | fn test() -> Pointer<_> {
  |              --------^-
  |              |       |
  |              |       not allowed in type signatures
  |              help: replace with the correct return type: `Box<i32>`

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

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

=== 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[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
 --> /home/runner/work/glacier/glacier/ices/77179.rs:5:22
  |
5 | fn test() -> Pointer<_> {
  |              --------^-
  |              |       |
  |              |       not allowed in type signatures
  |              help: replace with the correct return type: `Box<i32>`

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

Some errors have detailed explanations: E0121, E0658.
For more information about an error, try `rustc --explain E0121`.
==============
@Alexendoo
Copy link
Member

27c2c52

@Alexendoo Alexendoo closed this Jul 17, 2021
@Alexendoo Alexendoo deleted the autofix/ices/77179.rs branch July 17, 2021 16:56
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