summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-100605.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-100605.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-100605.rs b/src/test/ui/issues/issue-100605.rs
new file mode 100644
index 000000000..917a45c15
--- /dev/null
+++ b/src/test/ui/issues/issue-100605.rs
@@ -0,0 +1,9 @@
+fn takes_option(_arg: Option<&String>) {}
+
+fn main() {
+ takes_option(&None); //~ ERROR 4:18: 4:23: mismatched types [E0308]
+
+ let x = String::from("x");
+ let res = Some(x);
+ takes_option(&res); //~ ERROR 8:18: 8:22: mismatched types [E0308]
+}