charon
charon copied to clipboard
Normalization binder error
The following code
pub struct S;
impl S {
pub fn f<'a>(&'a self) -> Option<(&'a u8, &'a u8)>
{ None }
}
crashes on Charon version 8fe7c7311 with the following error message
Compilation failed: thread 'rustc' panicked at compiler/rustc_trait_selection/src/traits/normalize.rs:151:9:
Normalizing &'^1_0.Named(test_crate::{impl#0}::f::'a, "'a") u8 without wrapping in a `Binder`
Note, replacing the return type by, e.g., Option<&'a u8>
, or not annotating the self borrow with lifetime 'a
solves this error