diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-10-21 13:59:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-21 13:59:44 +0900 |
| commit | de24210ebf40b5700908d0a6613f82afe1995b52 (patch) | |
| tree | 7b4db815ca111d129ecda5f620695fff51563a2e /src | |
| parent | 83f126bedf227103463f6f505398d72d4efedd42 (diff) | |
| parent | dcd2d91a647c101c7226e594ecae23bc5fb3bb69 (diff) | |
| download | rust-de24210ebf40b5700908d0a6613f82afe1995b52.tar.gz rust-de24210ebf40b5700908d0a6613f82afe1995b52.zip | |
Rollup merge of #78118 - spastorino:inline-const-followups, r=petrochenkov
Inline const followups r? @petrochenkov Follow ups of #77124
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/inline-const/const-expr-macro.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/inline-const/const-expr-macro.rs b/src/test/ui/inline-const/const-expr-macro.rs new file mode 100644 index 00000000000..66b58571751 --- /dev/null +++ b/src/test/ui/inline-const/const-expr-macro.rs @@ -0,0 +1,12 @@ +// run-pass + +#![allow(incomplete_features)] +#![feature(inline_const)] +macro_rules! do_const_block{ + ($val:block) => { const $val } +} + +fn main() { + let s = do_const_block!({ 22 }); + assert_eq!(s, 22); +} |
