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

ices/89333.rs: fixed with errors #985

Merged
merged 1 commit into from
Oct 4, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 4, 2021

Issue: rust-lang/rust#89333

fn main() {
    test(&|| 0);
}

fn test<T>(arg: &impl Fn() -> T)
where
    for<'a> &'a T: Default,
{
}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'a> &'a {integer}: Default` is not satisfied
 --> /home/runner/work/glacier/glacier/ices/89333.rs:2:10
  |
2 |     test(&|| 0);
  |     ---- ^^^^^ the trait `for<'a> Default` is not implemented for `&'a {integer}`
  |     |
  |     required by a bound introduced by this call
  |
  = help: the following implementations were found:
            <&CStr as Default>
            <&OsStr as Default>
            <&[T] as Default>
            <&mut [T] as Default>
          and 217 others
note: required by a bound in `test`
 --> /home/runner/work/glacier/glacier/ices/89333.rs:7:20
  |
5 | fn test<T>(arg: &impl Fn() -> T)
  |    ---- required by a bound in this
6 | where
7 |     for<'a> &'a T: Default,
  |                    ^^^^^^^ required by this bound in `test`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'a> &'a {integer}: Default` is not satisfied
 --> /home/runner/work/glacier/glacier/ices/89333.rs:2:10
  |
2 |     test(&|| 0);
  |     ---- ^^^^^ the trait `for<'a> Default` is not implemented for `&'a {integer}`
  |     |
  |     required by a bound introduced by this call
  |
  = help: the following implementations were found:
            <&CStr as Default>
            <&OsStr as Default>
            <&[T] as Default>
            <&mut [T] as Default>
          and 217 others
note: required by a bound in `test`
 --> /home/runner/work/glacier/glacier/ices/89333.rs:7:20
  |
5 | fn test<T>(arg: &impl Fn() -> T)
  |    ---- required by a bound in this
6 | where
7 |     for<'a> &'a T: Default,
  |                    ^^^^^^^ required by this bound in `test`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo merged commit 3b24f8e into master Oct 4, 2021
@Alexendoo Alexendoo deleted the autofix/ices/89333.rs branch October 4, 2021 13:50
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