about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-11-09 19:06:46 +0100
committerGitHub <noreply@github.com>2020-11-09 19:06:46 +0100
commit0aed74aa43a3c1a98b1289a3b4febac75f844949 (patch)
tree503994afc0a3f83bd290c6b4cc9ac50ad3480a11 /src
parent2187f3c7f2a1bf1d6e4f9a1e634a887f9118532d (diff)
parent4d60a80713533cad5221f8b4aa2faff54b46d21d (diff)
Rollup merge of #78502 - matthewjasper:chalkup, r=nikomatsakis
Update Chalk to 0.36.0

This PR updates Chalk and fixes a number of bugs in the chalk integration code.

cc `@rust-lang/wg-traits`
r? `@nikomatsakis`
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/chalkify/arithmetic.rs20
-rw-r--r--src/test/ui/chalkify/trait-objects.rs13
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/ui/chalkify/arithmetic.rs b/src/test/ui/chalkify/arithmetic.rs
new file mode 100644
index 00000000000..a20acce4c76
--- /dev/null
+++ b/src/test/ui/chalkify/arithmetic.rs
@@ -0,0 +1,20 @@
+// check-pass
+// compile-flags: -Z chalk
+
+fn main() {
+    1 + 2;
+    3 * 6;
+    2 - 5;
+    17 / 6;
+    23 % 11;
+    4 & 6;
+    7 | 15;
+    4 << 7;
+    123 >> 3;
+    1 == 2;
+    5 != 5;
+    6 < 2;
+    7 > 11;
+    3 <= 1;
+    9 >= 14;
+}
diff --git a/src/test/ui/chalkify/trait-objects.rs b/src/test/ui/chalkify/trait-objects.rs
new file mode 100644
index 00000000000..13d9e6a6578
--- /dev/null
+++ b/src/test/ui/chalkify/trait-objects.rs
@@ -0,0 +1,13 @@
+// check-pass
+// compile-flags: -Z chalk
+
+use std::fmt::Display;
+
+fn main() {
+    let d: &dyn Display = &mut 3;
+    // FIXME(chalk) should be able to call d.to_string() as well, but doing so
+    // requires Chalk to be able to prove trait object well-formed goals.
+    (&d).to_string();
+    let f: &dyn Fn(i32) -> _ = &|x| x + x;
+    f(2);
+}