< 返回版块

AndyJado 发表于 2022-09-20 13:48

&format!(
    "used non-generic {} `{}` for generic parameter",
    opaque_param.kind.descr(),
    arg,
),

what i did

  1. I went to defination of opaque_param.kind.descr(),, it's Region

  2. I check all impl for Region

  3. I don't find Display

  4. but I can use .to_string() on it


Ext Link: https://github.com/rust-lang/rust/blob/11bb80a92b4f46fa7dfa9148d0bdfc185a7621bd/compiler/rustc_borrowck/src/region_infer/opaque_types.rs#L406

评论区

写评论
作者 AndyJado 2022-09-20 14:42

已解决, 总之来说就是犯了看源码不看文档的病. 出来丢人了, 不好意思.

1 共 1 条评论, 1 页