Skip to content

Revert "Allow specifying alignment for functions" #86300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
f01b35e
this is beta 1.53.0
pietroalbini May 4, 2021
0ffdf88
Update fulldeps test
Mark-Simulacrum Oct 7, 2020
b14eaf4
Update RELEASES.md for 1.52.0
XAMPPRocky Apr 14, 2021
725a85a
manually crafted revert of PR #80653, to address issue #82465.
pnkfelix May 3, 2021
c2c18bc
regression test for issue 82465.
pnkfelix May 3, 2021
e209666
Revert "Add assert_matches!(expr, pat)."
Mark-Simulacrum Apr 30, 2021
607a225
Revert "Add debug_assert_matches macro."
Mark-Simulacrum Apr 30, 2021
d18f0a4
Remove assert_matches users
Mark-Simulacrum Apr 30, 2021
ded409e
Remove assert_matches feature attributes.
m-ou-se Apr 30, 2021
bd9c30d
Revert PR 81473 to resolve (on beta) issues 81626 and 81658.
pnkfelix Mar 15, 2021
bbfdfa9
Revert PR 83866
pietroalbini May 5, 2021
c835a59
Update RLS and Rustfmt
Xanewok May 3, 2021
3a1e414
Add `yansi-term` as a permitted dependency
jyn514 May 2, 2021
4894656
Ignore failures of RLS on aarch64 Windows
Mark-Simulacrum Nov 17, 2020
e58c811
Auto merge of #84909 - pietroalbini:beta-next, r=Mark-Simulacrum
bors May 5, 2021
fb327ab
Deduplicate ParamCandidates with the same value except for bound vars
jackh726 Apr 25, 2021
40e2c34
Pick candidate with fewer bound vars
jackh726 May 6, 2021
8c48c6e
Account for unsatisfied bounds in E0599
estebank May 2, 2021
0013b44
bump stage0 to production 1.52.0
pietroalbini May 6, 2021
4bac69d
Auto merge of #84996 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors May 7, 2021
c64b3ff
Auto merge of #7204 - flip1995:beta_backport, r=flip1995
bors May 10, 2021
5a2dbd0
backport 1.52.1 release notes
pietroalbini May 17, 2021
586b51a
remove InPlaceIterable marker from Peekable due to unsoundness
the8472 May 15, 2021
c47274b
add regression test
the8472 May 15, 2021
ff346b9
from review: more robust test
the8472 May 16, 2021
855a573
Call `initSidebarItems` in root module of crate
Stupremee May 14, 2021
5d1125d
Synchronize llvm to master commit
Mark-Simulacrum May 22, 2021
e68af12
Do not ICE on invalid const param
estebank May 4, 2021
d1e2499
Disallows `#![feature(no_coverage)]` on stable and beta
richkadel May 3, 2021
c297d1e
Ensure TLS destructors run before thread joins in SGX
mzohreva Apr 21, 2021
5d1fdf4
Use atomics in join_orders_after_tls_destructors test
mzohreva Apr 29, 2021
0e49ff0
join_orders_after_tls_destructors: ensure thread 2 is launched before…
mzohreva May 6, 2021
82b8621
Auto merge of #85588 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors May 22, 2021
47e2265
Merge commit 'c64b3ffbb53a177e59876a6b7cc5eaff44d93913' into beta
flip1995 May 27, 2021
75dc963
Revert portion of PR #83521 that injected issue #85435 (and thus expo…
pnkfelix May 21, 2021
355dc5c
Regression test for issue 85435.
pnkfelix May 21, 2021
f9f5fc8
no thir-unsafeck in beta
pnkfelix Jun 1, 2021
bbd370c
Disable mutable noalias for Rust 1.53
nikic Jun 5, 2021
849c075
CI: Extract LLVM win64 installer directly, using 7z
joshtriplett May 3, 2021
ff4c377
Update clang to 12.0.0 on Windows and macOS
joshtriplett May 4, 2021
e7f4b8b
Auto merge of #86092 - JohnTitor:clang-12-beta, r=Mark-Simulacrum
bors Jun 8, 2021
e79b979
Auto merge of #85740 - flip1995:clippy_backport, r=Mark-Simulacrum
bors Jun 8, 2021
d86f9d4
Auto merge of #85893 - pnkfelix:beta-backport-85564, r=simulacrum
bors Jun 8, 2021
92752e9
Auto merge of #86036 - nikic:disable-mutable-noalias, r=Mark-Simulacrum
bors Jun 9, 2021
4a88723
Revert effects of PRs 81167 and 83091.
pnkfelix Jun 4, 2021
fd8c88a
Revert tests added by PR 81167.
pnkfelix Jun 4, 2021
f4f535b
Revert PRs 81238 and 82967 (which made copy and copy_nonoverlapping i…
pnkfelix Jun 4, 2021
bc843fd
Revert clippy's path to the copy intrinsics (part of reverting PR 812…
pnkfelix Jun 4, 2021
837cd13
Remove tests that were also added in PR 79684.
pnkfelix Jun 4, 2021
4d9e64b
Change test to use `likely`/`unlikely` instead of `copy`/`copy_overla…
pnkfelix Jun 4, 2021
61520c8
Regression test for issue 84297.
pnkfelix Jun 4, 2021
05f39bf
Auto merge of #86203 - pnkfelix:beta-targetted-issue-84297, r=dtolnay
bors Jun 11, 2021
752c939
Disable the machine outliner by default
nagisa Jun 5, 2021
c05bbb7
Fix incorrect gating of nonterminals in key-value attributes
Aaron1011 May 18, 2021
8b1a5a7
Build crtbengin.o/crtend.o from source code
12101111 May 17, 2021
bf28f68
Update Docker to build the deprecated target alongside the new one
kulikjak May 13, 2021
f724ee4
Improve comment
kulikjak May 13, 2021
9529cbd
Preserve `SyntaxContext` for invalid/dummy spans in crate metadata
Aaron1011 May 12, 2021
28ea358
Remove unsound TrustedRandomAccess implementations
steffahn Jun 1, 2021
b561bc5
Hash attributes for crate_hash.
cjgillot Jun 11, 2021
0a0f816
Auto merge of #86225 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Jun 11, 2021
e7a67cc
Auto merge of #86229 - cjgillot:crate-hash-beta, r=Mark-Simulacrum
bors Jun 12, 2021
0b4ed52
Revert "Allow specifying alignment for functions"
pnkfelix Jun 14, 2021
e105dc8
regression test for issue 85713.
pnkfelix Jun 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 58 additions & 129 deletions Cargo.lock

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,172 @@
Version 1.52.1 (2021-05-10)
============================

This release disables incremental compilation, unless the user has explicitly
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.

This is due to the widespread, and frequently occuring, breakage encountered by
Rust users due to newly enabled incremental verification in 1.52.0. Notably,
Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
newly added incremental verification are still present in past stable versions,
and are not yet fixed on any channel. These bugs can lead to miscompilation of
Rust binaries.

These problems only affect incremental builds, so release builds with Cargo
should not be affected unless the user has explicitly opted into incremental.
Debug and check builds are affected.

See [84970] for more details.

[84970]: https://github.com/rust-lang/rust/issues/84970

Version 1.52.0 (2021-05-06)
============================

Language
--------
- [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code
in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint
is allowed by default, and may become a warning or hard error in a
future edition.
- [You can now cast mutable references to arrays to a pointer of the same type as
the element.][81479]

Compiler
--------
- [Upgraded the default LLVM to LLVM 12.][81451]

Added tier 3\* support for the following targets.

- [`s390x-unknown-linux-musl`][82166]
- [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202]
- [`powerpc-unknown-openbsd`][82733]

\* Refer to Rust's [platform support page][platform-support-doc] for more
information on Rust's tiered platform support.

Libraries
---------
- [`OsString` now implements `Extend` and `FromIterator`.][82121]
- [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879]
- [`Arc<impl Error>` now implements `error::Error`.][80553]
- [All integer division and remainder operations are now `const`.][80962]

Stabilised APIs
-------------
- [`Arguments::as_str`]
- [`char::MAX`]
- [`char::REPLACEMENT_CHARACTER`]
- [`char::UNICODE_VERSION`]
- [`char::decode_utf16`]
- [`char::from_digit`]
- [`char::from_u32_unchecked`]
- [`char::from_u32`]
- [`slice::partition_point`]
- [`str::rsplit_once`]
- [`str::split_once`]

The following previously stable APIs are now `const`.

- [`char::len_utf8`]
- [`char::len_utf16`]
- [`char::to_ascii_uppercase`]
- [`char::to_ascii_lowercase`]
- [`char::eq_ignore_ascii_case`]
- [`u8::to_ascii_uppercase`]
- [`u8::to_ascii_lowercase`]
- [`u8::eq_ignore_ascii_case`]

Rustdoc
-------
- [Rustdoc lints are now treated as a tool lint, meaning that
lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::non_autolinks)]`).][80527]
Using the old style is still allowed, and will become a warning in
a future release.
- [Rustdoc now supports argument files.][82261]
- [Rustdoc now generates smart punctuation for documentation.][79423]
- [You can now use "task lists" in Rustdoc Markdown.][81766] E.g.
```markdown
- [x] Complete
- [ ] Todo
```

