Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a41a692

Browse files
committedDec 19, 2021
Auto merge of rust-lang#91957 - nnethercote:rm-SymbolStr, r=oli-obk
Remove `SymbolStr` This was originally proposed in rust-lang#74554 (comment). As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
2 parents 8f54061 + b1c934e commit a41a692

File tree

140 files changed

+354
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+354
-415
lines changed
 

‎compiler/rustc_ast/src/util/literal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ impl LitKind {
3535
LitKind::Bool(symbol == kw::True)
3636
}
3737
token::Byte => {
38-
return unescape_byte(&symbol.as_str())
38+
return unescape_byte(symbol.as_str())
3939
.map(LitKind::Byte)
4040
.map_err(|_| LitError::LexerError);
4141
}
4242
token::Char => {
43-
return unescape_char(&symbol.as_str())
43+
return unescape_char(symbol.as_str())
4444
.map(LitKind::Char)
4545
.map_err(|_| LitError::LexerError);
4646
}

‎compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
12781278
}
12791279

12801280
pub(super) fn lower_abi(&mut self, abi: StrLit) -> abi::Abi {
1281-
abi::lookup(&abi.symbol_unescaped.as_str()).unwrap_or_else(|| {
1281+
abi::lookup(abi.symbol_unescaped.as_str()).unwrap_or_else(|| {
12821282
self.error_on_invalid_abi(abi);
12831283
abi::Abi::Rust
12841284
})

0 commit comments

Comments
 (0)