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

ices/84789.rs: fixed with errors #1384

Merged
merged 1 commit into from
Aug 13, 2022
Merged

ices/84789.rs: fixed with errors #1384

merged 1 commit into from
Aug 13, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#84789

#![feature(trait_alias)]

pub trait MyFn = Fn(&mut Self);

// 1.
pub type F = dyn MyFn;

// 2.
pub fn f(_f: &dyn MyFn) {
    
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0038]: the trait alias `MyFn` cannot be made into an object
 --> /home/runner/work/glacier/glacier/ices/84789.rs:6:18
  |
6 | pub type F = dyn MyFn;
  |                  ^^^^
  |
  = note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause

error[E0038]: the trait alias `MyFn` cannot be made into an object
 --> /home/runner/work/glacier/glacier/ices/84789.rs:9:19
  |
9 | pub fn f(_f: &dyn MyFn) {
  |                   ^^^^
  |
  = note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0038`.
==============

=== stdout ===
=== stderr ===
error[E0038]: the trait alias `MyFn` cannot be made into an object
 --> /home/runner/work/glacier/glacier/ices/84789.rs:6:18
  |
6 | pub type F = dyn MyFn;
  |                  ^^^^
  |
  = note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause

error[E0038]: the trait alias `MyFn` cannot be made into an object
 --> /home/runner/work/glacier/glacier/ices/84789.rs:9:19
  |
9 | pub fn f(_f: &dyn MyFn) {
  |                   ^^^^
  |
  = note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0038`.
==============
@Alexendoo Alexendoo merged commit c934dcf into master Aug 13, 2022
@Alexendoo Alexendoo deleted the autofix/ices/84789.rs branch August 13, 2022 14:01
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