about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs6
-rw-r--r--tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr6
-rw-r--r--tests/ui/closures/2229_closure_analysis/by_value.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/by_value.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs12
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr12
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-enums.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/capture-enums.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs10
-rw-r--r--tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr10
-rw-r--r--tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs10
-rw-r--r--tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr10
-rw-r--r--tests/ui/closures/2229_closure_analysis/destructure_patterns.rs12
-rw-r--r--tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr12
-rw-r--r--tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/filter-on-struct-member.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-87378.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-87378.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-88476.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-88476.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs26
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr26
-rw-r--r--tests/ui/closures/2229_closure_analysis/move_closure.rs20
-rw-r--r--tests/ui/closures/2229_closure_analysis/move_closure.stderr20
-rw-r--r--tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/nested-closure.rs18
-rw-r--r--tests/ui/closures/2229_closure_analysis/nested-closure.stderr18
-rw-r--r--tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/path-with-array-access.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs24
-rw-r--r--tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr48
-rw-r--r--tests/ui/closures/2229_closure_analysis/repr_packed.rs14
-rw-r--r--tests/ui/closures/2229_closure_analysis/repr_packed.stderr14
-rw-r--r--tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs10
-rw-r--r--tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr8
-rw-r--r--tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs8
-rw-r--r--tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr8
-rw-r--r--tests/ui/closures/2229_closure_analysis/wild_patterns.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/wild_patterns.stderr4
-rw-r--r--tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs (renamed from tests/ui/auxiliary/using-target-feature-unstable.rs)0
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-attribute.rs12
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-attribute.stderr8
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-cfg.rs15
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag-disable.rs11
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag-disable.stderr7
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag.rs11
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag.stderr7
-rw-r--r--tests/ui/target-feature/using-target-feature-unstable.rs (renamed from tests/ui/using-target-feature-unstable.rs)0
65 files changed, 310 insertions, 239 deletions
diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs
index c194cea2e37..27b17a56f12 100644
--- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs
+++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs
@@ -13,10 +13,10 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         m[0] += 10;
-        //~^ NOTE: Capturing m[] -> MutBorrow
-        //~| NOTE: Min Capture m[] -> MutBorrow
+        //~^ NOTE: Capturing m[] -> Mutable
+        //~| NOTE: Min Capture m[] -> Mutable
         m[1] += 40;
-        //~^ NOTE: Capturing m[] -> MutBorrow
+        //~^ NOTE: Capturing m[] -> Mutable
     };
 
     c();
diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr
index d7582dcfcc7..3c4f2de73a4 100644
--- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr
+++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr
@@ -20,12 +20,12 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing m[] -> MutBorrow
+note: Capturing m[] -> Mutable
   --> $DIR/arrays-completely-captured.rs:15:9
    |
 LL |         m[0] += 10;
    |         ^
-note: Capturing m[] -> MutBorrow
+note: Capturing m[] -> Mutable
   --> $DIR/arrays-completely-captured.rs:18:9
    |
 LL |         m[1] += 40;
@@ -43,7 +43,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture m[] -> MutBorrow
+note: Min Capture m[] -> Mutable
   --> $DIR/arrays-completely-captured.rs:15:9
    |
 LL |         m[0] += 10;
diff --git a/tests/ui/closures/2229_closure_analysis/by_value.rs b/tests/ui/closures/2229_closure_analysis/by_value.rs
index 3fa28a1c6e9..2c9202fd617 100644
--- a/tests/ui/closures/2229_closure_analysis/by_value.rs
+++ b/tests/ui/closures/2229_closure_analysis/by_value.rs
@@ -26,8 +26,8 @@ fn big_box() {
         //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue
         //~| NOTE: Min Capture t[(0, 0)] -> ByValue
         println!("{} {:?}", t.1, p);
-        //~^ NOTE: Capturing t[(1, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture t[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(1, 0)] -> Immutable
+        //~| NOTE: Min Capture t[(1, 0)] -> Immutable
     };
 
     c();
diff --git a/tests/ui/closures/2229_closure_analysis/by_value.stderr b/tests/ui/closures/2229_closure_analysis/by_value.stderr
index 0dd9991cf84..f843b76d723 100644
--- a/tests/ui/closures/2229_closure_analysis/by_value.stderr
+++ b/tests/ui/closures/2229_closure_analysis/by_value.stderr
@@ -25,7 +25,7 @@ note: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue
    |
 LL |         let p = t.0.0;
    |                 ^^^^^
-note: Capturing t[(1, 0)] -> ImmBorrow
+note: Capturing t[(1, 0)] -> Immutable
   --> $DIR/by_value.rs:28:29
    |
 LL |         println!("{} {:?}", t.1, p);
@@ -48,7 +48,7 @@ note: Min Capture t[(0, 0)] -> ByValue
    |
 LL |         let p = t.0.0;
    |                 ^^^^^
-note: Min Capture t[(1, 0)] -> ImmBorrow
+note: Min Capture t[(1, 0)] -> Immutable
   --> $DIR/by_value.rs:28:29
    |
 LL |         println!("{} {:?}", t.1, p);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs
index fa1ddeb0176..0c42e66a2fa 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs
@@ -20,15 +20,15 @@ fn main() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         println!("{:?}", p);
-        //~^ NOTE: Capturing p[] -> ImmBorrow
-        //~| NOTE: Min Capture p[] -> ImmBorrow
+        //~^ NOTE: Capturing p[] -> Immutable
+        //~| NOTE: Min Capture p[] -> Immutable
         println!("{:?}", p.x);
-        //~^ NOTE: Capturing p[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(0, 0)] -> Immutable
 
         println!("{:?}", q.x);
-        //~^ NOTE: Capturing q[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing q[(0, 0)] -> Immutable
         println!("{:?}", q);
-        //~^ NOTE: Capturing q[] -> ImmBorrow
-        //~| NOTE: Min Capture q[] -> ImmBorrow
+        //~^ NOTE: Capturing q[] -> Immutable
+        //~| NOTE: Min Capture q[] -> Immutable
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr
index d2409c9367c..64ae704bc90 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr
@@ -20,22 +20,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[] -> ImmBorrow
+note: Capturing p[] -> Immutable
   --> $DIR/capture-analysis-1.rs:22:26
    |
 LL |         println!("{:?}", p);
    |                          ^
-note: Capturing p[(0, 0)] -> ImmBorrow
+note: Capturing p[(0, 0)] -> Immutable
   --> $DIR/capture-analysis-1.rs:25:26
    |
 LL |         println!("{:?}", p.x);
    |                          ^^^
-note: Capturing q[(0, 0)] -> ImmBorrow
+note: Capturing q[(0, 0)] -> Immutable
   --> $DIR/capture-analysis-1.rs:28:26
    |
 LL |         println!("{:?}", q.x);
    |                          ^^^
-note: Capturing q[] -> ImmBorrow
+note: Capturing q[] -> Immutable
   --> $DIR/capture-analysis-1.rs:30:26
    |
 LL |         println!("{:?}", q);
@@ -53,12 +53,12 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[] -> ImmBorrow
+note: Min Capture p[] -> Immutable
   --> $DIR/capture-analysis-1.rs:22:26
    |
 LL |         println!("{:?}", p);
    |                          ^
-note: Min Capture q[] -> ImmBorrow
+note: Min Capture q[] -> Immutable
   --> $DIR/capture-analysis-1.rs:30:26
    |
 LL |         println!("{:?}", q);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs
index eb342b303f9..adb618d1771 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs
@@ -22,7 +22,7 @@ fn main() {
         //~^ NOTE: Capturing p[(0, 0)] -> ByValue
         //~| NOTE: p[] captured as ByValue here
         println!("{:?}", p);
-        //~^ NOTE: Capturing p[] -> ImmBorrow
+        //~^ NOTE: Capturing p[] -> Immutable
         //~| NOTE: Min Capture p[] -> ByValue
         //~| NOTE: p[] used here
     };
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr
index 7049c708bb8..40c075f3cc8 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr
@@ -25,7 +25,7 @@ note: Capturing p[(0, 0)] -> ByValue
    |
 LL |         let _x = p.x;
    |                  ^^^
-note: Capturing p[] -> ImmBorrow
+note: Capturing p[] -> Immutable
   --> $DIR/capture-analysis-2.rs:24:26
    |
 LL |         println!("{:?}", p);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs
