Skip to content

Commit 6e5ce9d

Browse files
committed
Document potential effect polymorphism syntax
1 parent 578c30d commit 6e5ce9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

text/0000-target-feature-1.1.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,9 @@ the language (beyond just a simple attribute) which could lead to the
238238
deprecation of the `#[target_feature]` attribute.
239239

240240
It is also unclear how any of this interacts with effect-polymorphism at this
241-
point.
241+
point, but we could support something like `impl const Trait` and `T: const Trait`:
242+
243+
```rust
244+
impl #[target_feature(enable = "...")] Trait for Type { ... }
245+
fn foo<T: #[target_feature(enable = "...")] Trait>(...) { ...}
246+
```

0 commit comments

Comments
 (0)