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

ices/98594.sh: fixed with errors #1430

Merged
merged 1 commit into from
Sep 29, 2022
Merged

ices/98594.sh: fixed with errors #1430

merged 1 commit into from
Sep 29, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#98594

#!/bin/bash

rustc -Zverbose - <<'EOF'


#![allow(unused_parens)]
trait Foo {
    type Assoc;
}

fn called()
where
    for<'b> fn(&'b ()): Foo,
{
}

fn caller()
where
    (for<'a> fn(&'a ())): Foo,
{
    called()
}

fn main() {}
EOF

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'b> fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ rust_out[1daf]::called::'b), 'b) }) ()): Foo` is not satisfied
  --> <anon>:18:5
   |
18 |     called()
   |     ^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ rust_out[1daf]::called::'b), 'b) }) ())`
   |
note: required by a bound in `called`
  --> <anon>:10:25
   |
8  | fn called()
   |    ------ required by a bound in this
9  | where
10 |     for<'b> fn(&'b ()): Foo,
   |                         ^^^ required by this bound in `called`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'b> fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ rust_out[1daf]::called::'b), 'b) }) ()): Foo` is not satisfied
  --> <anon>:18:5
   |
18 |     called()
   |     ^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ rust_out[1daf]::called::'b), 'b) }) ())`
   |
note: required by a bound in `called`
  --> <anon>:10:25
   |
8  | fn called()
   |    ------ required by a bound in this
9  | where
10 |     for<'b> fn(&'b ()): Foo,
   |                         ^^^ required by this bound in `called`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit e356843 into master Sep 29, 2022
@JohnTitor JohnTitor deleted the autofix/ices/98594.sh branch September 29, 2022 13:46
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