index e1476e415d9..0a21eaaaa12 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs
@@ -27,7 +27,7 @@ fn main() {
         //~^ NOTE: Capturing a[(0, 0),(0, 0)] -> ByValue
         //~| NOTE: a[(0, 0)] captured as ByValue here
         println!("{:?}", a.b);
-        //~^ NOTE: Capturing a[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing a[(0, 0)] -> Immutable
         //~| NOTE: Min Capture a[(0, 0)] -> ByValue
         //~| NOTE: a[(0, 0)] used here
     };
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr
index 698b51a4fdb..a4689f2ea96 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr
@@ -25,7 +25,7 @@ note: Capturing a[(0, 0),(0, 0)] -> ByValue
    |
 LL |         let _x = a.b.c;
    |                  ^^^^^
-note: Capturing a[(0, 0)] -> ImmBorrow
+note: Capturing a[(0, 0)] -> Immutable
   --> $DIR/capture-analysis-3.rs:29:26
    |
 LL |         println!("{:?}", a.b);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs
index 6d53a0ac634..790dad0710b 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs
@@ -27,6 +27,6 @@ fn main() {
         //~^ NOTE: Capturing a[(0, 0)] -> ByValue
         //~| NOTE: Min Capture a[(0, 0)] -> ByValue
         println!("{:?}", a.b.c);
-        //~^ NOTE: Capturing a[(0, 0),(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing a[(0, 0),(0, 0)] -> Immutable
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr
index 9cd0dcf720e..9d3004dbbb0 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr
@@ -25,7 +25,7 @@ note: Capturing a[(0, 0)] -> ByValue
    |
 LL |         let _x = a.b;
    |                  ^^^
-note: Capturing a[(0, 0),(0, 0)] -> ImmBorrow
+note: Capturing a[(0, 0),(0, 0)] -> Immutable
   --> $DIR/capture-analysis-4.rs:29:26
    |
 LL |         println!("{:?}", a.b.c);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs
index 68703333fa8..af12e0b259d 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs
@@ -18,8 +18,8 @@ fn main() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         println!("{}", p.x);
-        //~^ NOTE: Capturing p[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture p[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture p[(0, 0)] -> Immutable
     };
 
     // `c` should only capture `p.x`, therefore mutating `p.y` is allowed.
diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr
index 92a719d6098..48fbd682a5b 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0)] -> ImmBorrow
+note: Capturing p[(0, 0)] -> Immutable
   --> $DIR/capture-disjoint-field-struct.rs:20:24
    |
 LL |         println!("{}", p.x);
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[(0, 0)] -> ImmBorrow
+note: Min Capture p[(0, 0)] -> Immutable
   --> $DIR/capture-disjoint-field-struct.rs:20:24
    |
 LL |         println!("{}", p.x);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs
index 0c006ffdd72..ccd26049264 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs
@@ -13,8 +13,8 @@ fn main() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         println!("{}", t.0);
-        //~^ NOTE: Capturing t[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture t[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture t[(0, 0)] -> Immutable
     };
 
     // `c` only captures t.0, therefore mutating t.1 is allowed.
diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr
index d5333bf71db..496511d6025 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0)] -> ImmBorrow
+note: Capturing t[(0, 0)] -> Immutable
   --> $DIR/capture-disjoint-field-tuple.rs:15:24
    |
 LL |         println!("{}", t.0);
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture t[(0, 0)] -> ImmBorrow
+note: Min Capture t[(0, 0)] -> Immutable
   --> $DIR/capture-disjoint-field-tuple.rs:15:24
    |
 LL |         println!("{}", t.0);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.rs b/tests/ui/closures/2229_closure_analysis/capture-enums.rs
index 6f973739e66..b1e21bd0f8d 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-enums.rs
+++ b/tests/ui/closures/2229_closure_analysis/capture-enums.rs
@@ -21,14 +21,14 @@ fn multi_variant_enum() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         if let Info::Point(_, _, str) = point {
-            //~^ NOTE: Capturing point[] -> ImmBorrow
+            //~^ NOTE: Capturing point[] -> Immutable
             //~| NOTE: Capturing point[(2, 0)] -> ByValue
             //~| NOTE: Min Capture point[] -> ByValue
             println!("{}", str);
         }
 
         if let Info::Meta(_, v) = meta {
-            //~^ NOTE: Capturing meta[] -> ImmBorrow
+            //~^ NOTE: Capturing meta[] -> Immutable
             //~| NOTE: Capturing meta[(1, 1)] -> ByValue
             //~| NOTE: Min Capture meta[] -> ByValue
             println!("{:?}", v);
diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr
index 8b258569d95..2d70b614858 100644
--- a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr
+++ b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr
@@ -30,7 +30,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing point[] -> ImmBorrow
+note: Capturing point[] -> Immutable
   --> $DIR/capture-enums.rs:23:41
    |
 LL |         if let Info::Point(_, _, str) = point {
@@ -40,7 +40,7 @@ note: Capturing point[(2, 0)] -> ByValue
    |
 LL |         if let Info::Point(_, _, str) = point {
    |                                         ^^^^^
-note: Capturing meta[] -> ImmBorrow
+note: Capturing meta[] -> Immutable
   --> $DIR/capture-enums.rs:30:35
    |
 LL |         if let Info::Meta(_, v) = meta {
diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs
index 5143836ad6b..61b707605c2 100644
--- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs
+++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs
@@ -39,13 +39,13 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let x = &p.a.p.x;
-        //~^ NOTE: Capturing p[(0, 0),(0, 0),(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(0, 0),(0, 0),(0, 0)] -> Immutable
         p.b.q.y = 9;
-        //~^ NOTE: Capturing p[(1, 0),(1, 0),(1, 0)] -> MutBorrow
-        //~| NOTE: p[] captured as MutBorrow here
+        //~^ NOTE: Capturing p[(1, 0),(1, 0),(1, 0)] -> Mutable
+        //~| NOTE: p[] captured as Mutable here
         println!("{:?}", p);
-        //~^ NOTE: Capturing p[] -> ImmBorrow
-        //~| NOTE: Min Capture p[] -> MutBorrow
+        //~^ NOTE: Capturing p[] -> Immutable
+        //~| NOTE: Min Capture p[] -> Mutable
         //~| NOTE: p[] used here
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr
index 55ba416dfd9..d118f7573a4 100644
--- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr
+++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr
@@ -20,17 +20,17 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0),(0, 0),(0, 0)] -> ImmBorrow
+note: Capturing p[(0, 0),(0, 0),(0, 0)] -> Immutable
   --> $DIR/deep-multilevel-struct.rs:41:18
    |
 LL |         let x = &p.a.p.x;
    |                  ^^^^^^^
-note: Capturing p[(1, 0),(1, 0),(1, 0)] -> MutBorrow
+note: Capturing p[(1, 0),(1, 0),(1, 0)] -> Mutable
   --> $DIR/deep-multilevel-struct.rs:43:9
    |
 LL |         p.b.q.y = 9;
    |         ^^^^^^^
-note: Capturing p[] -> ImmBorrow
+note: Capturing p[] -> Immutable
   --> $DIR/deep-multilevel-struct.rs:46:26
    |
 LL |         println!("{:?}", p);
@@ -48,11 +48,11 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[] -> MutBorrow
+note: Min Capture p[] -> Mutable
   --> $DIR/deep-multilevel-struct.rs:43:9
    |
 LL |         p.b.q.y = 9;
-   |         ^^^^^^^ p[] captured as MutBorrow here
+   |         ^^^^^^^ p[] captured as Mutable here
 ...
 LL |         println!("{:?}", p);
    |                          ^ p[] used here
diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs
index 0cb0aeb824e..6c7eab1eeb7 100644
--- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs
+++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs
@@ -13,13 +13,13 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let x = &t.0.0.0;
-        //~^ NOTE: Capturing t[(0, 0),(0, 0),(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(0, 0),(0, 0),(0, 0)] -> Immutable
         t.1.1.1 = 9;
-        //~^ NOTE: Capturing t[(1, 0),(1, 0),(1, 0)] -> MutBorrow
-        //~| NOTE: t[] captured as MutBorrow here
+        //~^ NOTE: Capturing t[(1, 0),(1, 0),(1, 0)] -> Mutable
+        //~| NOTE: t[] captured as Mutable here
         println!("{:?}", t);
-        //~^ NOTE: Min Capture t[] -> MutBorrow
-        //~| NOTE: Capturing t[] -> ImmBorrow
+        //~^ NOTE: Min Capture t[] -> Mutable
+        //~| NOTE: Capturing t[] -> Immutable
         //~| NOTE: t[] used here
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr
index 5e45fe1ca8b..cc5f74613e4 100644
--- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr
+++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr
@@ -20,17 +20,17 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0),(0, 0),(0, 0)] -> ImmBorrow
+note: Capturing t[(0, 0),(0, 0),(0, 0)] -> Immutable
   --> $DIR/deep-multilevel-tuple.rs:15:18
    |
 LL |         let x = &t.0.0.0;
    |                  ^^^^^^^