Misc
----
- [You can now pass multiple filters to tests.][81356] E.g.
`cargo test -- foo bar` will run all tests that match `foo` and `bar`.
- [Rustup now distributes PDB symbols for the `std` library on Windows,
allowing you to see `std` symbols when debugging.][82218]

Internal Only
-------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of rustc and
related tools.

- [Check the result cache before the DepGraph when ensuring queries][81855]
- [Try fast_reject::simplify_type in coherence before doing full check][81744]
- [Only store a LocalDefId in some HIR nodes][81611]
- [Store HIR attributes in a side table][79519]

Compatibility Notes
-------------------
- [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181]
- [Removed support for the `x86_64-rumprun-netbsd` target.][82594]
- [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216]
- [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying
languages in code blocks.][78429]
- [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763]
- [Changes in how proc macros handle whitespace may lead to panics when used
with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136]

[84136]: https://github.com/rust-lang/rust/issues/84136
[80763]: https://github.com/rust-lang/rust/pull/80763
[82166]: https://github.com/rust-lang/rust/pull/82166
[82121]: https://github.com/rust-lang/rust/pull/82121
[81879]: https://github.com/rust-lang/rust/pull/81879
[82261]: https://github.com/rust-lang/rust/pull/82261
[82218]: https://github.com/rust-lang/rust/pull/82218
[82216]: https://github.com/rust-lang/rust/pull/82216
[82202]: https://github.com/rust-lang/rust/pull/82202
[81855]: https://github.com/rust-lang/rust/pull/81855
[81766]: https://github.com/rust-lang/rust/pull/81766
[81744]: https://github.com/rust-lang/rust/pull/81744
[81611]: https://github.com/rust-lang/rust/pull/81611
[81479]: https://github.com/rust-lang/rust/pull/81479
[81451]: https://github.com/rust-lang/rust/pull/81451
[81356]: https://github.com/rust-lang/rust/pull/81356
[80962]: https://github.com/rust-lang/rust/pull/80962
[80553]: https://github.com/rust-lang/rust/pull/80553
[80527]: https://github.com/rust-lang/rust/pull/80527
[79519]: https://github.com/rust-lang/rust/pull/79519
[79423]: https://github.com/rust-lang/rust/pull/79423
[79208]: https://github.com/rust-lang/rust/pull/79208
[78429]: https://github.com/rust-lang/rust/pull/78429
[82733]: https://github.com/rust-lang/rust/pull/82733
[82594]: https://github.com/rust-lang/rust/pull/82594
[cargo/9181]: https://github.com/rust-lang/cargo/pull/9181
[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX
[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER
[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION
[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16
[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32
[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked
[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
[`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if
[`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq
[`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str
[`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once
[`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once
[`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point
[`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8
[`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16
[`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase
[`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase
[`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case
[`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase
[`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase
[`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case

Version 1.51.0 (2021-03-25)
============================

Expand Down
50 changes: 36 additions & 14 deletions compiler/rustc_attr/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,18 @@ pub fn find_repr_attrs(sess: &Session, attr: &Attribute) -> Vec<ReprAttr> {
if let Some(items) = attr.meta_item_list() {
sess.mark_attr_used(attr);
for item in items {
if !item.is_meta_item() {
handle_errors(
&sess.parse_sess,
item.span(),
AttrError::UnsupportedLiteral(
"meta item in `repr` must be an identifier",
false,
),
);
continue;
}

let mut recognised = false;
if item.is_word() {
let hint = match item.name_or_empty() {
Expand All @@ -878,6 +890,23 @@ pub fn find_repr_attrs(sess: &Session, attr: &Attribute) -> Vec<ReprAttr> {
acc.push(h);
}
} else if let Some((name, value)) = item.name_value_literal() {
let parse_alignment = |node: &ast::LitKind| -> Result<u32, &'static str> {
if let ast::LitKind::Int(literal, ast::LitIntType::Unsuffixed) = node {
if literal.is_power_of_two() {
// rustc_middle::ty::layout::Align restricts align to <= 2^29
if *literal <= 1 << 29 {
Ok(*literal as u32)
} else {
Err("larger than 2^29")
}
} else {
Err("not a power of two")
}
} else {
Err("not an unsuffixed integer")
}
};

let mut literal_error = None;
if name == sym::align {
recognised = true;
Expand Down Expand Up @@ -937,7 +966,13 @@ pub fn find_repr_attrs(sess: &Session, attr: &Attribute) -> Vec<ReprAttr> {
}
if !recognised {
// Not a word we recognize
diagnostic.delay_span_bug(item.span(), "unrecognized representation hint");
struct_span_err!(
diagnostic,
item.span(),
E0552,
"unrecognized representation hint"
)
.emit();
}
}
}
Expand Down Expand Up @@ -1045,16 +1080,3 @@ fn allow_unstable<'a>(
name
})
}

pub fn parse_alignment(node: &ast::LitKind) -> Result<u32, &'static str> {
if let ast::LitKind::Int(literal, ast::LitIntType::Unsuffixed) = node {
if literal.is_power_of_two() {
// rustc_middle::ty::layout::Align restricts align to <= 2^29
if *literal <= 1 << 29 { Ok(*literal as u32) } else { Err("larger than 2^29") }
} else {
Err("not a power of two")
}
} else {
Err("not an unsuffixed integer")
}
}
14 changes: 3 additions & 11 deletions compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,12 @@ pub fn expand_deriving_eq(
item: &Annotatable,
push: &mut dyn FnMut(Annotatable),
) {
let span = cx.with_def_site_ctxt(span);
let inline = cx.meta_word(span, sym::inline);
let no_coverage_ident =
rustc_ast::attr::mk_nested_word_item(Ident::new(sym::no_coverage, span));
let no_coverage_feature =
rustc_ast::attr::mk_list_item(Ident::new(sym::feature, span), vec![no_coverage_ident]);
let no_coverage = cx.meta_word(span, sym::no_coverage);
let hidden = rustc_ast::attr::mk_nested_word_item(Ident::new(sym::hidden, span));
let doc = rustc_ast::attr::mk_list_item(Ident::new(sym::doc, span), vec![hidden]);
let attrs = vec![
cx.attribute(inline),
cx.attribute(no_coverage_feature),
cx.attribute(no_coverage),
cx.attribute(doc),
];
let no_coverage = cx.meta_word(span, sym::no_coverage);
let attrs = vec![cx.attribute(inline), cx.attribute(doc), cx.attribute(no_coverage)];
let trait_def = TraitDef {
span,
attributes: Vec::new(),
Expand Down
13 changes: 3 additions & 10 deletions compiler/rustc_codegen_llvm/src/abi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::builder::Builder;
use crate::context::CodegenCx;
use crate::llvm::{self, AttributePlace};
use crate::llvm_util;
use crate::type_::Type;
use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
Expand Down Expand Up @@ -52,15 +51,9 @@ pub trait ArgAttributesExt {
}

fn should_use_mutable_noalias(cx: &CodegenCx<'_, '_>) -> bool {
// LLVM prior to version 12 has known miscompiles in the presence of
// noalias attributes (see #54878). Only enable mutable noalias by
// default for versions we believe to be safe.
cx.tcx
.sess
.opts
.debugging_opts
.mutable_noalias
.unwrap_or_else(|| llvm_util::get_version() >= (12, 0, 0))
// While #84958 has been fixed, mutable noalias is not enabled by default
// in Rust 1.53 out of an abundance of caution.
cx.tcx.sess.opts.debugging_opts.mutable_noalias.unwrap_or(false)
}

impl ArgAttributesExt for ArgAttributes {
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_codegen_llvm/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ pub fn from_fn_attrs(cx: &CodegenCx<'ll, 'tcx>, llfn: &'ll Value, instance: ty::
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::CMSE_NONSECURE_ENTRY) {
llvm::AddFunctionAttrString(llfn, Function, cstr!("cmse_nonsecure_entry"));
}
if let Some(align) = codegen_fn_attrs.alignment {
llvm::set_alignment(llfn, align as usize);
}
sanitize(cx, codegen_fn_attrs.no_sanitize, llfn);

// Always annotate functions with the target-cpu they are compiled for.
Expand Down
13 changes: 12 additions & 1 deletion compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::back::write::create_informational_target_machine;
use crate::llvm;
use crate::{llvm, llvm_util};
use libc::c_int;
use rustc_codegen_ssa::target_features::supported_target_features;
use rustc_data_structures::fx::FxHashSet;
Expand Down Expand Up @@ -84,6 +84,17 @@ unsafe fn configure_llvm(sess: &Session) {
if !sess.opts.debugging_opts.no_generate_arange_section {
add("-generate-arange-section", false);
}

// FIXME(nagisa): disable the machine outliner by default in LLVM versions 11, where it was
// introduced and up.
//
// This should remain in place until https://reviews.llvm.org/D103167 is fixed. If LLVM
// has been upgraded since, consider adjusting the version check below to contain an upper
// bound.
if llvm_util::get_version() >= (11, 0, 0) {
add("-enable-machine-outliner=never", false);
}

match sess.opts.debugging_opts.merge_functions.unwrap_or(sess.target.merge_functions) {
MergeFunctions::Disabled | MergeFunctions::Trampolines => {}
MergeFunctions::Aliases => {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(assert_matches)]
#![feature(bool_to_option)]
#![feature(box_patterns)]
#![feature(drain_filter)]
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,6 @@ declare_features! (
/// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries.
(active, c_unwind, "1.52.0", Some(74990), None),

/// Allows using `#[repr(align(...))]` on function items
(active, fn_align, "1.53.0", Some(82232), None),

/// Allows `extern "wasm" fn`
(active, wasm_abi, "1.53.0", Some(83788), None),

Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
template!(List: "address, memory, thread"),
experimental!(no_sanitize)
),
ungated!(
// Not exclusively gated at the crate level (though crate-level is
// supported). The feature can alternatively be enabled on individual
// functions.
no_coverage, AssumedUsed,
template!(Word),
),
gated!(no_coverage, AssumedUsed, template!(Word), experimental!(no_coverage)),

// FIXME: #14408 assume docs are used since rustdoc looks at them.
ungated!(doc, AssumedUsed, template!(List: "hidden|inline|...", NameValueStr: "string")),
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_metadata/src/rmeta/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,17 @@ impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for ExpnId {

impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for Span {
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Result<Span, String> {
let ctxt = SyntaxContext::decode(decoder)?;
let tag = u8::decode(decoder)?;

if tag == TAG_INVALID_SPAN {
return Ok(DUMMY_SP);
if tag == TAG_PARTIAL_SPAN {
return Ok(DUMMY_SP.with_ctxt(ctxt));
}

debug_assert!(tag == TAG_VALID_SPAN_LOCAL || tag == TAG_VALID_SPAN_FOREIGN);

let lo = BytePos::decode(decoder)?;
let len = BytePos::decode(decoder)?;
let ctxt = SyntaxContext::decode(decoder)?;
let hi = lo + len;

let sess = if let Some(sess) = decoder.sess {
Expand Down
Loading