Skip to content

Commit 71b9069

Browse files
committed
Clarify when the impl target_feature Trait can work
1 parent 6b9a16f commit 71b9069

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

text/0000-target-feature-1.1.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,14 @@ the language (beyond just a simple attribute) which could lead to the
237237
deprecation of the `#[target_feature]` attribute.
238238

239239
It is also unclear how any of this interacts with effect-polymorphism at this
240-
point, but we could support something like `impl const Trait` and `T: const Trait`:
240+
point, but we could _maybe_ support something like `impl const Trait` and `T:
241+
const Trait`:
241242

242243
```rust
243244
impl #[target_feature(enable = "...")] Trait for Type { ... }
244245
fn foo<T: #[target_feature(enable = "...")] Trait>(...) { ...}
245246
```
247+
248+
if all trait methods are `unsafe`; otherwise they can't have the
249+
`#[target_feature]` attribute.
250+

0 commit comments

Comments
 (0)