-note: Capturing t[(1, 0),(1, 0),(1, 0)] -> MutBorrow
+note: Capturing t[(1, 0),(1, 0),(1, 0)] -> Mutable
   --> $DIR/deep-multilevel-tuple.rs:17:9
    |
 LL |         t.1.1.1 = 9;
    |         ^^^^^^^
-note: Capturing t[] -> ImmBorrow
+note: Capturing t[] -> Immutable
   --> $DIR/deep-multilevel-tuple.rs:20:26
    |
 LL |         println!("{:?}", t);
@@ -48,11 +48,11 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture t[] -> MutBorrow
+note: Min Capture t[] -> Mutable
   --> $DIR/deep-multilevel-tuple.rs:17:9
    |
 LL |         t.1.1.1 = 9;
-   |         ^^^^^^^ t[] captured as MutBorrow here
+   |         ^^^^^^^ t[] captured as Mutable here
 ...
 LL |         println!("{:?}", t);
    |                          ^ t[] used here
diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs
index 3106c478d00..68e8d66762d 100644
--- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs
+++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs
@@ -44,9 +44,9 @@ fn structs() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let Point { x: ref mut x, y: _, id: moved_id } = p;
-        //~^ NOTE: Capturing p[(0, 0)] -> MutBorrow
+        //~^ NOTE: Capturing p[(0, 0)] -> Mutable
         //~| NOTE: Capturing p[(2, 0)] -> ByValue
-        //~| NOTE: Min Capture p[(0, 0)] -> MutBorrow
+        //~| NOTE: Min Capture p[(0, 0)] -> Mutable
         //~| NOTE: Min Capture p[(2, 0)] -> ByValue
 
         println!("{}, {}", x, moved_id);
@@ -65,11 +65,11 @@ fn tuples() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let (ref mut x, ref ref_str, (moved_s, _)) = t;
-        //~^ NOTE: Capturing t[(0, 0)] -> MutBorrow
-        //~| NOTE: Capturing t[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(0, 0)] -> Mutable
+        //~| NOTE: Capturing t[(1, 0)] -> Immutable
         //~| NOTE: Capturing t[(2, 0),(0, 0)] -> ByValue
-        //~| NOTE: Min Capture t[(0, 0)] -> MutBorrow
-        //~| NOTE: Min Capture t[(1, 0)] -> ImmBorrow
+        //~| NOTE: Min Capture t[(0, 0)] -> Mutable
+        //~| NOTE: Min Capture t[(1, 0)] -> Immutable
         //~| NOTE: Min Capture t[(2, 0),(0, 0)] -> ByValue
 
         println!("{}, {} {}", x, ref_str, moved_s);
diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr b/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr
index 7fc85de499f..6f8295ac095 100644
--- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr
+++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr
@@ -86,7 +86,7 @@ LL | |         println!("{}, {}", x, moved_id);
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0)] -> MutBorrow
+note: Capturing p[(0, 0)] -> Mutable
   --> $DIR/destructure_patterns.rs:46:58
    |
 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
@@ -109,7 +109,7 @@ LL | |         println!("{}, {}", x, moved_id);
 LL | |     };
    | |_____^
    |
-note: Min Capture p[(0, 0)] -> MutBorrow
+note: Min Capture p[(0, 0)] -> Mutable
   --> $DIR/destructure_patterns.rs:46:58
    |
 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
@@ -132,12 +132,12 @@ LL | |         println!("{}, {} {}", x, ref_str, moved_s);
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0)] -> MutBorrow
+note: Capturing t[(0, 0)] -> Mutable
   --> $DIR/destructure_patterns.rs:67:54
    |
 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
    |                                                      ^
-note: Capturing t[(1, 0)] -> ImmBorrow
+note: Capturing t[(1, 0)] -> Immutable
   --> $DIR/destructure_patterns.rs:67:54
    |
 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
@@ -160,12 +160,12 @@ LL | |         println!("{}, {} {}", x, ref_str, moved_s);
 LL | |     };
    | |_____^
    |
-note: Min Capture t[(0, 0)] -> MutBorrow
+note: Min Capture t[(0, 0)] -> Mutable
   --> $DIR/destructure_patterns.rs:67:54
    |
 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
    |                                                      ^
-note: Min Capture t[(1, 0)] -> ImmBorrow
+note: Min Capture t[(1, 0)] -> Immutable
   --> $DIR/destructure_patterns.rs:67:54
    |
 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs
index 059c248a3e8..7467c13b337 100644
--- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs
+++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs
@@ -13,7 +13,7 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("This uses new capture analyysis to capture s={}", s);
-        //~^ NOTE: Capturing s[] -> ImmBorrow
-        //~| NOTE: Min Capture s[] -> ImmBorrow
+        //~^ NOTE: Capturing s[] -> Immutable
+        //~| NOTE: Min Capture s[] -> Immutable
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr
index 4e76070dcf7..6dbe8c153c0 100644
--- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr
+++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing s[] -> ImmBorrow
+note: Capturing s[] -> Immutable
   --> $DIR/feature-gate-capture_disjoint_fields.rs:15:69
    |
 LL |         println!("This uses new capture analyysis to capture s={}", s);
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture s[] -> ImmBorrow
+note: Min Capture s[] -> Immutable
   --> $DIR/feature-gate-capture_disjoint_fields.rs:15:69
    |
 LL |         println!("This uses new capture analyysis to capture s={}", s);
diff --git a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs
index 11ef92367ca..feef8cabb39 100644
--- a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs
+++ b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs
@@ -24,8 +24,8 @@ impl Data {
             |v| self.filter.allowed(*v),
             //~^ ERROR: First Pass analysis includes:
             //~| ERROR: Min Capture analysis includes:
-            //~| NOTE: Capturing self[Deref,(0, 0)] -> ImmBorrow
-            //~| NOTE: Min Capture self[Deref,(0, 0)] -> ImmBorrow
+            //~| NOTE: Capturing self[Deref,(0, 0)] -> Immutable
+            //~| NOTE: Min Capture self[Deref,(0, 0)] -> Immutable
         );
     }
 }
diff --git a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.stderr b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.stderr
index 10e0d076b42..ffe7dd4d108 100644
--- a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.stderr
+++ b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.stderr
@@ -4,7 +4,7 @@ error: First Pass analysis includes:
 LL |             |v| self.filter.allowed(*v),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: Capturing self[Deref,(0, 0)] -> ImmBorrow
+note: Capturing self[Deref,(0, 0)] -> Immutable
   --> $DIR/filter-on-struct-member.rs:24:17
    |
 LL |             |v| self.filter.allowed(*v),
@@ -16,7 +16,7 @@ error: Min Capture analysis includes:
 LL |             |v| self.filter.allowed(*v),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: Min Capture self[Deref,(0, 0)] -> ImmBorrow
+note: Min Capture self[Deref,(0, 0)] -> Immutable
   --> $DIR/filter-on-struct-member.rs:24:17
    |
 LL |             |v| self.filter.allowed(*v),
diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/issue-87378.rs
index 0a771466e1e..9c89a4538be 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-87378.rs
+++ b/tests/ui/closures/2229_closure_analysis/issue-87378.rs
@@ -19,8 +19,8 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
        unsafe { u.value }
-        //~^ NOTE: Capturing u[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture u[] -> ImmBorrow
+        //~^ NOTE: Capturing u[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture u[] -> Immutable
     };
 
     c();
diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr
index 19c0c59170b..3273e92d9d1 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr
+++ b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing u[(0, 0)] -> ImmBorrow
+note: Capturing u[(0, 0)] -> Immutable
   --> $DIR/issue-87378.rs:21:17
    |
 LL |        unsafe { u.value }
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture u[] -> ImmBorrow
+note: Min Capture u[] -> Immutable
   --> $DIR/issue-87378.rs:21:17
    |
 LL |        unsafe { u.value }
diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/issue-88476.rs
index 7f833839d56..45fe73b76e2 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-88476.rs
+++ b/tests/ui/closures/2229_closure_analysis/issue-88476.rs
@@ -24,7 +24,7 @@ pub fn test1() {
     //~| ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{:?}", f.0);
-        //~^ NOTE: Capturing f[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing f[(0, 0)] -> Immutable
         //~| NOTE: Min Capture f[] -> ByValue
     };
 
@@ -52,7 +52,7 @@ fn test2() {
     //~| ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", character.hp)
-        //~^ NOTE: Capturing character[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing character[(0, 0)] -> Immutable
         //~| NOTE: Min Capture character[(0, 0)] -> ByValue
     };
 
diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr
index d0201757157..1c0e254dbf7 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr
+++ b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr
@@ -31,7 +31,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing f[(0, 0)] -> ImmBorrow
+note: Capturing f[(0, 0)] -> Immutable
   --> $DIR/issue-88476.rs:26:26
    |
 LL |         println!("{:?}", f.0);
@@ -69,7 +69,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing character[(0, 0)] -> ImmBorrow
+note: Capturing character[(0, 0)] -> Immutable
   --> $DIR/issue-88476.rs:54:24
    |
 LL |         println!("{}", character.hp)
diff --git a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs
index 8dd20fc2a74..9c7b70457d9 100644
--- a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs
+++ b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs
@@ -13,8 +13,8 @@ fn test_1_should_capture() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match variant {
-        //~^ NOTE: Capturing variant[] -> ImmBorrow
-        //~| NOTE: Min Capture variant[] -> ImmBorrow
+        //~^ NOTE: Capturing variant[] -> Immutable
+        //~| NOTE: Min Capture variant[] -> Immutable
             Some(_) => {}
             _ => {}
         }
