#![feature(provide_any)] use std::any::{Demand, Provider}; fn _f<'a, P: Provider>(p: &'a P, demand: &mut Demand<'a>) { p.provide(demand); }