diff options
| author | Caleb Zulawski <caleb.zulawski@gmail.com> | 2020-06-27 15:51:51 -0400 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2020-06-27 15:51:51 -0400 |
| commit | 8e899b1cbe6209842e112f0b7ec450a3cdfdb36d (patch) | |
| tree | 8a98b6d03be1b23acc8a53603ecaa15cbcd427ee /src/test | |
| parent | c98b4c8fdde7812d7af5a060a1e22fd7e3775d3f (diff) | |
| download | rust-8e899b1cbe6209842e112f0b7ec450a3cdfdb36d.tar.gz rust-8e899b1cbe6209842e112f0b7ec450a3cdfdb36d.zip | |
Don't implement Fn* for unsafe #[target_feature] functions
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr index 3ae85af76d3..ba3d2eac1a6 100644 --- a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr +++ b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr @@ -48,6 +48,7 @@ LL | call(foo_unsafe); | = help: the trait `std::ops::Fn<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ } + = note: `unsafe fn() {foo_unsafe}` has `#[target_feature]` and is unsafe to call error[E0277]: expected a `std::ops::FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` --> $DIR/fn-traits.rs:30:14 @@ -60,6 +61,7 @@ LL | call_mut(foo_unsafe); | = help: the trait `std::ops::FnMut<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ } + = note: `unsafe fn() {foo_unsafe}` has `#[target_feature]` and is unsafe to call error[E0277]: expected a `std::ops::FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` --> $DIR/fn-traits.rs:32:15 @@ -72,6 +74,7 @@ LL | call_once(foo_unsafe); | = help: the trait `std::ops::FnOnce<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ } + = note: `unsafe fn() {foo_unsafe}` has `#[target_feature]` and is unsafe to call error: aborting due to 6 previous errors |
