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 11// run-pass
22
33#![ feature( generators) ]
4- #![ feature( unboxed_closures, fn_traits) ]
54
65#![ allow( non_camel_case_types) ]
76#![ allow( dead_code) ]
1716extern crate core;
1817use std:: cell:: Cell ;
1918use std:: mem:: swap;
19+ use std:: ops:: Deref ;
2020
2121// Just a grab bag of stuff that you wouldn't want to actually write.
2222
@@ -183,10 +183,10 @@ fn 𝚌𝚘𝚗𝚝𝚒𝚗𝚞𝚎() {
183183
184184fn function ( ) {
185185 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 _ )
190190 }
191191 }
192192 let foo = foo ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ;
You can’t perform that action at this time.
0 commit comments