X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_span%2Fsrc%2Fsymbol.rs;h=3f5d8273b38b8829bf5b216fc9ad2f1943465f88;hb=e91405b9d5c8dabb3e488bafb314147f1050f9b9;hp=114750d9b7b3aa4ad0a8d9ce55fec0500acfb1ae;hpb=f739552870cdb23d433478739b371f22b155af8a;p=rust.git diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 114750d9b7b..3f5d8273b38 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -410,6 +410,7 @@ const_fn_transmute, const_fn_union, const_fn_unsize, + const_for, const_format_args, const_generic_defaults, const_generics, @@ -432,6 +433,7 @@ const_trait_bound_opt_out, const_trait_impl, const_transmute, + const_try, constant, constructor, contents, @@ -552,6 +554,7 @@ expected, expf32, expf64, + explicit_generic_args_with_impl_trait, export_name, expr, extended_key_value_attributes, @@ -1268,6 +1271,7 @@ trace_macros, track_caller, trait_alias, + trait_upcasting, transmute, transparent, transparent_enums, @@ -1596,6 +1600,10 @@ pub fn as_u32(self) -> u32 { self.0.as_u32() } + pub fn len(self) -> usize { + with_interner(|interner| interner.get(self).len()) + } + pub fn is_empty(self) -> bool { self == kw::Empty }