]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/never_type/issue-51506.rs
1 #![feature(never_type, specialization)]
2 #![allow(incomplete_features)]
4 use std
::iter
::{self, Empty}
;
7 type Out
: Iterator
<Item
= u32>;
9 fn f(&self) -> Option
<Self::Out
>;
13 default type Out
= !; //~ ERROR: `!` is not an iterator
15 default fn f(&self) -> Option
<Self::Out
> {
23 type Out
= Empty
<u32>;
25 fn f(&self) -> Option
<Self::Out
> {
30 fn f
<T
: Trait
>(a
: T
) {
31 if let Some(iter
) = a
.f() {
34 println
!("x = {}", x
);