2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2014-10-22 10:35:53 -05:00
|
|
|
// Test that the cache results from the default method do not pollute
|
|
|
|
// the cache for the later call in `load()`.
|
|
|
|
//
|
|
|
|
// See issue #18209.
|
|
|
|
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-10-22 10:35:53 -05:00
|
|
|
pub trait Foo {
|
|
|
|
fn load_from() -> Box<Self>;
|
|
|
|
fn load() -> Box<Self> {
|
|
|
|
Foo::load_from()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn load<M: Foo>() -> Box<M> {
|
|
|
|
Foo::load()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|