diff options
Diffstat (limited to 'src/test/ui/dyn-star/no-explicit-dyn-star.rs')
-rw-r--r-- | src/test/ui/dyn-star/no-explicit-dyn-star.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/dyn-star/no-explicit-dyn-star.rs b/src/test/ui/dyn-star/no-explicit-dyn-star.rs new file mode 100644 index 000000000..4f726b7c6 --- /dev/null +++ b/src/test/ui/dyn-star/no-explicit-dyn-star.rs @@ -0,0 +1,8 @@ +// aux-build:dyn-star-foreign.rs + +extern crate dyn_star_foreign; + +fn main() { + dyn_star_foreign::require_dyn_star_display(1usize as _); + //~^ ERROR casting `usize` as `dyn* std::fmt::Display` is invalid +} |