Skip to content

Commit b4efb1c

Browse files
Update UI tests
Blesses the ui tests that now have a name conflicts (because these types no longer have unique names). The full path distinguishes the different types. Co-authored-by: Trevor Gross <[email protected]>
1 parent 7b0a316 commit b4efb1c

17 files changed

+32
-32
lines changed

tests/ui/async-await/issue-64130-non-send-future-diags.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ error: future cannot be sent between threads safely
44
LL | is_send(foo());
55
| ^^^^^ future returned by `foo` is not `Send`
66
|
7-
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
7+
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, u32>`
88
note: future is not `Send` as this value is used across an await
99
--> $DIR/issue-64130-non-send-future-diags.rs:17:11
1010
|
1111
LL | let g = x.lock().unwrap();
12-
| - has type `MutexGuard<'_, u32>` which is not `Send`
12+
| - has type `std::sync::MutexGuard<'_, u32>` which is not `Send`
1313
LL | baz().await;
1414
| ^^^^^ await occurs here, with `g` maybe used later
1515
note: required by a bound in `is_send`

tests/ui/async-await/issue-71137.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ error: future cannot be sent between threads safely
44
LL | fake_spawn(wrong_mutex());
55
| ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
66
|
7-
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
7+
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, i32>`
88
note: future is not `Send` as this value is used across an await
99
--> $DIR/issue-71137.rs:14:26
1010
|
1111
LL | let mut guard = m.lock().unwrap();
12-
| --------- has type `MutexGuard<'_, i32>` which is not `Send`
12+
| --------- has type `std::sync::MutexGuard<'_, i32>` which is not `Send`
1313
LL | (async { "right"; }).await;
1414
| ^^^^^ await occurs here, with `mut guard` maybe used later
1515
note: required by a bound in `fake_spawn`

tests/ui/async-await/issues/issue-67893.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn g(_: impl Send) {}
77

88
fn main() {
99
g(issue_67893::run())
10-
//~^ ERROR `MutexGuard<'_, ()>` cannot be sent between threads safely
10+
//~^ ERROR `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely
1111
}

tests/ui/async-await/issues/issue-67893.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely
1+
error[E0277]: `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely
22
--> $DIR/issue-67893.rs:9:7
33
|
44
LL | g(issue_67893::run())
5-
| - ^^^^^^^^^^^^^^^^^^ `MutexGuard<'_, ()>` cannot be sent between threads safely
5+
| - ^^^^^^^^^^^^^^^^^^ `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely
66
| |
77
| required by a bound introduced by this call
88
|
@@ -11,7 +11,7 @@ LL | g(issue_67893::run())
1111
LL | pub async fn run() {
1212
| ------------------ within this `impl Future<Output = ()>`
1313
|
14-
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
14+
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, ()>`
1515
note: required because it's used within this `async` fn body
1616
--> $DIR/auxiliary/issue_67893.rs:9:20
1717
|

tests/ui/lint/must_not_suspend/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
async fn other() {}
66

77
pub async fn uhoh(m: std::sync::Mutex<()>) {
8-
let _guard = m.lock().unwrap(); //~ ERROR `MutexGuard` held across
8+
let _guard = m.lock().unwrap(); //~ ERROR `std::sync::MutexGuard` held across
99
other().await;
1010
}
1111

tests/ui/lint/must_not_suspend/mutex.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `MutexGuard` held across a suspend point, but should not be
1+
error: `std::sync::MutexGuard` held across a suspend point, but should not be
22
--> $DIR/mutex.rs:8:9
33
|
44
LL | let _guard = m.lock().unwrap();

tests/ui/privacy/private-field-access-in-mutex-54062.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {}
88

99
fn testing(test: Test) {
1010
let _ = test.comps.inner.try_lock();
11-
//~^ ERROR: field `inner` of struct `Mutex` is private
11+
//~^ ERROR: field `inner` of struct `std::sync::Mutex` is private
1212
}
1313

1414
// https://github.com/rust-lang/rust/issues/54062

tests/ui/privacy/private-field-access-in-mutex-54062.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0616]: field `inner` of struct `Mutex` is private
1+
error[E0616]: field `inner` of struct `std::sync::Mutex` is private
22
--> $DIR/private-field-access-in-mutex-54062.rs:10:24
33
|
44
LL | let _ = test.comps.inner.try_lock();

tests/ui/suggestions/inner_type.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
let another_item = std::sync::Mutex::new(Struct { p: 42_u32 });
2626

2727
another_item.lock().unwrap().method();
28-
//~^ ERROR no method named `method` found for struct `Mutex` in the current scope [E0599]
28+
//~^ ERROR no method named `method` found for struct `std::sync::Mutex` in the current scope [E0599]
2929
//~| HELP use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
3030

3131
let another_item = std::sync::RwLock::new(Struct { p: 42_u32 });

tests/ui/suggestions/inner_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
let another_item = std::sync::Mutex::new(Struct { p: 42_u32 });
2626

2727
another_item.method();
28-
//~^ ERROR no method named `method` found for struct `Mutex` in the current scope [E0599]
28+
//~^ ERROR no method named `method` found for struct `std::sync::Mutex` in the current scope [E0599]
2929
//~| HELP use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
3030

3131
let another_item = std::sync::RwLock::new(Struct { p: 42_u32 });

0 commit comments

Comments
 (0)