diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-8401.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-8401.rs b/src/test/ui/issues/auxiliary/issue-8401.rs new file mode 100644 index 000000000..e35dbbfab --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-8401.rs @@ -0,0 +1,16 @@ +// for this issue, this code must be built in a library + +use std::mem; + +trait A { + fn dummy(&self) { } +} +struct B; +impl A for B {} + +fn bar<T>(_: &mut A, _: &T) {} + +fn foo<T>(t: &T) { + let mut b = B; + bar(&mut b as &mut A, t) +} |