diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-06-17 09:45:19 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-06-17 09:45:19 +0900 |
| commit | 34f38bf76006b0dfdc2784d76e3e1775cee024a4 (patch) | |
| tree | f68f5aaa8cc421459b556f136119e7f3e43a1357 | |
| parent | 9fef8d91b4a6c5bfe07c025c434f2d623ad83337 (diff) | |
Make `s` pre-interned
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/encodable.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/encodable.rs b/compiler/rustc_builtin_macros/src/deriving/encodable.rs index 01a57bea14e..c5f3a9d3379 100644 --- a/compiler/rustc_builtin_macros/src/deriving/encodable.rs +++ b/compiler/rustc_builtin_macros/src/deriving/encodable.rs @@ -124,12 +124,7 @@ pub fn expand_deriving_rustc_encodable( explicit_self: borrowed_explicit_self(), args: vec![( Ptr(Box::new(Literal(Path::new_local(typaram))), Borrowed(None, Mutability::Mut)), - // FIXME: we could use `sym::s` here, but making `s` a static - // symbol changes the symbol index ordering in a way that makes - // ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs - // fail. The linting code should be fixed so that its output - // does not depend on the symbol index ordering. - Symbol::intern("s"), + sym::s, )], ret_ty: Literal(Path::new_( pathvec_std!(result::Result), diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index a96d37c652d..862bde3f6a3 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1062,6 +1062,7 @@ symbols! { rustdoc, rustfmt, rvalue_static_promotion, + s, sanitize, sanitizer_runtime, saturating_add, |
