diff --git a/src/test/ui/consts/not_const_clusure_in_const.rs b/src/test/ui/consts/not_const_clusure_in_const.rs new file mode 100644 index 00000000000..fd2cfa442d3 --- /dev/null +++ b/src/test/ui/consts/not_const_clusure_in_const.rs @@ -0,0 +1,9 @@ +// run-pass + +const _FOO: fn() -> String = || "foo".into(); + +pub fn bar() -> fn() -> String { + || "bar".into() +} + +fn main(){}