File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
// run-pass
2
2
3
3
#![ feature( generators) ]
4
- #![ feature( unboxed_closures, fn_traits) ]
5
4
6
5
#![ allow( non_camel_case_types) ]
7
6
#![ allow( dead_code) ]
17
16
extern crate core;
18
17
use std:: cell:: Cell ;
19
18
use std:: mem:: swap;
19
+ use std:: ops:: Deref ;
20
20
21
21
// Just a grab bag of stuff that you wouldn't want to actually write.
22
22
@@ -183,10 +183,10 @@ fn 𝚌𝚘𝚗𝚝𝚒𝚗𝚞𝚎() {
183
183
184
184
fn function ( ) {
185
185
struct foo ;
186
- impl FnOnce < ( ) > for foo {
187
- type Output = foo ;
188
- extern "rust-call" fn call_once ( self , _args : ( ) ) -> Self :: Output {
189
- foo
186
+ impl Deref for foo {
187
+ type Target = fn ( ) -> Self ;
188
+ fn deref ( & self ) -> & Self :: Target {
189
+ & ( ( || foo) as _ )
190
190
}
191
191
}
192
192
let foo = foo ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ;
You can’t perform that action at this time.
0 commit comments