-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I've encountered a panic after refactoring my program and trying to compile in an incomplete state.
This is the error I've got:
Compiling playground v0.0.1 (file:///playground)
error[E0616]: field `inner` of struct `std::sync::Mutex` is private
--> src/main.rs:10:13
|
10 | let _ = test.comps.inner.lock().unwrap();
| ^^^^^^^^^^^^^^^^
error: internal compiler error: librustc/middle/stability.rs:708: encountered unmarked API: DefId(1/0:4014 ~ std[8250]::sys_common[0]::mutex[0]::{{impl}}[1]::lock[0])
--> src/main.rs:10:30
|
10 | let _ = test.comps.inner.lock().unwrap();
| ^^^^
thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:499:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0616`.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.28.0 (9634041f0 2018-07-30) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
This is the minimal code example for reproduction:
use std::sync::Mutex;
struct Test {
comps: Mutex<String>,
}
fn main() {}
fn testing(test: Test) {
let _ = test.comps.inner.lock().unwrap();
}
I've looked at a few other issues and haven't found anything similar, so hopefully this is not a duplicate.
Metadata
Metadata
Assignees
Labels
A-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.