Disable feature(unboxed_closures, fn_traits) in weird-exprs
One shouldn't need a nightly compiler in order to ~~have fun~~ call a function many times.
This commit is contained in:
parent
fe7454bf43
commit
32b98ea2a9
@ -1,7 +1,6 @@
|
||||
// run-pass
|
||||
|
||||
#![feature(generators)]
|
||||
#![feature(unboxed_closures, fn_traits)]
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(dead_code)]
|
||||
@ -17,6 +16,7 @@
|
||||
extern crate core;
|
||||
use std::cell::Cell;
|
||||
use std::mem::swap;
|
||||
use std::ops::Deref;
|
||||
|
||||
// Just a grab bag of stuff that you wouldn't want to actually write.
|
||||
|
||||
@ -183,10 +183,10 @@ fn 𝚌𝚘𝚗𝚝𝚒𝚗𝚞𝚎() {
|
||||
|
||||
fn function() {
|
||||
struct foo;
|
||||
impl FnOnce<()> for foo {
|
||||
type Output = foo;
|
||||
extern "rust-call" fn call_once(self, _args: ()) -> Self::Output {
|
||||
foo
|
||||
impl Deref for foo {
|
||||
type Target = fn() -> Self;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&((|| foo) as _)
|
||||
}
|
||||
}
|
||||
let foo = foo () ()() ()()() ()()()() ()()()()();
|
||||
|
Loading…
x
Reference in New Issue
Block a user