summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-40951.rs
blob: 49171eba6b3c43174ca41f274ae7b1661eecfc60 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);
}