blob: 26d4cfb8887546a2a80880ec7e8957bdab924401 [file] [log] [blame] [edit]
//@ run-pass
#![allow(unused_imports)]
// This test verifies that casting from the same lifetime on a value
// to the same lifetime on a trait succeeds. See issue #10766.
#![allow(dead_code)]
use std::marker;
fn main() {
trait T { fn foo(&self) {} }
fn f<'a, V: T>(v: &'a V) -> &'a dyn T {
v as &'a dyn T
}
}