lifetime bound on associated type is rejected although it seems valid

前端 未结 2 1749
滥情空心
滥情空心 2021-01-14 08:16

I have a piece of code that does not compile and that can be reduced to this snippet:

use std::error::Error;
use std         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 08:55

    I'm still not sure why, but it seems just removing the 'static bound on the error worked?

    https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d4f46a0ad9a5dd7dc538fe4e197d823d

提交回复
热议问题