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

ices/65673.rs: fixed with errors #212

Merged
merged 1 commit into from
Nov 24, 2019
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#65673

pub struct SharedRange<Ix, OnSet> {
    pub data: f32,
}

trait HasCtx {
    type Ctx;
}

trait Callback0 {}

trait Foo<Ix, OnSet> = where OnSet: Callback0;

impl<Ix, OnSet> HasCtx for SharedRange<Ix, OnSet> {
    type Ctx = Foo<Ix, OnSet>;
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0658]: trait aliases are experimental
  --> /home/runner/work/glacier/glacier/ices/65673.rs:11:1
   |
11 | trait Foo<Ix, OnSet> = where OnSet: Callback0;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/41517
   = help: add `#![feature(trait_alias)]` to the crate attributes to enable

warning: trait objects without an explicit `dyn` are deprecated
  --> /home/runner/work/glacier/glacier/ices/65673.rs:14:16
   |
14 |     type Ctx = Foo<Ix, OnSet>;
   |                ^^^^^^^^^^^^^^ help: use `dyn`: `dyn Foo<Ix, OnSet>`
   |
   = note: `#[warn(bare_trait_objects)]` on by default

error[E0392]: parameter `Ix` is never used
 --> /home/runner/work/glacier/glacier/ices/65673.rs:1:24
  |
1 | pub struct SharedRange<Ix, OnSet> {
  |                        ^^ unused parameter
  |
  = help: consider removing `Ix`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

error[E0392]: parameter `OnSet` is never used
 --> /home/runner/work/glacier/glacier/ices/65673.rs:1:28
  |
1 | pub struct SharedRange<Ix, OnSet> {
  |                            ^^^^^ unused parameter
  |
  = help: consider removing `OnSet`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

error[E0277]: the size for values of type `(dyn Callback0 + 'static)` cannot be known at compilation time
  --> /home/runner/work/glacier/glacier/ices/65673.rs:14:5
   |
6  |     type Ctx;
   |          --- associated type defined here
...
13 | impl<Ix, OnSet> HasCtx for SharedRange<Ix, OnSet> {
   | ------------------------------------------------- in this `impl` item
14 |     type Ctx = Foo<Ix, OnSet>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `(dyn Callback0 + 'static)`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>

error: aborting due to 4 previous errors

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

=== stdout ===
=== stderr ===
error[E0658]: trait aliases are experimental
  --> /home/runner/work/glacier/glacier/ices/65673.rs:11:1
   |
11 | trait Foo<Ix, OnSet> = where OnSet: Callback0;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see rust-lang/rust#41517
   = help: add `#![feature(trait_alias)]` to the crate attributes to enable

warning: trait objects without an explicit `dyn` are deprecated
  --> /home/runner/work/glacier/glacier/ices/65673.rs:14:16
   |
14 |     type Ctx = Foo<Ix, OnSet>;
   |                ^^^^^^^^^^^^^^ help: use `dyn`: `dyn Foo<Ix, OnSet>`
   |
   = note: `#[warn(bare_trait_objects)]` on by default

error[E0392]: parameter `Ix` is never used
 --> /home/runner/work/glacier/glacier/ices/65673.rs:1:24
  |
1 | pub struct SharedRange<Ix, OnSet> {
  |                        ^^ unused parameter
  |
  = help: consider removing `Ix`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

error[E0392]: parameter `OnSet` is never used
 --> /home/runner/work/glacier/glacier/ices/65673.rs:1:28
  |
1 | pub struct SharedRange<Ix, OnSet> {
  |                            ^^^^^ unused parameter
  |
  = help: consider removing `OnSet`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

error[E0277]: the size for values of type `(dyn Callback0 + 'static)` cannot be known at compilation time
  --> /home/runner/work/glacier/glacier/ices/65673.rs:14:5
   |
6  |     type Ctx;
   |          --- associated type defined here
...
13 | impl<Ix, OnSet> HasCtx for SharedRange<Ix, OnSet> {
   | ------------------------------------------------- in this `impl` item
14 |     type Ctx = Foo<Ix, OnSet>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `(dyn Callback0 + 'static)`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0277, E0392, E0658.
For more information about an error, try `rustc --explain E0277`.
==============
@Dylan-DPC-zz Dylan-DPC-zz merged commit 35c3794 into master Nov 24, 2019
@Alexendoo Alexendoo deleted the autofix/ices/65673.rs branch November 24, 2019 12:31
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