@@ -64,9 +64,9 @@ fn test_6_should_capture_single_variant() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match variant {
-            //~^ NOTE: Capturing variant[] -> ImmBorrow
-            //~| NOTE: Capturing variant[(0, 0)] -> ImmBorrow
-            //~| NOTE: Min Capture variant[] -> ImmBorrow
+            //~^ NOTE: Capturing variant[] -> Immutable
+            //~| NOTE: Capturing variant[(0, 0)] -> Immutable
+            //~| NOTE: Min Capture variant[] -> Immutable
             SingleVariant::Points(a) => {
                 println!("{:?}", a);
             }
@@ -131,8 +131,8 @@ fn test_5_should_capture_multi_variant() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match variant {
-        //~^ NOTE: Capturing variant[] -> ImmBorrow
-        //~| NOTE: Min Capture variant[] -> ImmBorrow
+        //~^ NOTE: Capturing variant[] -> Immutable
+        //~| NOTE: Min Capture variant[] -> Immutable
             MVariant::A => {}
             _ => {}
         }
@@ -149,8 +149,8 @@ fn test_7_should_capture_slice_len() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match slice {
-            //~^ NOTE: Capturing slice[] -> ImmBorrow
-            //~| NOTE: Min Capture slice[] -> ImmBorrow
+            //~^ NOTE: Capturing slice[] -> Immutable
+            //~| NOTE: Min Capture slice[] -> Immutable
             [_,_,_] => {},
             _ => {}
         }
@@ -161,8 +161,8 @@ fn test_7_should_capture_slice_len() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match slice {
-            //~^ NOTE: Capturing slice[] -> ImmBorrow
-            //~| NOTE: Min Capture slice[] -> ImmBorrow
+            //~^ NOTE: Capturing slice[] -> Immutable
+            //~| NOTE: Min Capture slice[] -> Immutable
             [] => {},
             _ => {}
         }
@@ -173,8 +173,8 @@ fn test_7_should_capture_slice_len() {
     //~^ First Pass analysis includes:
     //~| Min Capture analysis includes:
         match slice {
-            //~^ NOTE: Capturing slice[] -> ImmBorrow
-            //~| NOTE: Min Capture slice[] -> ImmBorrow
+            //~^ NOTE: Capturing slice[] -> Immutable
+            //~| NOTE: Min Capture slice[] -> Immutable
             [_, .. ,_] => {},
             _ => {}
         }
diff --git a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr
index c3c3f8b8477..7125bfa3101 100644
--- a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr
+++ b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.stderr
@@ -10,7 +10,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing variant[] -> ImmBorrow
+note: Capturing variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:15:15
    |
 LL |         match variant {
@@ -28,7 +28,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture variant[] -> ImmBorrow
+note: Min Capture variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:15:15
    |
 LL |         match variant {
@@ -68,12 +68,12 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing variant[] -> ImmBorrow
+note: Capturing variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:66:15
    |
 LL |         match variant {
    |               ^^^^^^^
-note: Capturing variant[(0, 0)] -> ImmBorrow
+note: Capturing variant[(0, 0)] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:66:15
    |
 LL |         match variant {
@@ -91,7 +91,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture variant[] -> ImmBorrow
+note: Min Capture variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:66:15
    |
 LL |         match variant {
@@ -142,7 +142,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing variant[] -> ImmBorrow
+note: Capturing variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:133:15
    |
 LL |         match variant {
@@ -160,7 +160,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture variant[] -> ImmBorrow
+note: Min Capture variant[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:133:15
    |
 LL |         match variant {
@@ -178,7 +178,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing slice[] -> ImmBorrow
+note: Capturing slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:151:15
    |
 LL |         match slice {
@@ -196,7 +196,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture slice[] -> ImmBorrow
+note: Min Capture slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:151:15
    |
 LL |         match slice {
@@ -214,7 +214,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing slice[] -> ImmBorrow
+note: Capturing slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:163:15
    |
 LL |         match slice {
@@ -232,7 +232,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture slice[] -> ImmBorrow
+note: Min Capture slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:163:15
    |
 LL |         match slice {
@@ -250,7 +250,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Capturing slice[] -> ImmBorrow
+note: Capturing slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:175:15
    |
 LL |         match slice {
@@ -268,7 +268,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-note: Min Capture slice[] -> ImmBorrow
+note: Min Capture slice[] -> Immutable
   --> $DIR/patterns-capture-analysis.rs:175:15
    |
 LL |         match slice {
diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.rs b/tests/ui/closures/2229_closure_analysis/move_closure.rs
index 3b7f036dfe7..b6690d06011 100644
--- a/tests/ui/closures/2229_closure_analysis/move_closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/move_closure.rs
@@ -17,7 +17,7 @@ fn simple_move_closure() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         t.0.0 = "new S".into();
-        //~^ NOTE: Capturing t[(0, 0),(0, 0)] -> MutBorrow
+        //~^ NOTE: Capturing t[(0, 0),(0, 0)] -> Mutable
         //~| NOTE: Min Capture t[(0, 0),(0, 0)] -> ByValue
     };
     c();
@@ -36,7 +36,7 @@ fn simple_ref() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         *ref_s += 10;
-        //~^ NOTE: Capturing ref_s[Deref] -> MutBorrow
+        //~^ NOTE: Capturing ref_s[Deref] -> Mutable
         //~| NOTE: Min Capture ref_s[] -> ByValue
     };
     c();
@@ -58,7 +58,7 @@ fn struct_contains_ref_to_another_struct_1() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         t.0.0 = "new s".into();
-        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> MutBorrow
+        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> Mutable
         //~| NOTE: Min Capture t[(0, 0)] -> ByValue
     };
 
@@ -82,7 +82,7 @@ fn struct_contains_ref_to_another_struct_2() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let _t = t.0.0;
-        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> Immutable
         //~| NOTE: Min Capture t[(0, 0)] -> ByValue
     };
 
@@ -127,7 +127,7 @@ fn truncate_box_derefs() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let _t = b.0;
-        //~^ NOTE: Capturing b[Deref,(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing b[Deref,(0, 0)] -> Immutable
         //~| NOTE: Min Capture b[] -> ByValue
     };
 
@@ -144,7 +144,7 @@ fn truncate_box_derefs() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", b.0);
-        //~^ NOTE: Capturing b[Deref,(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing b[Deref,(0, 0)] -> Immutable
         //~| NOTE: Min Capture b[] -> ByValue
     };
 
@@ -162,7 +162,7 @@ fn truncate_box_derefs() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", t.1.0);
-        //~^ NOTE: Capturing t[(1, 0),Deref,(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(1, 0),Deref,(0, 0)] -> Immutable
         //~| NOTE: Min Capture t[(1, 0)] -> ByValue
     };
 }
@@ -182,7 +182,7 @@ fn box_mut_1() {
     //~| NOTE: see issue #15701 <https://github.com/rust-lang/rust/issues/15701>
     //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
     //~| First Pass analysis includes:
-    //~| NOTE: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow
+    //~| NOTE: Capturing box_p_foo[Deref,Deref,(0, 0)] -> Mutable
     //~| Min Capture analysis includes:
     //~| NOTE: Min Capture box_p_foo[] -> ByValue
 }
@@ -200,7 +200,7 @@ fn box_mut_2() {
     //~| NOTE: see issue #15701 <https://github.com/rust-lang/rust/issues/15701>
     //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
     //~| First Pass analysis includes:
-    //~| NOTE: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow
+    //~| NOTE: Capturing p_foo[Deref,Deref,(0, 0)] -> Mutable
     //~| Min Capture analysis includes:
     //~| NOTE: Min Capture p_foo[] -> ByValue
 }
@@ -214,7 +214,7 @@ fn returned_closure_owns_copy_type_data() -> impl Fn() -> i32 {
     //~| NOTE: see issue #15701 <https://github.com/rust-lang/rust/issues/15701>
     //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
     //~| First Pass analysis includes:
-    //~| NOTE: Capturing x[] -> ImmBorrow
+    //~| NOTE: Capturing x[] -> Immutable
     //~| Min Capture analysis includes:
     //~| NOTE: Min Capture x[] -> ByValue
 
diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.stderr b/tests/ui/closures/2229_closure_analysis/move_closure.stderr
index 7e9e3c5fed3..68754b8f7be 100644
--- a/tests/ui/closures/2229_closure_analysis/move_closure.stderr
+++ b/tests/ui/closures/2229_closure_analysis/move_closure.stderr
@@ -114,7 +114,7 @@ error: First Pass analysis includes:
 LL |     let c = #[rustc_capture_analysis] move || x;
    |                                       ^^^^^^^^^
    |
-note: Capturing x[] -> ImmBorrow
+note: Capturing x[] -> Immutable
   --> $DIR/move_closure.rs:212:47
    |
 LL |     let c = #[rustc_capture_analysis] move || x;
@@ -144,7 +144,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0),(0, 0)] -> MutBorrow
+note: Capturing t[(0, 0),(0, 0)] -> Mutable
   --> $DIR/move_closure.rs:19:9
    |
 LL |         t.0.0 = "new S".into();
@@ -180,7 +180,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing ref_s[Deref] -> MutBorrow
+note: Capturing ref_s[Deref] -> Mutable
   --> $DIR/move_closure.rs:38:9
    |
 LL |         *ref_s += 10;
@@ -216,7 +216,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0),Deref,(0, 0)] -> MutBorrow
+note: Capturing t[(0, 0),Deref,(0, 0)] -> Mutable
   --> $DIR/move_closure.rs:60:9
    |
 LL |         t.0.0 = "new s".into();
@@ -252,7 +252,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
+note: Capturing t[(0, 0),Deref,(0, 0)] -> Immutable
   --> $DIR/move_closure.rs:84:18
    |
 LL |         let _t = t.0.0;
@@ -324,7 +324,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing b[Deref,(0, 0)] -> ImmBorrow
+note: Capturing b[Deref,(0, 0)] -> Immutable
   --> $DIR/move_closure.rs:129:18
    |
 LL |         let _t = b.0;
@@ -360,7 +360,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing b[Deref,(0, 0)] -> ImmBorrow
+note: Capturing b[Deref,(0, 0)] -> Immutable
   --> $DIR/move_closure.rs:146:24
    |
 LL |         println!("{}", b.0);
@@ -396,7 +396,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(1, 0),Deref,(0, 0)] -> ImmBorrow
+note: Capturing t[(1, 0),Deref,(0, 0)] -> Immutable
   --> $DIR/move_closure.rs:164:24
    |
 LL |         println!("{}", t.1.0);
@@ -426,7 +426,7 @@ error: First Pass analysis includes:
 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow
+note: Capturing box_p_foo[Deref,Deref,(0, 0)] -> Mutable
   --> $DIR/move_closure.rs:180:47
    |
 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
@@ -450,7 +450,7 @@ error: First Pass analysis includes:
 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
    |                                       ^^^^^^^^^^^^^^^^^^^^^
    |
-note: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow
+note: Capturing p_foo[Deref,Deref,(0, 0)] -> Mutable
   --> $DIR/move_closure.rs:198:47
    |
 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs
index 2d7c26074cb..501aebe725a 100644
--- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs
+++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs
@@ -27,8 +27,8 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let wp = &w.p;
-        //~^ NOTE: Capturing w[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture w[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing w[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture w[(0, 0)] -> Immutable
         println!("{}", wp.x);
     };
 
diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr
index 118a7dacec6..000d929f07f 100644
--- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr
+++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr
@@ -20,7 +20,7 @@ LL | |         println!("{}", wp.x);
 LL | |     };
    | |_____^
    |
-note: Capturing w[(0, 0)] -> ImmBorrow
+note: Capturing w[(0, 0)] -> Immutable
   --> $DIR/multilevel-path-1.rs:29:19
    |
 LL |         let wp = &w.p;
@@ -38,7 +38,7 @@ LL | |         println!("{}", wp.x);
 LL | |     };
    | |_____^
    |
-note: Min Capture w[(0, 0)] -> ImmBorrow
+note: Min Capture w[(0, 0)] -> Immutable
   --> $DIR/multilevel-path-1.rs:29:19
    |
 LL |         let wp = &w.p;
diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs
index bcf0ed35137..f73627d14da 100644
--- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs
+++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs
@@ -22,8 +22,8 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", w.p.x);
-        //~^ NOTE: Capturing w[(0, 0),(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture w[(0, 0),(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing w[(0, 0),(0, 0)] -> Immutable
+        //~| NOTE: Min Capture w[(0, 0),(0, 0)] -> Immutable
     };
 
     // `c` only captures `w.p.x`, therefore it's safe to mutate `w.p.y`.
diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr
index a7112531d9a..97f53e490e8 100644
--- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing w[(0, 0),(0, 0)] -> ImmBorrow
+note: Capturing w[(0, 0),(0, 0)] -> Immutable
   --> $DIR/multilevel-path-2.rs:24:24
    |
 LL |         println!("{}", w.p.x);
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture w[(0, 0),(0, 0)] -> ImmBorrow
+note: Min Capture w[(0, 0),(0, 0)] -> Immutable
   --> $DIR/multilevel-path-2.rs:24:24
    |
 LL |         println!("{}", w.p.x);
diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/nested-closure.rs
index c481b3d853b..54166d068cb 100644
--- a/tests/ui/closures/2229_closure_analysis/nested-closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/nested-closure.rs
@@ -24,8 +24,8 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", p.x);
-        //~^ NOTE: Capturing p[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture p[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture p[(0, 0)] -> Immutable
         let incr = 10;
         let mut c2 = #[rustc_capture_analysis]
         //~^ ERROR: attributes on expressions are experimental
@@ -34,15 +34,15 @@ fn main() {
         || p.y += incr;
         //~^ ERROR: First Pass analysis includes:
         //~| ERROR: Min Capture analysis includes:
-        //~| NOTE: Capturing p[(1, 0)] -> MutBorrow
-        //~| NOTE: Capturing incr[] -> ImmBorrow
-        //~| NOTE: Min Capture p[(1, 0)] -> MutBorrow
-        //~| NOTE: Min Capture incr[] -> ImmBorrow
-        //~| NOTE: Capturing p[(1, 0)] -> MutBorrow
-        //~| NOTE: Min Capture p[(1, 0)] -> MutBorrow
+        //~| NOTE: Capturing p[(1, 0)] -> Mutable
+        //~| NOTE: Capturing incr[] -> Immutable
+        //~| NOTE: Min Capture p[(1, 0)] -> Mutable
+        //~| NOTE: Min Capture incr[] -> Immutable
+        //~| NOTE: Capturing p[(1, 0)] -> Mutable
+        //~| NOTE: Min Capture p[(1, 0)] -> Mutable
         c2();
         println!("{}", p.y);
-        //~^ NOTE: Capturing p[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(1, 0)] -> Immutable
     };
 
     c1();
diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr
index 256bfd58597..03550cb2d35 100644
--- a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr
+++ b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr
@@ -24,12 +24,12 @@ error: First Pass analysis includes:
 LL |         || p.y += incr;
    |         ^^^^^^^^^^^^^^
    |
-note: Capturing p[(1, 0)] -> MutBorrow
+note: Capturing p[(1, 0)] -> Mutable
   --> $DIR/nested-closure.rs:34:12
    |
 LL |         || p.y += incr;
    |            ^^^
-note: Capturing incr[] -> ImmBorrow
+note: Capturing incr[] -> Immutable
   --> $DIR/nested-closure.rs:34:19
    |
 LL |         || p.y += incr;
@@ -41,12 +41,12 @@ error: Min Capture analysis includes:
 LL |         || p.y += incr;
    |         ^^^^^^^^^^^^^^
    |
-note: Min Capture p[(1, 0)] -> MutBorrow
+note: Min Capture p[(1, 0)] -> Mutable
   --> $DIR/nested-closure.rs:34:12
    |
 LL |         || p.y += incr;
    |            ^^^
-note: Min Capture incr[] -> ImmBorrow
+note: Min Capture incr[] -> Immutable
   --> $DIR/nested-closure.rs:34:19
    |
 LL |         || p.y += incr;
@@ -64,17 +64,17 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0)] -> ImmBorrow
+note: Capturing p[(0, 0)] -> Immutable
   --> $DIR/nested-closure.rs:26:24
    |
 LL |         println!("{}", p.x);
    |                        ^^^
-note: Capturing p[(1, 0)] -> MutBorrow
+note: Capturing p[(1, 0)] -> Mutable
   --> $DIR/nested-closure.rs:34:12
    |
 LL |         || p.y += incr;
    |            ^^^
-note: Capturing p[(1, 0)] -> ImmBorrow
+note: Capturing p[(1, 0)] -> Immutable
   --> $DIR/nested-closure.rs:44:24
    |
 LL |         println!("{}", p.y);
@@ -92,12 +92,12 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[(0, 0)] -> ImmBorrow
+note: Min Capture p[(0, 0)] -> Immutable
   --> $DIR/nested-closure.rs:26:24
    |
 LL |         println!("{}", p.x);
    |                        ^^^
-note: Min Capture p[(1, 0)] -> MutBorrow
+note: Min Capture p[(1, 0)] -> Mutable
   --> $DIR/nested-closure.rs:34:12
    |
 LL |         || p.y += incr;
diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs
index 8df0eeb0eb4..70c20cf5aef 100644
--- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs
+++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs
@@ -23,8 +23,8 @@ fn foo<'a, 'b>(m: &'a MyStruct<'b>) -> impl FnMut() + 'static {
     //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
     //~| ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
-    //~| NOTE: Capturing m[Deref,(0, 0),Deref,(0, 0)] -> ImmBorrow
-    //~| NOTE: Min Capture m[Deref,(0, 0),Deref] -> ImmBorrow
+    //~| NOTE: Capturing m[Deref,(0, 0),Deref,(0, 0)] -> Immutable
+    //~| NOTE: Min Capture m[Deref,(0, 0),Deref] -> Immutable
     c
 }
 
diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr
index 99159ab58a2..86f7a6a6bca 100644
--- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr
+++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr
@@ -14,7 +14,7 @@ error: First Pass analysis includes:
 LL |     let c = #[rustc_capture_analysis] || drop(&m.a.0);
    |                                       ^^^^^^^^^^^^^^^
    |
-note: Capturing m[Deref,(0, 0),Deref,(0, 0)] -> ImmBorrow
+note: Capturing m[Deref,(0, 0),Deref,(0, 0)] -> Immutable
   --> $DIR/edge_case.rs:20:48
    |
 LL |     let c = #[rustc_capture_analysis] || drop(&m.a.0);
@@ -26,7 +26,7 @@ error: Min Capture analysis includes:
 LL |     let c = #[rustc_capture_analysis] || drop(&m.a.0);
    |                                       ^^^^^^^^^^^^^^^
    |
-note: Min Capture m[Deref,(0, 0),Deref] -> ImmBorrow
+note: Min Capture m[Deref,(0, 0),Deref] -> Immutable
   --> $DIR/edge_case.rs:20:48
    |
 LL |     let c = #[rustc_capture_analysis] || drop(&m.a.0);
diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs
index 2d3db4fde72..ed740f3a167 100644
--- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs
+++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs
@@ -28,7 +28,7 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", pent.points[5].x);
-        //~^ NOTE: Capturing pent[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture pent[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing pent[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture pent[(0, 0)] -> Immutable
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr
index 22bd13617c1..e82295f047b 100644
--- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr
+++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr
@@ -20,7 +20,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing pent[(0, 0)] -> ImmBorrow
+note: Capturing pent[(0, 0)] -> Immutable
   --> $DIR/path-with-array-access.rs:30:24
    |
 LL |         println!("{}", pent.points[5].x);
@@ -38,7 +38,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture pent[(0, 0)] -> ImmBorrow
+note: Min Capture pent[(0, 0)] -> Immutable
   --> $DIR/path-with-array-access.rs:30:24
    |
 LL |         println!("{}", pent.points[5].x);
diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs
index c30eaf8fb1b..159be843edb 100644
--- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs
+++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs
@@ -28,17 +28,17 @@ fn test_one() {
         //~^ ERROR: Min Capture analysis includes:
         //~| ERROR
         println!("{:?}", a.0);
-        //~^ NOTE: Min Capture a[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(0, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", a.1);
-        //~^ NOTE: Min Capture a[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(1, 0)] -> Immutable
         //~| NOTE
 
         println!("{:?}", b.0);
-        //~^ NOTE: Min Capture b[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(0, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", b.1);
-        //~^ NOTE: Min Capture b[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(1, 0)] -> Immutable
         //~| NOTE
     };
 }
@@ -55,17 +55,17 @@ fn test_two() {
         //~^ ERROR: Min Capture analysis includes:
         //~| ERROR
         println!("{:?}", a.1);
-        //~^ NOTE: Min Capture a[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(1, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", a.0);
-        //~^ NOTE: Min Capture a[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(0, 0)] -> Immutable
         //~| NOTE
 
         println!("{:?}", b.1);
-        //~^ NOTE: Min Capture b[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(1, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", b.0);
-        //~^ NOTE: Min Capture b[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(0, 0)] -> Immutable
         //~| NOTE
     };
 }
@@ -82,17 +82,17 @@ fn test_three() {
         //~^ ERROR: Min Capture analysis includes:
         //~| ERROR
         println!("{:?}", b.1);
-        //~^ NOTE: Min Capture b[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(1, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", a.1);
-        //~^ NOTE: Min Capture a[(1, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(1, 0)] -> Immutable
         //~| NOTE
         println!("{:?}", a.0);
-        //~^ NOTE: Min Capture a[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture a[(0, 0)] -> Immutable
         //~| NOTE
 
         println!("{:?}", b.0);
-        //~^ NOTE: Min Capture b[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Min Capture b[(0, 0)] -> Immutable
         //~| NOTE
     };
 }
diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr
index 82f770eafed..65a0a317ab6 100644
--- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr
+++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr
@@ -40,22 +40,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing a[(0, 0)] -> ImmBorrow
+note: Capturing a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:30:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Capturing a[(1, 0)] -> ImmBorrow
+note: Capturing a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:33:26
    |
 LL |         println!("{:?}", a.1);
    |                          ^^^
-note: Capturing b[(0, 0)] -> ImmBorrow
+note: Capturing b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:37:26
    |
 LL |         println!("{:?}", b.0);
    |                          ^^^
-note: Capturing b[(1, 0)] -> ImmBorrow
+note: Capturing b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:40:26
    |
 LL |         println!("{:?}", b.1);
