about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-06 08:08:13 +0000
committerbors <bors@rust-lang.org>2025-01-06 08:08:13 +0000
commit13738b0abeeb6b7b8b52cc16aa8ece267b58f017 (patch)
tree53e50e58da5541cafb86c8544a98e934eb36deaa /tests
parentfd98df8f1423e5f9d12fae44ec2a6ae062783a7b (diff)
parentc5c05c2528944e64bea76cb9e07e2aeb4be3cb15 (diff)
downloadrust-13738b0abeeb6b7b8b52cc16aa8ece267b58f017.tar.gz
rust-13738b0abeeb6b7b8b52cc16aa8ece267b58f017.zip
Auto merge of #135151 - matthiaskrgr:rollup-2vy1hwl, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #135111 (Add doc aliases for `libm` and IEEE names)
 - #135129 (triagebot: label `src/doc/rustc-dev-guide` changes with `A-rustc-dev-guide`)
 - #135132 (dev guide ping group and set adhoc reviewers to compiler)
 - #135145 (Mention `unnameable_types` in `unreachable_pub` documentation.)
 - #135147 (A few borrowck tweaks to improve 2024 edition migration lints)
 - #135150 (move footnote to ordinary comment)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/lifetimes/tail-expr-in-nested-expr.stderr3
-rw-r--r--tests/ui/lint/lint-const-item-mutation.stderr7
-rw-r--r--tests/ui/moves/move-deref-coercion.stderr4
-rw-r--r--tests/ui/no-capture-arc.stderr4
-rw-r--r--tests/ui/no-reuse-move-arc.stderr4
5 files changed, 13 insertions, 9 deletions
diff --git a/tests/ui/lifetimes/tail-expr-in-nested-expr.stderr b/tests/ui/lifetimes/tail-expr-in-nested-expr.stderr
index 6770da091ce..09801a1aad2 100644
--- a/tests/ui/lifetimes/tail-expr-in-nested-expr.stderr
+++ b/tests/ui/lifetimes/tail-expr-in-nested-expr.stderr
@@ -2,11 +2,10 @@ error[E0716]: temporary value dropped while borrowed
   --> $DIR/tail-expr-in-nested-expr.rs:4:15
    |
 LL |     let _ = { String::new().as_str() }.len();
-   |               ^^^^^^^^^^^^^---------
+   |               ^^^^^^^^^^^^^        -   --- borrow later used by call
    |               |                    |
    |               |                    temporary value is freed at the end of this statement
    |               creates a temporary value which is freed while still in use
-   |               borrow later used here
    |
    = note: consider using a `let` binding to create a longer lived value
 
diff --git a/tests/ui/lint/lint-const-item-mutation.stderr b/tests/ui/lint/lint-const-item-mutation.stderr
index 747c38b8007..0e405c306fe 100644
--- a/tests/ui/lint/lint-const-item-mutation.stderr
+++ b/tests/ui/lint/lint-const-item-mutation.stderr
@@ -75,10 +75,15 @@ warning: taking a mutable reference to a `const` item
   --> $DIR/lint-const-item-mutation.rs:42:5
    |
 LL |     (&mut MY_STRUCT).use_mut();
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: each usage of a `const` item creates a new temporary
    = note: the mutable reference will refer to this temporary, not the original `const` item
+note: mutable reference created due to call to this method
+  --> $DIR/lint-const-item-mutation.rs:9:5
+   |
+LL |     fn use_mut(&mut self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^
 note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
diff --git a/tests/ui/moves/move-deref-coercion.stderr b/tests/ui/moves/move-deref-coercion.stderr
index 5760f4a7fdc..25639075a3f 100644
--- a/tests/ui/moves/move-deref-coercion.stderr
+++ b/tests/ui/moves/move-deref-coercion.stderr
@@ -4,7 +4,7 @@ error[E0382]: borrow of partially moved value: `val`
 LL |     let _val = val.first;
    |                --------- value partially moved here
 LL |     val.inner;
-   |     ^^^^^^^^^ value borrowed here after partial move
+   |     ^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `val.first` has type `NotCopy`, which does not implement the `Copy` trait
    = note: borrow occurs due to deref coercion to `NotCopy`
@@ -20,7 +20,7 @@ error[E0382]: borrow of partially moved value: `val`
 LL |     let _val = val.first;
    |                --------- value partially moved here
 LL |     val.inner_method();
-   |     ^^^^^^^^^^^^^^^^^^ value borrowed here after partial move
+   |     ^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `val.first` has type `NotCopy`, which does not implement the `Copy` trait
    = note: borrow occurs due to deref coercion to `NotCopy`
diff --git a/tests/ui/no-capture-arc.stderr b/tests/ui/no-capture-arc.stderr
index 38432c851c5..4a51ddb67a3 100644
--- a/tests/ui/no-capture-arc.stderr
+++ b/tests/ui/no-capture-arc.stderr
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `arc_v`
-  --> $DIR/no-capture-arc.rs:14:16
+  --> $DIR/no-capture-arc.rs:14:18
    |
 LL |     let arc_v = Arc::new(v);
    |         ----- move occurs because `arc_v` has type `Arc<Vec<i32>>`, which does not implement the `Copy` trait
@@ -10,7 +10,7 @@ LL |         assert_eq!((*arc_v)[3], 4);
    |                      ----- variable moved due to use in closure
 ...
 LL |     assert_eq!((*arc_v)[2], 3);
-   |                ^^^^^^^^ value borrowed here after move
+   |                  ^^^^^ value borrowed here after move
    |
    = note: borrow occurs due to deref coercion to `Vec<i32>`
 
diff --git a/tests/ui/no-reuse-move-arc.stderr b/tests/ui/no-reuse-move-arc.stderr
index cdeb6eadc17..61f4837dc0e 100644
--- a/tests/ui/no-reuse-move-arc.stderr
+++ b/tests/ui/no-reuse-move-arc.stderr
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `arc_v`
-  --> $DIR/no-reuse-move-arc.rs:12:16
+  --> $DIR/no-reuse-move-arc.rs:12:18
    |
 LL |     let arc_v = Arc::new(v);
    |         ----- move occurs because `arc_v` has type `Arc<Vec<i32>>`, which does not implement the `Copy` trait
@@ -10,7 +10,7 @@ LL |         assert_eq!((*arc_v)[3], 4);
    |                      ----- variable moved due to use in closure
 ...
 LL |     assert_eq!((*arc_v)[2], 3);
-   |                ^^^^^^^^ value borrowed here after move
+   |                  ^^^^^ value borrowed here after move
    |
    = note: borrow occurs due to deref coercion to `Vec<i32>`