diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-40951.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-40951.rs b/src/test/ui/issues/issue-40951.rs new file mode 100644 index 000000000..49171eba6 --- /dev/null +++ b/src/test/ui/issues/issue-40951.rs @@ -0,0 +1,12 @@ +// run-pass +#![allow(unused_variables)] +// Regression test for #40951. + +const FOO: [&'static str; 1] = ["foo"]; + +fn find<T: PartialEq>(t: &[T], element: &T) { } + +fn main() { + let x = format!("hi"); + find(&FOO, &&*x); +} |