diff options
Diffstat (limited to 'tests/ui/nll/constant.rs')
-rw-r--r-- | tests/ui/nll/constant.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/nll/constant.rs b/tests/ui/nll/constant.rs new file mode 100644 index 000000000..47f0eadf9 --- /dev/null +++ b/tests/ui/nll/constant.rs @@ -0,0 +1,10 @@ +// Test that MIR borrowck and NLL analysis can handle constants of +// arbitrary types without ICEs. + +// check-pass + +const HI: &str = "hi"; + +fn main() { + assert_eq!(HI, "hi"); +} |