We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2fd1aa commit 171312aCopy full SHA for 171312a
src/doc/rustc-dev-guide/src/opaque-types-impl-trait-inference.md
@@ -13,13 +13,16 @@ it can work across functions and function bodies.
13
To help explain how it works, let's consider an example.
14
15
```rust
16
+#![feature(type_alias_impl_trait)]
17
mod m {
18
pub type Seq<T> = impl IntoIterator<Item = T>;
19
20
+ #[define_opaque(Seq)]
21
pub fn produce_singleton<T>(t: T) -> Seq<T> {
22
vec![t]
23
}
24
25
26
pub fn produce_doubleton<T>(t: T, u: T) -> Seq<T> {
27
vec![t, u]
28
0 commit comments