@@ -73,22 +73,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture a[(0, 0)] -> ImmBorrow
+note: Min Capture a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:30:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Min Capture a[(1, 0)] -> ImmBorrow
+note: Min Capture a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:33:26
    |
 LL |         println!("{:?}", a.1);
    |                          ^^^
-note: Min Capture b[(0, 0)] -> ImmBorrow
+note: Min Capture b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:37:26
    |
 LL |         println!("{:?}", b.0);
    |                          ^^^
-note: Min Capture b[(1, 0)] -> ImmBorrow
+note: Min Capture b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:40:26
    |
 LL |         println!("{:?}", b.1);
@@ -106,22 +106,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing a[(1, 0)] -> ImmBorrow
+note: Capturing a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:57:26
    |
 LL |         println!("{:?}", a.1);
    |                          ^^^
-note: Capturing a[(0, 0)] -> ImmBorrow
+note: Capturing a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:60:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Capturing b[(1, 0)] -> ImmBorrow
+note: Capturing b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:64:26
    |
 LL |         println!("{:?}", b.1);
    |                          ^^^
-note: Capturing b[(0, 0)] -> ImmBorrow
+note: Capturing b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:67:26
    |
 LL |         println!("{:?}", b.0);
@@ -139,22 +139,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture a[(0, 0)] -> ImmBorrow
+note: Min Capture a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:60:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Min Capture a[(1, 0)] -> ImmBorrow
+note: Min Capture a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:57:26
    |
 LL |         println!("{:?}", a.1);
    |                          ^^^
-note: Min Capture b[(0, 0)] -> ImmBorrow
+note: Min Capture b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:67:26
    |
 LL |         println!("{:?}", b.0);
    |                          ^^^
-note: Min Capture b[(1, 0)] -> ImmBorrow
+note: Min Capture b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:64:26
    |
 LL |         println!("{:?}", b.1);
@@ -172,22 +172,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing b[(1, 0)] -> ImmBorrow
+note: Capturing b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:84:26
    |
 LL |         println!("{:?}", b.1);
    |                          ^^^
-note: Capturing a[(1, 0)] -> ImmBorrow
+note: Capturing a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:87:26
    |
 LL |         println!("{:?}", a.1);
    |                          ^^^
-note: Capturing a[(0, 0)] -> ImmBorrow
+note: Capturing a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:90:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Capturing b[(0, 0)] -> ImmBorrow
+note: Capturing b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:94:26
    |
 LL |         println!("{:?}", b.0);
@@ -205,22 +205,22 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture b[(0, 0)] -> ImmBorrow
+note: Min Capture b[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:94:26
    |
 LL |         println!("{:?}", b.0);
    |                          ^^^
-note: Min Capture b[(1, 0)] -> ImmBorrow
+note: Min Capture b[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:84:26
    |
 LL |         println!("{:?}", b.1);
    |                          ^^^
-note: Min Capture a[(0, 0)] -> ImmBorrow
+note: Min Capture a[(0, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:90:26
    |
 LL |         println!("{:?}", a.0);
    |                          ^^^
-note: Min Capture a[(1, 0)] -> ImmBorrow
+note: Min Capture a[(1, 0)] -> Immutable
   --> $DIR/preserve_field_drop_order.rs:87:26
    |
 LL |         println!("{:?}", a.1);
diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/repr_packed.rs
index 0dde2b12b87..2525af37eaa 100644
--- a/tests/ui/closures/2229_closure_analysis/repr_packed.rs
+++ b/tests/ui/closures/2229_closure_analysis/repr_packed.rs
@@ -19,10 +19,10 @@ fn test_alignment_not_affected() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let z1: &u8 = &foo.x;
-        //~^ NOTE: Capturing foo[] -> ImmBorrow
+        //~^ NOTE: Capturing foo[] -> Immutable
         let z2: &mut u8 = &mut foo.y;
-        //~^ NOTE: Capturing foo[] -> MutBorrow
-        //~| NOTE: Min Capture foo[] -> MutBorrow
+        //~^ NOTE: Capturing foo[] -> Mutable
+        //~| NOTE: Min Capture foo[] -> Mutable
 
         *z2 = 42;
 
@@ -50,10 +50,10 @@ fn test_alignment_affected() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let z1: &String = &foo.x;
-        //~^ NOTE: Capturing foo[] -> ImmBorrow
+        //~^ NOTE: Capturing foo[] -> Immutable
         let z2: &mut u16 = &mut foo.y;
-        //~^ NOTE: Capturing foo[] -> MutBorrow
-        //~| NOTE: Min Capture foo[] -> MutBorrow
+        //~^ NOTE: Capturing foo[] -> Mutable
+        //~| NOTE: Min Capture foo[] -> Mutable
 
 
         *z2 = 42;
@@ -86,7 +86,7 @@ fn test_truncation_when_ref_and_move() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{}", foo.x);
-        //~^ NOTE: Capturing foo[] -> ImmBorrow
+        //~^ NOTE: Capturing foo[] -> Immutable
         //~| NOTE: Min Capture foo[] -> ByValue
         //~| NOTE: foo[] used here
         let _z = foo.x;
diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr
index 3bac41d60d5..d4b2f8bfeae 100644
--- a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr
+++ b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr
@@ -40,12 +40,12 @@ LL | |         println!("({}, {})", z1, z2);
 LL | |     };
    | |_____^
    |
-note: Capturing foo[] -> ImmBorrow
+note: Capturing foo[] -> Immutable
   --> $DIR/repr_packed.rs:21:24
    |
 LL |         let z1: &u8 = &foo.x;
    |                        ^^^^^
-note: Capturing foo[] -> MutBorrow
+note: Capturing foo[] -> Mutable
   --> $DIR/repr_packed.rs:23:32
    |
 LL |         let z2: &mut u8 = &mut foo.y;
@@ -63,7 +63,7 @@ LL | |         println!("({}, {})", z1, z2);
 LL | |     };
    | |_____^
    |
-note: Min Capture foo[] -> MutBorrow
+note: Min Capture foo[] -> Mutable
   --> $DIR/repr_packed.rs:23:32
    |
 LL |         let z2: &mut u8 = &mut foo.y;
@@ -81,12 +81,12 @@ LL | |         println!("({}, {})", z1, z2);
 LL | |     };
    | |_____^
    |
-note: Capturing foo[] -> ImmBorrow
+note: Capturing foo[] -> Immutable
   --> $DIR/repr_packed.rs:52:28
    |
 LL |         let z1: &String = &foo.x;
    |                            ^^^^^
-note: Capturing foo[] -> MutBorrow
+note: Capturing foo[] -> Mutable
   --> $DIR/repr_packed.rs:54:33
    |
 LL |         let z2: &mut u16 = &mut foo.y;
@@ -104,7 +104,7 @@ LL | |         println!("({}, {})", z1, z2);
 LL | |     };
    | |_____^
    |
-note: Min Capture foo[] -> MutBorrow
+note: Min Capture foo[] -> Mutable
   --> $DIR/repr_packed.rs:54:33
    |
 LL |         let z2: &mut u16 = &mut foo.y;
@@ -122,7 +122,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing foo[] -> ImmBorrow
+note: Capturing foo[] -> Immutable
   --> $DIR/repr_packed.rs:88:24
    |
 LL |         println!("{}", foo.x);
diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs
index 4b749a70577..38aa76999fb 100644
--- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs
+++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs
@@ -16,7 +16,7 @@ fn main() {
     //
     // Requirements:
     // p.x -> MutBoorrow
-    // p   -> ImmBorrow
+    // p   -> Immutable
     //
     // Requirements met when p is captured via MutBorrow
     //
@@ -28,11 +28,11 @@ fn main() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         p.x += 10;
-        //~^ NOTE: Capturing p[(0, 0)] -> MutBorrow
-        //~| NOTE: p[] captured as MutBorrow here
+        //~^ NOTE: Capturing p[(0, 0)] -> Mutable
+        //~| NOTE: p[] captured as Mutable here
         println!("{:?}", p);
-        //~^ NOTE: Capturing p[] -> ImmBorrow
-        //~| NOTE: Min Capture p[] -> MutBorrow
+        //~^ NOTE: Capturing p[] -> Immutable
+        //~| NOTE: Min Capture p[] -> Mutable
         //~| NOTE: p[] used here
     };
 
diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr
index 247dcbe94bc..a88bd01093a 100644
--- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr
+++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr
@@ -20,12 +20,12 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0)] -> MutBorrow
+note: Capturing p[(0, 0)] -> Mutable
   --> $DIR/simple-struct-min-capture.rs:30:9
    |
 LL |         p.x += 10;
    |         ^^^
-note: Capturing p[] -> ImmBorrow
+note: Capturing p[] -> Immutable
   --> $DIR/simple-struct-min-capture.rs:33:26
    |
 LL |         println!("{:?}", p);
@@ -43,11 +43,11 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[] -> MutBorrow
+note: Min Capture p[] -> Mutable
   --> $DIR/simple-struct-min-capture.rs:30:9
    |
 LL |         p.x += 10;
-   |         ^^^ p[] captured as MutBorrow here
+   |         ^^^ p[] captured as Mutable here
 ...
 LL |         println!("{:?}", p);
    |                          ^ p[] used here
diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs
index 33d43c5f526..667f244f612 100644
--- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs
+++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs
@@ -30,8 +30,8 @@ fn unsafe_imm() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         println!("{:?}", (*t.0).s);
-        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture t[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> Immutable
+        //~| NOTE: Min Capture t[(0, 0)] -> Immutable
     };
 
     c();
@@ -51,8 +51,8 @@ fn unsafe_mut() {
     //~^ ERROR: First Pass analysis includes:
     //~| ERROR: Min Capture analysis includes:
         let x = unsafe { &mut (*p).s };
-        //~^ NOTE: Capturing p[Deref,(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture p[] -> ImmBorrow
+        //~^ NOTE: Capturing p[Deref,(0, 0)] -> Immutable
+        //~| NOTE: Min Capture p[] -> Immutable
         *x = "s".into();
     };
     c();
diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr
index 4f3de075054..54463c5277d 100644
--- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr
+++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr
@@ -30,7 +30,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
+note: Capturing t[(0, 0),Deref,(0, 0)] -> Immutable
   --> $DIR/unsafe_ptr.rs:32:26
    |
 LL |         println!("{:?}", (*t.0).s);
@@ -48,7 +48,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture t[(0, 0)] -> ImmBorrow
+note: Min Capture t[(0, 0)] -> Immutable
   --> $DIR/unsafe_ptr.rs:32:26
    |
 LL |         println!("{:?}", (*t.0).s);
@@ -66,7 +66,7 @@ LL | |         *x = "s".into();
 LL | |     };
    | |_____^
    |
-note: Capturing p[Deref,(0, 0)] -> ImmBorrow
+note: Capturing p[Deref,(0, 0)] -> Immutable
   --> $DIR/unsafe_ptr.rs:53:31
    |
 LL |         let x = unsafe { &mut (*p).s };
@@ -84,7 +84,7 @@ LL | |         *x = "s".into();
 LL | |     };
    | |_____^
    |
-note: Min Capture p[] -> ImmBorrow
+note: Min Capture p[] -> Immutable
   --> $DIR/unsafe_ptr.rs:53:31
    |
 LL |         let x = unsafe { &mut (*p).s };
diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs
index 9adf20c21d5..d220cfce9ce 100644
--- a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs
+++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs
@@ -28,8 +28,8 @@ fn wild_struct() {
     //~| ERROR: Min Capture analysis includes:
         // FIXME(arora-aman): Change `_x` to `_`
         let Point { x: _x, y: _ } = p;
-        //~^ NOTE: Capturing p[(0, 0)] -> ImmBorrow
-        //~| NOTE: Min Capture p[(0, 0)] -> ImmBorrow
+        //~^ NOTE: Capturing p[(0, 0)] -> Immutable
+        //~| NOTE: Min Capture p[(0, 0)] -> Immutable
     };
 
     c();
diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr
index 88b48aaaf8c..4d6d85649da 100644
--- a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr
+++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr
@@ -40,7 +40,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Capturing p[(0, 0)] -> ImmBorrow
+note: Capturing p[(0, 0)] -> Immutable
   --> $DIR/wild_patterns.rs:30:37
    |
 LL |         let Point { x: _x, y: _ } = p;
@@ -58,7 +58,7 @@ LL | |
 LL | |     };
    | |_____^
    |
-note: Min Capture p[(0, 0)] -> ImmBorrow
+note: Min Capture p[(0, 0)] -> Immutable
   --> $DIR/wild_patterns.rs:30:37
    |
 LL |         let Point { x: _x, y: _ } = p;
diff --git a/tests/ui/auxiliary/using-target-feature-unstable.rs b/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs
index 2682028936c..2682028936c 100644
--- a/tests/ui/auxiliary/using-target-feature-unstable.rs
+++ b/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs
diff --git a/tests/ui/target-feature/forbidden-target-feature-attribute.rs b/tests/ui/target-feature/forbidden-target-feature-attribute.rs
new file mode 100644
index 00000000000..91c56b43689
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-attribute.rs
@@ -0,0 +1,12 @@
+//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
+//@ needs-llvm-components: x86
+#![feature(no_core, lang_items)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+pub trait Sized {}
+
+#[target_feature(enable = "soft-float")]
+//~^ERROR: cannot be toggled with
+pub unsafe fn my_fun() {}
diff --git a/tests/ui/target-feature/forbidden-target-feature-attribute.stderr b/tests/ui/target-feature/forbidden-target-feature-attribute.stderr
new file mode 100644
index 00000000000..fb318531f7e
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-attribute.stderr
@@ -0,0 +1,8 @@
+error: target feature `soft-float` cannot be toggled with `#[target_feature]`: unsound because it changes float ABI
+  --> $DIR/forbidden-target-feature-attribute.rs:10:18
+   |
+LL | #[target_feature(enable = "soft-float")]
+   |                  ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/forbidden-target-feature-cfg.rs b/tests/ui/target-feature/forbidden-target-feature-cfg.rs
new file mode 100644
index 00000000000..5df26e26793
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-cfg.rs
@@ -0,0 +1,15 @@
+//@ compile-flags: --target=x86_64-unknown-none --crate-type=lib
+//@ needs-llvm-components: x86
+//@ check-pass
+#![feature(no_core, lang_items)]
+#![no_std]
+#![no_core]
+#![allow(unexpected_cfgs)]
+
+#[lang = "sized"]
+pub trait Sized {}
+
+// The compile_error macro does not exist, so if the `cfg` evaluates to `true` this
+// complains about the missing macro rather than showing the error... but that's good enough.
+#[cfg(target_feature = "soft-float")]
+compile_error!("the soft-float feature should not be exposed in `cfg`");
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
new file mode 100644
index 00000000000..b27e8a10afe
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
@@ -0,0 +1,11 @@
+//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
+//@ needs-llvm-components: x86
+//@ compile-flags: -Ctarget-feature=-soft-float
+// For now this is just a warning.
+//@ build-pass
+#![feature(no_core, lang_items)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+pub trait Sized {}
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag-disable.stderr b/tests/ui/target-feature/forbidden-target-feature-flag-disable.stderr
new file mode 100644
index 00000000000..508e1fe0cf4
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-flag-disable.stderr
@@ -0,0 +1,7 @@
+warning: target feature `soft-float` cannot be toggled with `-Ctarget-feature`: unsound because it changes float ABI
+   |
+   = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag.rs b/tests/ui/target-feature/forbidden-target-feature-flag.rs
new file mode 100644
index 00000000000..93cebc6b536
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-flag.rs
@@ -0,0 +1,11 @@
+//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
+//@ needs-llvm-components: x86
+//@ compile-flags: -Ctarget-feature=+soft-float
+// For now this is just a warning.
+//@ build-pass
+#![feature(no_core, lang_items)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+pub trait Sized {}
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag.stderr b/tests/ui/target-feature/forbidden-target-feature-flag.stderr
new file mode 100644
index 00000000000..508e1fe0cf4
--- /dev/null
+++ b/tests/ui/target-feature/forbidden-target-feature-flag.stderr
@@ -0,0 +1,7 @@
+warning: target feature `soft-float` cannot be toggled with `-Ctarget-feature`: unsound because it changes float ABI
+   |
+   = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/using-target-feature-unstable.rs b/tests/ui/target-feature/using-target-feature-unstable.rs
index 5ec0bda5eef..5ec0bda5eef 100644
--- a/tests/ui/using-target-feature-unstable.rs
+++ b/tests/ui/target-feature/using-target-feature-unstable.rs