about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2021-04-15 10:37:42 -0400
committerJason Newcomb <jsnewcomb@pm.me>2021-04-15 10:37:42 -0400
commit779d98f6ccbd76807e811a134bb00a4e0d92c6db (patch)
tree018cb396bb60478f7607c62c264c1f48ea646901 /tests
parentb1c675f3fc682201cdb28719133285b878e2d157 (diff)
downloadrust-779d98f6ccbd76807e811a134bb00a4e0d92c6db.tar.gz
rust-779d98f6ccbd76807e811a134bb00a4e0d92c6db.zip
Don't allow adjustments for `manual_map`
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/manual_map_option.fixed7
-rw-r--r--tests/ui/manual_map_option.rs7
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/manual_map_option.fixed b/tests/ui/manual_map_option.fixed
index ee015845777..40d01df6379 100644
--- a/tests/ui/manual_map_option.fixed
+++ b/tests/ui/manual_map_option.fixed
@@ -146,4 +146,11 @@ fn main() {
             None => None,
         };
     }
+
+    // #7077
+    let s = &String::new();
+    let _: Option<&str> = match Some(s) {
+        Some(s) => Some(s),
+        None => None,
+    };
 }
diff --git a/tests/ui/manual_map_option.rs b/tests/ui/manual_map_option.rs
index 29509bddfd9..cfef0c5cc4e 100644
--- a/tests/ui/manual_map_option.rs
+++ b/tests/ui/manual_map_option.rs
@@ -212,4 +212,11 @@ fn main() {
             None => None,
         };
     }
+
+    // #7077
+    let s = &String::new();
+    let _: Option<&str> = match Some(s) {
+        Some(s) => Some(s),
+        None => None,
+    };
 }