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

ices/113434.rs: fixed with errors #1632

Merged
merged 1 commit into from
Oct 15, 2023
Merged

ices/113434.rs: fixed with errors #1632

merged 1 commit into from
Oct 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 1, 2023

Issue: rust-lang/rust#113434

#![feature(return_position_impl_trait_in_trait)]

struct Wrapper<G: Send>(T);

trait Foo {
    fn bar() -> Wrapper<impl Sized>;
}
=== stdout ===
=== stderr ===
error[E0412]: cannot find type `T` in this scope
 --> /home/runner/work/glacier/glacier/ices/113434.rs:3:25
  |
3 | struct Wrapper<G: Send>(T);
  |                -        ^
  |                |
  |                similarly named type parameter `G` defined here
  |
help: a type parameter with a similar name exists
  |
3 | struct Wrapper<G: Send>(G);
  |                         ~
help: you might be missing a type parameter
  |
3 | struct Wrapper<G: Send, T>(T);
  |                       +++

error[E0601]: `main` function not found in crate `113434`
 --> /home/runner/work/glacier/glacier/ices/113434.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113434.rs`

error[E0277]: `impl Sized` cannot be sent between threads safely
 --> /home/runner/work/glacier/glacier/ices/113434.rs:6:17
  |
6 |     fn bar() -> Wrapper<impl Sized>;
  |                 ^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be sent between threads safely
  |
  = help: the trait `Send` is not implemented for `impl Sized`
note: required by a bound in `Wrapper`
 --> /home/runner/work/glacier/glacier/ices/113434.rs:3:19
  |
3 | struct Wrapper<G: Send>(T);
  |                   ^^^^ required by this bound in `Wrapper`

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0412]: cannot find type `T` in this scope
 --> /home/runner/work/glacier/glacier/ices/113434.rs:3:25
  |
3 | struct Wrapper<G: Send>(T);
  |                -        ^
  |                |
  |                similarly named type parameter `G` defined here
  |
help: a type parameter with a similar name exists
  |
3 | struct Wrapper<G: Send>(G);
  |                         ~
help: you might be missing a type parameter
  |
3 | struct Wrapper<G: Send, T>(T);
  |                       +++

error[E0601]: `main` function not found in crate `113434`
 --> /home/runner/work/glacier/glacier/ices/113434.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/113434.rs`

error[E0277]: `impl Sized` cannot be sent between threads safely
 --> /home/runner/work/glacier/glacier/ices/113434.rs:6:17
  |
6 |     fn bar() -> Wrapper<impl Sized>;
  |                 ^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be sent between threads safely
  |
  = help: the trait `Send` is not implemented for `impl Sized`
note: required by a bound in `Wrapper`
 --> /home/runner/work/glacier/glacier/ices/113434.rs:3:19
  |
3 | struct Wrapper<G: Send>(T);
  |                   ^^^^ required by this bound in `Wrapper`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0412, E0601.
For more information about an error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit 1062d31 into master Oct 15, 2023
@JohnTitor JohnTitor deleted the autofix/ices/113434.rs branch October 15, 2023 02:57
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