1 #![deny(implied_bounds_entailment)]
3 use std::cell::RefCell;
5 pub struct MessageListeners<'a> {
6 listeners: RefCell<Vec<Box<dyn FnMut(()) + 'a>>>,
9 pub trait MessageListenersInterface {
10 fn listeners<'c>(&'c self) -> &'c MessageListeners<'c>;
13 impl<'a> MessageListenersInterface for MessageListeners<'a> {
14 fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
15 //~^ ERROR impl method assumes more implied bounds than the corresponding trait method
16 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!