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

ices/113016.rs: fixed with errors #1617

Merged
merged 1 commit into from
Jul 1, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#113016

#![feature(non_lifetime_binders)]

trait Trait<Input> {}

fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
=== stdout ===
=== stderr ===
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/113016.rs:1:12
  |
1 | #![feature(non_lifetime_binders)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: type parameter `f` should have an upper camel case name
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:21
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                     ^ help: convert the identifier to upper camel case (notice the capitalization): `F`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

error: `impl Trait` can only mention type parameters from an fn or impl
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:53
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                     - type parameter declared here  ^

error[E0658]: anonymous lifetimes in `impl Trait` are unstable
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:58
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                                                          ^^ expected named lifetime parameter
  |
  = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
help: consider introducing a named lifetime parameter
  |
5 | fn main<'a>(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + 'a>) {}
  |        ++++                                                  ~~

error[E0658]: anonymous lifetimes in `impl Trait` are unstable
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:30
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                              ^^ expected named lifetime parameter
  |
  = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
help: consider introducing a named lifetime parameter
  |
5 | fn main<'a>(x: impl for<f> Trait<'a, Assoc = impl Trait<f> + '_>) {}
  |        ++++                      ~~

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:24
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                        ^^^^^-------------------------------- help: remove these generics
  |                        |
  |                        expected 0 lifetime arguments
  |
note: trait defined here, with 0 lifetime parameters
 --> /home/runner/work/glacier/glacier/ices/113016.rs:3:7
  |
3 | trait Trait<Input> {}
  |       ^^^^^

error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:24
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                        ^^^^^ expected 1 generic argument
  |
note: trait defined here, with 1 generic parameter: `Input`
 --> /home/runner/work/glacier/glacier/ices/113016.rs:3:7
  |
3 | trait Trait<Input> {}
  |       ^^^^^ -----
help: add missing generic argument
  |
5 | fn main(x: impl for<f> Trait<'_, Input, Assoc = impl Trait<f> + '_>) {}
  |                                +++++++

error[E0220]: associated type `Assoc` not found for `Trait`
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:34
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                                  ^^^^^ associated type `Assoc` not found

error: aborting due to 6 previous errors; 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/113016.rs:1:12
  |
1 | #![feature(non_lifetime_binders)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #108185 <rust-lang/rust#108185> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: type parameter `f` should have an upper camel case name
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:21
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                     ^ help: convert the identifier to upper camel case (notice the capitalization): `F`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

error: `impl Trait` can only mention type parameters from an fn or impl
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:53
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                     - type parameter declared here  ^

error[E0658]: anonymous lifetimes in `impl Trait` are unstable
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:58
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                                                          ^^ expected named lifetime parameter
  |
  = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
help: consider introducing a named lifetime parameter
  |
5 | fn main<'a>(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + 'a>) {}
  |        ++++                                                  ~~

error[E0658]: anonymous lifetimes in `impl Trait` are unstable
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:30
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                              ^^ expected named lifetime parameter
  |
  = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
help: consider introducing a named lifetime parameter
  |
5 | fn main<'a>(x: impl for<f> Trait<'a, Assoc = impl Trait<f> + '_>) {}
  |        ++++                      ~~

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:24
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                        ^^^^^-------------------------------- help: remove these generics
  |                        |
  |                        expected 0 lifetime arguments
  |
note: trait defined here, with 0 lifetime parameters
 --> /home/runner/work/glacier/glacier/ices/113016.rs:3:7
  |
3 | trait Trait<Input> {}
  |       ^^^^^

error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:24
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                        ^^^^^ expected 1 generic argument
  |
note: trait defined here, with 1 generic parameter: `Input`
 --> /home/runner/work/glacier/glacier/ices/113016.rs:3:7
  |
3 | trait Trait<Input> {}
  |       ^^^^^ -----
help: add missing generic argument
  |
5 | fn main(x: impl for<f> Trait<'_, Input, Assoc = impl Trait<f> + '_>) {}
  |                                +++++++

error[E0220]: associated type `Assoc` not found for `Trait`
 --> /home/runner/work/glacier/glacier/ices/113016.rs:5:34
  |
5 | fn main(x: impl for<f> Trait<'_, Assoc = impl Trait<f> + '_>) {}
  |                                  ^^^^^ associated type `Assoc` not found

error: aborting due to 6 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0107, E0220, E0658.
For more information about an error, try `rustc --explain E0107`.
==============
@Alexendoo Alexendoo merged commit a38df56 into master Jul 1, 2023
@Alexendoo Alexendoo deleted the autofix/ices/113016.rs branch July 1, 2023 12:35
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