Skip to content

Commit 6391e70

Browse files
authored
Merge branch 'rust-lang:master' into feat/enable-f16
2 parents dd8dc65 + a4ce33c commit 6391e70

File tree

60 files changed

+1513
-1276
lines changed

Some content is hidden

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

60 files changed

+1513
-1276
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BasedOnStyle: LLVM

.reuse/dep5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Files: compiler/*
2929
x
3030
x.ps1
3131
x.py
32+
.clang-format
3233
.editorconfig
3334
.git-blame-ignore-revs
3435
.gitattributes

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5627,6 +5627,7 @@ dependencies = [
56275627
"regex",
56285628
"rustc-hash",
56295629
"semver",
5630+
"similar",
56305631
"termcolor",
56315632
"walkdir",
56325633
]

compiler/rustc_ast/src/attr/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ impl MetaItem {
327327
I: Iterator<Item = &'a TokenTree>,
328328
{
329329
// FIXME: Share code with `parse_path`.
330-
let path = match tokens.next().map(|tt| TokenTree::uninterpolate(tt)).as_deref() {
330+
let tt = tokens.next().map(|tt| TokenTree::uninterpolate(tt));
331+
let path = match tt.as_deref() {
331332
Some(&TokenTree::Token(
332333
Token { kind: ref kind @ (token::Ident(..) | token::PathSep), span },
333334
_,
@@ -368,6 +369,12 @@ impl MetaItem {
368369
token::Nonterminal::NtPath(path) => (**path).clone(),
369370
_ => return None,
370371
},
372+
Some(TokenTree::Token(
373+
Token { kind: token::OpenDelim(_) | token::CloseDelim(_), .. },
374+
_,
375+
)) => {
376+
panic!("Should be `AttrTokenTree::Delimited`, not delim tokens: {:?}", tt);
377+
}
371378
_ => return None,
372379
};
373380
let list_closing_paren_pos = tokens.peek().map(|tt| tt.span().hi());

compiler/rustc_ast/src/tokenstream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl AttrTokenStream {
224224
// Inner attributes are only supported on extern blocks, functions,
225225
// impls, and modules. All of these have their inner attributes
226226
// placed at the beginning of the rightmost outermost braced group:
227-
// e.g. fn foo() { #![my_attr} }
227+
// e.g. fn foo() { #![my_attr] }
228228
//
229229
// Therefore, we can insert them back into the right location
230230
// without needing to do any extra position tracking.

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
124124
.emit();
125125
}
126126
}
127-
sym::coverage => {
128-
let inner = attr.meta_item_list();
129-
match inner.as_deref() {
130-
Some([item]) if item.has_name(sym::off) => {
131-
codegen_fn_attrs.flags |= CodegenFnAttrFlags::NO_COVERAGE;
132-
}
133-
Some([item]) if item.has_name(sym::on) => {
134-
// Allow #[coverage(on)] for being explicit, maybe also in future to enable
135-
// coverage on a smaller scope within an excluded larger scope.
136-
}
137-
Some(_) | None => {
138-
tcx.dcx()
139-
.span_delayed_bug(attr.span, "unexpected value of coverage attribute");
140-
}
141-
}
142-
}
143127
sym::rustc_std_internal_symbol => {
144128
codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL
145129
}
@@ -584,7 +568,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
584568
}
585569

586570
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NAKED) {
587-
codegen_fn_attrs.flags |= CodegenFnAttrFlags::NO_COVERAGE;
588571
codegen_fn_attrs.inline = InlineAttr::Never;
589572
}
590573

compiler/rustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ libc = "0.2"
5050
memmap2 = "0.2.1"
5151
# tidy-alphabetical-end
5252

53-
[target.'cfg(any(target_arch = "powerpc", target_arch = "mips"))'.dependencies]
53+
[target.'cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))'.dependencies]
5454
portable-atomic = "1.5.1"
5555

5656
[features]

compiler/rustc_data_structures/src/marker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ cfg_match! {
147147
[crate::owned_slice::OwnedSlice]
148148
);
149149

150-
// PowerPC and MIPS platforms with 32-bit pointers do not
150+
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
151151
// have AtomicU64 type.
152-
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
152+
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc", target_arch = "sparc")))]
153153
already_sync!(
154154
[std::sync::atomic::AtomicU64]
155155
);
156156

157-
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
157+
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
158158
already_sync!(
159159
[portable_atomic::AtomicU64]
160160
);

compiler/rustc_data_structures/src/sync.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ cfg_match! {
270270

271271
pub use std::sync::atomic::{AtomicBool, AtomicUsize, AtomicU32};
272272

273-
// PowerPC and MIPS platforms with 32-bit pointers do not
273+
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
274274
// have AtomicU64 type.
275-
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
275+
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc")))]
276276
pub use std::sync::atomic::AtomicU64;
277277

278-
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
278+
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
279279
pub use portable_atomic::AtomicU64;
280280

281281
pub use std::sync::Arc as Lrc;

compiler/rustc_expand/src/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ impl<'a> StripUnconfigured<'a> {
214214
) => {
215215
panic!("Nonterminal should have been flattened: {:?}", tree);
216216
}
217+
AttrTokenTree::Token(
218+
Token { kind: TokenKind::OpenDelim(_) | TokenKind::CloseDelim(_), .. },
219+
_,
220+
) => {
221+
panic!("Should be `AttrTokenTree::Delimited`, not delim tokens: {:?}", tree);
222+
}
217223
AttrTokenTree::Token(token, spacing) => {
218224
Some(AttrTokenTree::Token(token, spacing)).into_iter()
219225
}

0 commit comments

Comments
 (0)