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

ices/86756.rs: fixed with errors #889

Merged
merged 1 commit into from
Jul 28, 2021
Merged

ices/86756.rs: fixed with errors #889

merged 1 commit into from
Jul 28, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86756

trait Foo<T, T = T> {}
fn eq<A, B>() {
    eq::<dyn, Foo>
}
=== stdout ===
=== stderr ===
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:14
  |
1 | trait Foo<T, T = T> {}
  |           -  ^ already used
  |           |
  |           first use of `T`

warning: trait objects without an explicit `dyn` are deprecated
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:15
  |
3 |     eq::<dyn, Foo>
  |               ^^^ help: use `dyn`: `dyn Foo`
  |
  = note: `#[warn(bare_trait_objects)]` on by default
  = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
  = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>

error[E0601]: `main` function not found in crate `86756`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:1
  |
1 | / trait Foo<T, T = T> {}
2 | | fn eq<A, B>() {
3 | |     eq::<dyn, Foo>
4 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86756.rs`

error[E0224]: at least one trait is required for an object type
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:10
  |
3 |     eq::<dyn, Foo>
  |          ^^^

error[E0107]: missing generics for trait `Foo`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:15
  |
3 |     eq::<dyn, Foo>
  |               ^^^ expected at least 1 generic argument
  |
note: trait defined here, with at least 1 generic parameter: `T`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:7
  |
1 | trait Foo<T, T = T> {}
  |       ^^^ -
help: add missing generic argument
  |
3 |     eq::<dyn, Foo<T>>
  |               ^^^^^^

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

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

=== stdout ===
=== stderr ===
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:14
  |
1 | trait Foo<T, T = T> {}
  |           -  ^ already used
  |           |
  |           first use of `T`

warning: trait objects without an explicit `dyn` are deprecated
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:15
  |
3 |     eq::<dyn, Foo>
  |               ^^^ help: use `dyn`: `dyn Foo`
  |
  = note: `#[warn(bare_trait_objects)]` on by default
  = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
  = note: for more information, see issue #80165 <rust-lang/rust#80165>

error[E0601]: `main` function not found in crate `86756`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:1
  |
1 | / trait Foo<T, T = T> {}
2 | | fn eq<A, B>() {
3 | |     eq::<dyn, Foo>
4 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/86756.rs`

error[E0224]: at least one trait is required for an object type
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:10
  |
3 |     eq::<dyn, Foo>
  |          ^^^

error[E0107]: missing generics for trait `Foo`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:3:15
  |
3 |     eq::<dyn, Foo>
  |               ^^^ expected at least 1 generic argument
  |
note: trait defined here, with at least 1 generic parameter: `T`
 --> /home/runner/work/glacier/glacier/ices/86756.rs:1:7
  |
1 | trait Foo<T, T = T> {}
  |       ^^^ -
help: add missing generic argument
  |
3 |     eq::<dyn, Foo<T>>
  |               ^^^^^^

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

Some errors have detailed explanations: E0107, E0224, E0403, E0601.
For more information about an error, try `rustc --explain E0107`.
==============
@Alexendoo Alexendoo merged commit d8e1a86 into master Jul 28, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86756.rs branch July 28, 2021 12: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