summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-50761.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-50761.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-50761.rs b/src/test/ui/issues/issue-50761.rs
new file mode 100644
index 000000000..1bf494ba8
--- /dev/null
+++ b/src/test/ui/issues/issue-50761.rs
@@ -0,0 +1,23 @@
+// Confirm that we don't accidentally divide or mod by zero in llvm_type
+
+// build-pass
+
+mod a {
+ pub trait A {}
+}
+
+mod b {
+ pub struct Builder {}
+
+ pub fn new() -> Builder {
+ Builder {}
+ }
+
+ impl Builder {
+ pub fn with_a(&mut self, _a: fn() -> dyn (::a::A)) {}
+ }
+}
+
+pub use self::b::new;
+
+fn main() {}