-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 2 previous errors | ||
error: aborting due to previous error | ||
|
||
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`. |