-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemP-mediumMedium priorityMedium priorityT-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.T-langRelevant to the language teamRelevant to the language team
Description
rustc 1.0.0-nightly (2b01a37 2015-02-21) (built 2015-02-22)
I create file with content:
use std::hash::SipHasher;
use std::hash::Hasher;
fn main() {
}
fn compile_fail() {
let hasher = SipHasher::new();
hasher.write(&[0, 1, 2]);
}
fn compile_work() {
let sip_hasher = SipHasher::new();
let hasher: &mut Hasher = &mut sip_hasher;
hasher.write(&[0, 1, 2]);
}
And have compilation errors:
private.rs:9:2: 9:26 error: method `write` is private
private.rs:9 hasher.write(&[0, 1, 2]);
^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
I do not understand what is happening due to this error, because this cast is essentially doing nothing.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemP-mediumMedium priorityMedium priorityT-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.T-langRelevant to the language teamRelevant to the language team