placate diagnostic checking tests by fixing sample code in E0569.
This commit is contained in:
parent
fa7f69cdaa
commit
8dd9493cf2
1 changed files with 3 additions and 0 deletions
|
|
@ -2824,6 +2824,9 @@ If an impl has a generic parameter with the `#[may_dangle]` attribute, then
|
|||
that impl must be declared as an `unsafe impl. For example:
|
||||
|
||||
```compile_fail,E0569
|
||||
#![feature(generic_param_attrs)]
|
||||
#![feature(dropck_eyepatch)]
|
||||
|
||||
struct Foo<X>(X);
|
||||
impl<#[may_dangle] X> Drop for Foo {
|
||||
fn drop(&mut self) { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue