diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-06-24 16:17:59 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-07-24 21:11:55 +0100 |
| commit | db8cdc5d37da5c0cf306fba51d07d6af10d69bd7 (patch) | |
| tree | 1604dbb5b9365474e31b3a2ba556487d2fd50a56 /compiler/rustc_ast/src | |
| parent | 2ccafed862f6906707a390caf180449dd64cad2e (diff) | |
| download | rust-db8cdc5d37da5c0cf306fba51d07d6af10d69bd7.tar.gz rust-db8cdc5d37da5c0cf306fba51d07d6af10d69bd7.zip | |
Use Cow<'static, str> for InlineAsmTemplatePiece::String
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 75c656973f9..4d19be62df8 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -36,6 +36,7 @@ use rustc_macros::{Decodable, Encodable, HashStable_Generic}; use rustc_span::source_map::{respan, Spanned}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP}; +use std::borrow::Cow; use std::cmp; use std::fmt; use std::mem; @@ -2272,7 +2273,7 @@ impl std::fmt::Debug for InlineAsmOptions { #[derive(Clone, PartialEq, Encodable, Decodable, Debug, Hash, HashStable_Generic)] pub enum InlineAsmTemplatePiece { - String(String), + String(Cow<'static, str>), Placeholder { operand_idx: usize, modifier: Option<char>, span: Span }, } |
