about summary refs log tree commit diff
path: root/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
blob: ab9d10d14fdd015797fee0b37fb0a4b9ef66c9e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-pass
// Test that we do not error out because of a (False) ambiguity
// between the builtin rules for Sized and the where clause. Issue
// #20959.


fn foo<K>(x: Option<K>)
    where Option<K> : Sized
{
    let _y = x;
}

fn main() {
    foo(Some(22));
}