size_estimate: Option<usize>,
}
-#[derive(Copy, Clone, PartialEq, Debug, RustcEncodable, RustcDecodable)]
+#[derive(Copy, Clone, PartialEq, Debug, RustcEncodable, RustcDecodable, HashStable)]
pub enum Linkage {
External,
AvailableExternally,
Common,
}
-impl_stable_hash_for!(enum self::Linkage {
- External,
- AvailableExternally,
- LinkOnceAny,
- LinkOnceODR,
- WeakAny,
- WeakODR,
- Appending,
- Internal,
- Private,
- ExternalWeak,
- Common
-});
-
-#[derive(Copy, Clone, PartialEq, Debug)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable)]
pub enum Visibility {
Default,
Hidden,
Protected,
}
-impl_stable_hash_for!(enum self::Visibility {
- Default,
- Hidden,
- Protected
-});
-
impl<'tcx> CodegenUnit<'tcx> {
pub fn new(name: Symbol) -> CodegenUnit<'tcx> {
CodegenUnit {
if self.tcx.sess.opts.debugging_opts.human_readable_cgu_names {
cgu_name
} else {
- let cgu_name = &cgu_name.as_str()[..];
+ let cgu_name = &cgu_name.as_str();
Symbol::intern(&CodegenUnit::mangle_name(cgu_name))
}
}