crash -> test

This commit is contained in:
Michael Goulet 2024-04-15 22:21:42 -04:00
parent 06501156d1
commit a8c9a0bd81
3 changed files with 27 additions and 10 deletions

View File

@ -1,10 +0,0 @@
//@ known-bug: #122552
//@ edition:2021
trait X {
fn line_stream<'a, Repr>() -> Self::LineStreamFut<{ async {} }, Repr>;
}
struct Y;
pub fn main() {}

View File

@ -0,0 +1,10 @@
//@ edition:2021
trait X {
fn test() -> Self::Assoc<{ async {} }>;
//~^ ERROR associated type `Assoc` not found for `Self`
//~| ERROR associated type `Assoc` not found for `Self`
}
pub fn main() {}

View File

@ -0,0 +1,17 @@
error[E0220]: associated type `Assoc` not found for `Self`
--> $DIR/coroutine-in-orphaned-anon-const.rs:4:24
|
LL | fn test() -> Self::Assoc<{ async {} }>;
| ^^^^^ associated type `Assoc` not found
error[E0220]: associated type `Assoc` not found for `Self`
--> $DIR/coroutine-in-orphaned-anon-const.rs:4:24
|
LL | fn test() -> Self::Assoc<{ async {} }>;
| ^^^^^ associated type `Assoc` not found
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0220`.