1
Fork 0

Use Cow<'static, str> for InlineAsmTemplatePiece::String

This commit is contained in:
GnomedDev 2024-06-24 16:17:59 +01:00
parent 2ccafed862
commit db8cdc5d37
No known key found for this signature in database
GPG key ID: 9BF10F8372B254D1
4 changed files with 28 additions and 27 deletions

View file

@ -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 },
}