]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / type-alias-impl-trait / bounds-are-checked-2.rs
CommitLineData
29967ef6
XL
1// Make sure that we check that impl trait types implement the traits that they
2// claim to.
3
94222f64 4#![feature(type_alias_impl_trait)]
29967ef6
XL
5
6type X<T> = impl Clone;
29967ef6
XL
7
8fn f<T: Clone>(t: T) -> X<T> {
9 t
04454e1e 10 //~^ ERROR the trait bound `T: Clone` is not satisfied
29967ef6
XL
11}
12
13fn g<T>(o: Option<X<T>>) -> Option<X<T>> {
14 o.clone()
15}
16
17fn main() {
18 g(None::<X<&mut ()>>);
19}