diff options
Diffstat (limited to 'tests/ui/dyn-compatibility/avoid-ice-on-warning.rs')
| -rw-r--r-- | tests/ui/dyn-compatibility/avoid-ice-on-warning.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs new file mode 100644 index 00000000000..b90d8911d50 --- /dev/null +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs @@ -0,0 +1,9 @@ +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 +fn call_this<F>(f: F) : Fn(&str) + call_that {} +//~^ ERROR return types are denoted using `->` +//~| ERROR cannot find trait `call_that` in this scope +//[old]~| WARN trait objects without an explicit `dyn` are deprecated +//[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! +fn main() {} |
