File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #![ feature( fn_delegation) ]
2+ #![ allow( incomplete_features) ]
3+
4+ pub fn external ( _: impl FnOnce ( ) ) { }
5+
6+ fn delegated_to ( _: impl FnOnce ( ) ) { }
7+
8+ pub reuse delegated_to as delegated ;
Original file line number Diff line number Diff line change 11// Regression test for <https://github.com/rust-lang/rust/issues/155728>
2+ //@ aux-crate:fn_delegation_impl_trait_aux=fn-delegation-impl-trait-aux.rs
23#![ feature( fn_delegation) ]
34#![ allow( incomplete_features) ]
45
6+ extern crate fn_delegation_impl_trait_aux as aux;
7+
58fn foo ( _: impl FnOnce ( ) ) { }
69
710//@ has fn_delegation_impl_trait/fn.top_level.html '//pre[@class="rust item-decl"]' 'pub fn top_level(arg0: impl FnOnce())'
@@ -31,4 +34,14 @@ pub trait T {
3134 reuse foo as provided;
3235}
3336
37+ //@ has fn_delegation_impl_trait/fn.cross_crate.html '//pre[@class="rust item-decl"]' 'pub fn cross_crate(arg0: impl FnOnce())'
38+ pub reuse aux:: external as cross_crate ;
39+
40+ //@ has fn_delegation_impl_trait/fn.inlined_cross_crate_delegated.html '//pre[@class="rust item-decl"]' 'pub fn inlined_cross_crate_delegated(arg0: impl FnOnce())'
41+ #[ doc( inline) ]
42+ pub use aux:: delegated as inlined_cross_crate_delegated;
43+
44+ //@ has fn_delegation_impl_trait/fn.redelegated_cross_crate.html '//pre[@class="rust item-decl"]' 'pub fn redelegated_cross_crate(arg0: impl FnOnce())'
45+ pub reuse aux:: delegated as redelegated_cross_crate ;
46+
3447pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments