We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0688182 + 32b98ea commit 2368fa2Copy full SHA for 2368fa2
tests/ui/weird-exprs.rs
@@ -1,7 +1,6 @@
1
// run-pass
2
3
#![feature(generators)]
4
-#![feature(unboxed_closures, fn_traits)]
5
6
#![allow(non_camel_case_types)]
7
#![allow(dead_code)]
@@ -17,6 +16,7 @@
17
16
extern crate core;
18
use std::cell::Cell;
19
use std::mem::swap;
+use std::ops::Deref;
20
21
// Just a grab bag of stuff that you wouldn't want to actually write.
22
@@ -183,10 +183,10 @@ fn 𝚌𝚘𝚗𝚝𝚒𝚗𝚞𝚎() {
183
184
fn function() {
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
+ impl Deref for foo {
+ type Target = fn() -> Self;
+ fn deref(&self) -> &Self::Target {
+ &((|| foo) as _)
190
}
191
192
let foo = foo () ()() ()()() ()()()() ()()()()();
0 commit comments