diff options
| author | bors <bors@rust-lang.org> | 2021-06-17 23:30:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-17 23:30:08 +0000 |
| commit | a6bc43ea846ee568ef4e890d4ac2a4cc03475bfc (patch) | |
| tree | 8a81d4e386b32177053c95d4e0106c4af53bcf15 /compiler | |
| parent | 149f4836dd6d9e789a26dca16dc034588866894e (diff) | |
| parent | 4ec05e04d4abc3497fc35525c6bec5260c48af0c (diff) | |
| download | rust-a6bc43ea846ee568ef4e890d4ac2a4cc03475bfc.tar.gz rust-a6bc43ea846ee568ef4e890d4ac2a4cc03475bfc.zip | |
Auto merge of #86417 - m-ou-se:rollup-vo2y1rz, r=m-ou-se
Rollup of 6 pull requests Successful merges: - #85925 (Linear interpolation) - #86202 (Specialize `io::Bytes::size_hint` for more types) - #86357 (Rely on libc for correct integer types in os/unix/net/ancillary.rs.) - #86388 (Make `s` pre-interned) - #86401 (Fix ICE when using `#[doc(keyword = "...")]` on non-items) - #86405 (Add incr-comp note for 1.53.0 relnotes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/encodable.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 |
3 files changed, 7 insertions, 8 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_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index eca84c791fb..e85392cf0bd 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -525,8 +525,11 @@ impl CheckAttrVisitor<'tcx> { self.doc_attr_str_error(meta, "keyword"); return false; } - match self.tcx.hir().expect_item(hir_id).kind { - ItemKind::Mod(ref module) => { + match self.tcx.hir().find(hir_id).and_then(|node| match node { + hir::Node::Item(item) => Some(&item.kind), + _ => None, + }) { + Some(ItemKind::Mod(ref module)) => { if !module.item_ids.is_empty() { self.tcx .sess 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, |
