mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
Kill RAW_ literals
Syntactically, they are indistinguishable from non-raw versions, so it doesn't make sense to separate then *at the syntax* level.
This commit is contained in:
parent
6725dcf847
commit
5ba4f949c2
53 changed files with 142 additions and 165 deletions
|
@ -55,13 +55,7 @@ impl ast::Attr {
|
|||
let key = self.simple_name()?;
|
||||
let value_token = lit.syntax().first_token()?;
|
||||
|
||||
let value: SmolStr = if let Some(s) = ast::String::cast(value_token.clone()) {
|
||||
s.value()?.into()
|
||||
} else if let Some(s) = ast::RawString::cast(value_token) {
|
||||
s.value()?.into()
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
let value: SmolStr = ast::String::cast(value_token.clone())?.value()?.into();
|
||||
|
||||
Some((key, value))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue