Lines Matching refs:name
212 .arg("--crate-name")
246 pub fn probe_sysroot_crate(&self, name: &str) -> bool {
247 self.probe(format!("extern crate {} as probe;", name)) // `as _` wasn't stabilized until Rust 1.33
252 pub fn emit_sysroot_crate(&self, name: &str) {
253 if self.probe_sysroot_crate(name) {
254 emit(&format!("has_{}", mangle(name)));
293 pub fn probe_trait(&self, name: &str) -> bool {
294 self.probe(format!("pub trait Probe: {} + Sized {{}}", name))
300 /// Any non-identifier characters in the trait `name` will be replaced with
302 pub fn emit_has_trait(&self, name: &str) {
303 if self.probe_trait(name) {
304 emit(&format!("has_{}", mangle(name)));
309 pub fn emit_trait_cfg(&self, name: &str, cfg: &str) {
310 if self.probe_trait(name) {
322 pub fn probe_type(&self, name: &str) -> bool {
323 self.probe(format!("pub type Probe = {};", name))
329 /// Any non-identifier characters in the type `name` will be replaced with
331 pub fn emit_has_type(&self, name: &str) {
332 if self.probe_type(name) {
333 emit(&format!("has_{}", mangle(name)));
338 pub fn emit_type_cfg(&self, name: &str, cfg: &str) {
339 if self.probe_type(name) {