diff options
Diffstat (limited to 'src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs')
-rw-r--r-- | src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs b/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs deleted file mode 100644 index c12b16f16..000000000 --- a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs +++ /dev/null @@ -1,27 +0,0 @@ -// run-pass -// check-run-results - -#![feature(dyn_star)] -//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes - -trait AddOne { - fn add1(&mut self) -> usize; -} - -impl AddOne for usize { - fn add1(&mut self) -> usize { - *self += 1; - *self - } -} - -fn add_one(i: &mut (dyn* AddOne + '_)) -> usize { - i.add1() -} - -fn main() { - let mut x = 42usize as dyn* AddOne; - - println!("{}", add_one(&mut x)); - println!("{}", add_one(&mut x)); -} |