Fix ui test.
This test checks if the compiler complains about accesing a private field before complaining (or crashing) about the private function on it not marked as stable/unstable. The interface of the internal type (sys_common's Mutex) used for this was changed. With this change, it uses another function to test for the same issue.
This commit is contained in:
parent
6f6336b4a1
commit
825dda8060
2 changed files with 4 additions and 12 deletions
|
@ -7,7 +7,6 @@ struct Test {
|
|||
fn main() {}
|
||||
|
||||
fn testing(test: Test) {
|
||||
let _ = test.comps.inner.lock().unwrap();
|
||||
let _ = test.comps.inner.try_lock();
|
||||
//~^ ERROR: field `inner` of struct `Mutex` is private
|
||||
//~| ERROR: no method named `unwrap` found
|
||||
}
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
error[E0616]: field `inner` of struct `Mutex` is private
|
||||
--> $DIR/issue-54062.rs:10:24
|
||||
|
|
||||
LL | let _ = test.comps.inner.lock().unwrap();
|
||||
LL | let _ = test.comps.inner.try_lock();
|
||||
| ^^^^^ private field
|
||||
|
||||
error[E0599]: no method named `unwrap` found for struct `std::sys_common::mutex::MutexGuard<'_>` in the current scope
|
||||
--> $DIR/issue-54062.rs:10:37
|
||||
|
|
||||
LL | let _ = test.comps.inner.lock().unwrap();
|
||||
| ^^^^^^ method not found in `std::sys_common::mutex::MutexGuard<'_>`
|
||||
error: aborting due to previous error
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0599, E0616.
|
||||
For more information about an error, try `rustc --explain E0599`.
|
||||
For more information about this error, try `rustc --explain E0616`.
|
||||
|
|
Loading…
Add table
Reference in a new issue