diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-24 16:07:35 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-24 16:07:35 +0100 |
commit | 277488b51e22c790b51d5f739ecb33cdd20e903f (patch) | |
tree | c0bc04398f8bd4a008de967af6d70d10817e324d /crates/hir_expand/src | |
parent | 65592b41be280e0e2ca81c1e127f8cb13fb47ce9 (diff) | |
parent | 875ad9b5c410200f5072515ae91b4ff51cff0448 (diff) |
Merge #6062
6062: Bump smol_str from 0.1.16 to 0.1.17 r=matklad a=woshilapin
When I built `rust-analyzer` today, I noticed the following warnings.
```
warning: use of deprecated item 'syntax::SmolStr::new_inline_from_ascii': Use `new_inline` instead
--> crates/mbe/src/syntax_bridge.rs:639:30
|
639 | ... (SmolStr::new_inline_from_ascii(1, &[punct.char as u8]), punct.id)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: 1 warning emitted
```
So I thought it would be a nice small PR.
Co-authored-by: Jean SIMARD <[email protected]>
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/name.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs index 49841c7a1..a5750d829 100644 --- a/crates/hir_expand/src/name.rs +++ b/crates/hir_expand/src/name.rs | |||
@@ -43,8 +43,8 @@ impl Name { | |||
43 | } | 43 | } |
44 | 44 | ||
45 | /// Shortcut to create inline plain text name | 45 | /// Shortcut to create inline plain text name |
46 | const fn new_inline_ascii(text: &[u8]) -> Name { | 46 | const fn new_inline(text: &str) -> Name { |
47 | Name::new_text(SmolStr::new_inline_from_ascii(text.len(), text)) | 47 | Name::new_text(SmolStr::new_inline(text)) |
48 | } | 48 | } |
49 | 49 | ||
50 | /// Resolve a name from the text of token. | 50 | /// Resolve a name from the text of token. |
@@ -127,7 +127,7 @@ pub mod known { | |||
127 | $( | 127 | $( |
128 | #[allow(bad_style)] | 128 | #[allow(bad_style)] |
129 | pub const $ident: super::Name = | 129 | pub const $ident: super::Name = |
130 | super::Name::new_inline_ascii(stringify!($ident).as_bytes()); | 130 | super::Name::new_inline(stringify!($ident)); |
131 | )* | 131 | )* |
132 | }; | 132 | }; |
133 | } | 133 | } |
@@ -210,8 +210,8 @@ pub mod known { | |||
210 | ); | 210 | ); |
211 | 211 | ||
212 | // self/Self cannot be used as an identifier | 212 | // self/Self cannot be used as an identifier |
213 | pub const SELF_PARAM: super::Name = super::Name::new_inline_ascii(b"self"); | 213 | pub const SELF_PARAM: super::Name = super::Name::new_inline("self"); |
214 | pub const SELF_TYPE: super::Name = super::Name::new_inline_ascii(b"Self"); | 214 | pub const SELF_TYPE: super::Name = super::Name::new_inline("Self"); |
215 | 215 | ||
216 | #[macro_export] | 216 | #[macro_export] |
217 | macro_rules! name { | 217 | macro_rules! name { |