diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-09-21 15:02:15 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-09-21 15:02:15 +0000 |
| commit | 898c76cd8257ffd91e9de9714215ece477e1065b (patch) | |
| tree | 9e2b9f466810d6976982c601e2440a49013687ed /src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs | |
| parent | 191d3b76db5ee0f7a05ff79b6d584dde5f6e404f (diff) | |
| download | rust-898c76cd8257ffd91e9de9714215ece477e1065b.tar.gz rust-898c76cd8257ffd91e9de9714215ece477e1065b.zip | |
Make error messages great again (and fix clippy and add test)
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs')
| -rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs b/src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs new file mode 100644 index 00000000000..a851136009c --- /dev/null +++ b/src/test/ui/rfc-2632-const-trait-impl/nested-closure.rs @@ -0,0 +1,12 @@ +// check-pass + +#![feature(const_trait_impl, once_cell)] + +use std::sync::LazyLock; + +static EXTERN_FLAGS: LazyLock<String> = LazyLock::new(|| { + let x = || String::new(); + x() +}); + +fn main() {} |
