Stream: wg-async-foundations

Topic: #66312


csmoe (Nov 13 2019 at 08:16, on Zulip):
trait Test<T> {
    fn is_some(self: T);
}

async fn f() {
    let x = Some(2);
    if x.is_some() {
        println!("Some");
    }
}

RUSTC_LOG=rustc_typeck=debug rustc +dev issue-66312.rs --edtion 2018 triggers another earlier cycle error, prevents me get more debug info:

error[E0391]: cycle detected when processing `f::{{opaque}}#0`
 --> ../v.rs:6:14
  |
6 | async fn f() {
  |              ^
  |
note: ...which requires processing `f::{{opaque}}#0`...
 --> ../v.rs:6:14
  |
6 | async fn f() {
  |              ^
note: ...which requires processing `f::{{opaque}}#0`...
 --> ../v.rs:6:14
  |
6 | async fn f() {
  |              ^
  = note: ...which again requires processing `f::{{opaque}}#0`, completing the cycle
note: cycle used when processing `f`
 --> ../v.rs:6:1
  |
6 | async fn f() {
  | ^^^^^^^^^^^^

error: aborting due to previous error

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

but a narrowed path RUSTC_LOG=rustc_typeck::check=debug works as expected.

csmoe (Nov 13 2019 at 08:19, on Zulip):

oh, seems same as this issue https://github.com/rust-lang/rust/issues/61577

nikomatsakis (Nov 19 2019 at 18:49, on Zulip):

@csmoe can you say a bit more about what's going wrong?

csmoe (Nov 19 2019 at 18:54, on Zulip):

csmoe can you say a bit more about what's going wrong?

trait Test<T> {
   fn is_some(self: T)
}

is malformed, should be rejected with invalid self parameter type: T by wf_check as the non-async case.
but nothing about wfcheck was dumped for async case inside the debug log

Last update: Dec 12 2019 at 01:45UTC