]> git.lizzy.rs Git - rust.git/blob - src/librustc_codegen_ssa/traits/statics.rs
Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril
[rust.git] / src / librustc_codegen_ssa / traits / statics.rs
1 use super::BackendTypes;
2 use syntax_pos::symbol::LocalInternedString;
3 use rustc::hir::def_id::DefId;
4 use rustc::ty::layout::Align;
5
6 pub trait StaticMethods: BackendTypes {
7     fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
8     fn codegen_static(&self, def_id: DefId, is_mutable: bool);
9 }
10
11 pub trait StaticBuilderMethods<'tcx>: BackendTypes {
12     fn get_static(&mut self, def_id: DefId) -> Self::Value;
13     fn static_panic_msg(
14         &mut self,
15         msg: Option<LocalInternedString>,
16         filename: LocalInternedString,
17         line: Self::Value,
18         col: Self::Value,
19         kind: &str,
20     ) -> Self::Value;
21 }