Skip to content

Commit

Permalink
Clarify when the impl target_feature Trait can work
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Nov 27, 2019
1 parent 6b9a16f commit 71b9069
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion text/0000-target-feature-1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,14 @@ the language (beyond just a simple attribute) which could lead to the
deprecation of the `#[target_feature]` attribute.

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

```rust
impl #[target_feature(enable = "...")] Trait for Type { ... }
fn foo<T: #[target_feature(enable = "...")] Trait>(...) { ...}
```

if all trait methods are `unsafe`; otherwise they can't have the
`#[target_feature]` attribute.

0 comments on commit 71b9069

Please sign in to comment.