summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/inheritance/num.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/inheritance/num.rs')
-rw-r--r--tests/ui/traits/inheritance/num.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/traits/inheritance/num.rs b/tests/ui/traits/inheritance/num.rs
new file mode 100644
index 000000000..3d63d78ca
--- /dev/null
+++ b/tests/ui/traits/inheritance/num.rs
@@ -0,0 +1,13 @@
+// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+// pretty-expanded FIXME #23616
+
+pub trait NumExt: PartialEq + PartialOrd {}
+
+pub trait FloatExt: NumExt {}
+
+fn greater_than_one<T: NumExt>(n: &T) -> bool { loop {} }
+fn greater_than_one_float<T: FloatExt>(n: &T) -> bool { loop {} }
+
+pub fn main() {}