Skip to content

Commit 1f721c6

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents e726c64 + c629a45 commit 1f721c6

File tree

521 files changed

+8449
-2969
lines changed

Some content is hidden

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

521 files changed

+8449
-2969
lines changed

Cargo.lock

Lines changed: 59 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -569,22 +569,16 @@ dependencies = [
569569
"color-print",
570570
"declare_clippy_lint",
571571
"filetime",
572-
"futures",
573-
"if_chain",
574572
"itertools",
575-
"parking_lot",
576573
"pulldown-cmark",
577-
"quote",
578574
"regex",
579575
"rustc_tools_util 0.4.2",
580576
"serde",
581577
"serde_json",
582-
"syn 2.0.104",
583578
"tempfile",
584-
"termize 0.1.1",
585-
"tokio",
579+
"termize",
586580
"toml 0.7.8",
587-
"ui_test",
581+
"ui_test 0.30.2",
588582
"walkdir",
589583
]
590584

@@ -642,6 +636,21 @@ dependencies = [
642636
"rustc-semver",
643637
]
644638

639+
[[package]]
640+
name = "clippy_test_deps"
641+
version = "0.1.0"
642+
dependencies = [
643+
"futures",
644+
"if_chain",
645+
"itertools",
646+
"parking_lot",
647+
"quote",
648+
"regex",
649+
"serde",
650+
"syn 2.0.104",
651+
"tokio",
652+
]
653+
645654
[[package]]
646655
name = "clippy_utils"
647656
version = "0.1.90"
@@ -2409,7 +2418,7 @@ dependencies = [
24092418
"smallvec",
24102419
"tempfile",
24112420
"tikv-jemalloc-sys",
2412-
"ui_test",
2421+
"ui_test 0.29.2",
24132422
]
24142423

24152424
[[package]]
@@ -3214,7 +3223,7 @@ dependencies = [
32143223

32153224
[[package]]
32163225
name = "run_make_support"
3217-
version = "0.2.0"
3226+
version = "0.0.0"
32183227
dependencies = [
32193228
"bstr",
32203229
"build_helper",
@@ -3773,7 +3782,7 @@ dependencies = [
37733782
"serde",
37743783
"serde_json",
37753784
"termcolor",
3776-
"termize 0.2.0",
3785+
"termize",
37773786
"tracing",
37783787
"windows 0.61.3",
37793788
]
@@ -4536,7 +4545,7 @@ dependencies = [
45364545
"rustc_serialize",
45374546
"rustc_span",
45384547
"rustc_target",
4539-
"termize 0.2.0",
4548+
"termize",
45404549
"tracing",
45414550
"windows 0.61.3",
45424551
]
@@ -5067,6 +5076,17 @@ dependencies = [
50675076
"color-eyre",
50685077
]
50695078

5079+
[[package]]
5080+
name = "spanned"
5081+
version = "0.4.1"
5082+
source = "registry+https://github.com/rust-lang/crates.io-index"
5083+
checksum = "c92d4b0c055fde758f086eb4a6e73410247df8a3837fd606d2caeeaf72aa566d"
5084+
dependencies = [
5085+
"anyhow",
5086+
"bstr",
5087+
"color-eyre",
5088+
]
5089+
50705090
[[package]]
50715091
name = "spdx-expression"
50725092
version = "0.5.2"
@@ -5305,16 +5325,6 @@ dependencies = [
53055325
"winapi-util",
53065326
]
53075327

5308-
[[package]]
5309-
name = "termize"
5310-
version = "0.1.1"
5311-
source = "registry+https://github.com/rust-lang/crates.io-index"
5312-
checksum = "1706be6b564323ce7092f5f7e6b118a14c8ef7ed0e69c8c5329c914a9f101295"
5313-
dependencies = [
5314-
"libc",
5315-
"winapi",
5316-
]
5317-
53185328
[[package]]
53195329
name = "termize"
53205330
version = "0.2.0"
@@ -5726,7 +5736,33 @@ dependencies = [
57265736
"rustfix",
57275737
"serde",
57285738
"serde_json",
5729-
"spanned",
5739+
"spanned 0.3.0",
5740+
]
5741+
5742+
[[package]]
5743+
name = "ui_test"
5744+
version = "0.30.2"
5745+
source = "registry+https://github.com/rust-lang/crates.io-index"
5746+
checksum = "b56a6897cc4bb6f8daf1939b0b39cd9645856997f46f4d0b3e3cb7122dfe9251"
5747+
dependencies = [
5748+
"annotate-snippets 0.11.5",
5749+
"anyhow",
5750+
"bstr",
5751+
"cargo-platform",
5752+
"cargo_metadata 0.18.1",
5753+
"color-eyre",
5754+
"colored",
5755+
"comma",
5756+
"crossbeam-channel",
5757+
"indicatif",
5758+
"levenshtein",
5759+
"prettydiff",
5760+
"regex",
5761+
"rustc_version",
5762+
"rustfix",
5763+
"serde",
5764+
"serde_json",
5765+
"spanned 0.4.1",
57305766
]
57315767

57325768
[[package]]

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ members = [
1313
"src/tools/cargotest",
1414
"src/tools/clippy",
1515
"src/tools/clippy/clippy_dev",
16+
"src/tools/clippy/clippy_test_deps",
1617
"src/tools/collect-license-metadata",
1718
"src/tools/compiletest",
1819
"src/tools/coverage-dump",

compiler/rustc_attr_data_structures/src/attributes.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ pub enum AttributeKind {
240240
/// Represents [`#[doc]`](https://doc.rust-lang.org/stable/rustdoc/write-documentation/the-doc-attribute.html).
241241
DocComment { style: AttrStyle, kind: CommentKind, span: Span, comment: Symbol },
242242

243+
/// Represents `#[rustc_dummy]`.
244+
Dummy,
245+
243246
/// Represents [`#[export_name]`](https://doc.rust-lang.org/reference/abi.html#the-export_name-attribute).
244247
ExportName {
245248
/// The name to export this item with.
@@ -248,6 +251,15 @@ pub enum AttributeKind {
248251
span: Span,
249252
},
250253

254+
/// Represents `#[export_stable]`.
255+
ExportStable,
256+
257+
/// Represents `#[ffi_const]`.
258+
FfiConst(Span),
259+
260+
/// Represents `#[ffi_pure]`.
261+
FfiPure(Span),
262+
251263
/// Represents `#[ignore]`
252264
Ignore {
253265
span: Span,
@@ -326,6 +338,9 @@ pub enum AttributeKind {
326338
span: Span,
327339
},
328340

341+
/// Represents `#[rustc_std_internal_symbol]`.
342+
StdInternalSymbol(Span),
343+
329344
/// Represents `#[target_feature(enable = "...")]`
330345
TargetFeature(ThinVec<(Symbol, Span)>, Span),
331346

compiler/rustc_attr_data_structures/src/encode_cross_crate.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ impl AttributeKind {
2525
ConstStabilityIndirect => No,
2626
Deprecation { .. } => Yes,
2727
DocComment { .. } => Yes,
28+
Dummy => No,
2829
ExportName { .. } => Yes,
30+
ExportStable => No,
31+
FfiConst(..) => No,
32+
FfiPure(..) => No,
2933
Ignore { .. } => No,
3034
Inline(..) => No,
3135
LinkName { .. } => Yes,
@@ -48,6 +52,7 @@ impl AttributeKind {
4852
RustcObjectLifetimeDefault => No,
4953
SkipDuringMethodDispatch { .. } => No,
5054
Stability { .. } => Yes,
55+
StdInternalSymbol(..) => No,
5156
TargetFeature(..) => No,
5257
TrackCaller(..) => Yes,
5358
Used { .. } => No,

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ attr_parsing_unused_duplicate =
146146
unused attribute
147147
.suggestion = remove this attribute
148148
.note = attribute also specified here
149-
.warn = {-passes_previously_accepted}
149+
.warn = {-attr_parsing_previously_accepted}
150150
151151
attr_parsing_unused_multiple =
152152
multiple `{$name}` attributes
153153
.suggestion = remove this attribute
154154
.note = attribute also specified here
155155
156-
-attr_parsing_perviously_accepted =
156+
-attr_parsing_previously_accepted =
157157
this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub(crate) struct OptimizeParser;
1515

1616
impl<S: Stage> SingleAttributeParser<S> for OptimizeParser {
1717
const PATH: &[Symbol] = &[sym::optimize];
18-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepLast;
18+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
1919
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
2020
const TEMPLATE: AttributeTemplate = template!(List: "size|speed|none");
2121

@@ -56,7 +56,7 @@ pub(crate) struct ExportNameParser;
5656

5757
impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
5858
const PATH: &[rustc_span::Symbol] = &[sym::export_name];
59-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepFirst;
59+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
6060
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
6161
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
6262

compiler/rustc_attr_parsing/src/attributes/deprecation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn get<S: Stage>(
3636

3737
impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
3838
const PATH: &[Symbol] = &[sym::deprecated];
39-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepFirst;
39+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
4040
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
4141
const TEMPLATE: AttributeTemplate = template!(
4242
Word,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use rustc_attr_data_structures::AttributeKind;
2+
use rustc_feature::{AttributeTemplate, template};
3+
use rustc_span::{Symbol, sym};
4+
5+
use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
6+
use crate::context::{AcceptContext, Stage};
7+
use crate::parser::ArgParser;
8+
9+
pub(crate) struct DummyParser;
10+
impl<S: Stage> SingleAttributeParser<S> for DummyParser {
11+
const PATH: &[Symbol] = &[sym::rustc_dummy];
12+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
13+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Ignore;
14+
const TEMPLATE: AttributeTemplate = template!(Word); // Anything, really
15+
16+
fn convert(_: &mut AcceptContext<'_, '_, S>, _: &ArgParser<'_>) -> Option<AttributeKind> {
17+
Some(AttributeKind::Dummy)
18+
}
19+
}

compiler/rustc_attr_parsing/src/attributes/inline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub(crate) struct InlineParser;
1616

1717
impl<S: Stage> SingleAttributeParser<S> for InlineParser {
1818
const PATH: &'static [Symbol] = &[sym::inline];
19-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepLast;
19+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
2020
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
2121
const TEMPLATE: AttributeTemplate = template!(Word, List: "always|never");
2222

@@ -57,7 +57,7 @@ pub(crate) struct RustcForceInlineParser;
5757

5858
impl<S: Stage> SingleAttributeParser<S> for RustcForceInlineParser {
5959
const PATH: &'static [Symbol] = &[sym::rustc_force_inline];
60-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepLast;
60+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
6161
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
6262
const TEMPLATE: AttributeTemplate = template!(Word, List: "reason", NameValueStr: "reason");
6363

compiler/rustc_attr_parsing/src/attributes/link_attrs.rs

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use rustc_attr_data_structures::AttributeKind;
22
use rustc_attr_data_structures::AttributeKind::{LinkName, LinkSection};
33
use rustc_feature::{AttributeTemplate, template};
4-
use rustc_span::{Symbol, sym};
4+
use rustc_span::{Span, Symbol, sym};
55

6-
use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
6+
use crate::attributes::{
7+
AttributeOrder, NoArgsAttributeParser, OnDuplicate, SingleAttributeParser,
8+
};
79
use crate::context::{AcceptContext, Stage};
810
use crate::parser::ArgParser;
911
use crate::session_diagnostics::NullOnLinkSection;
@@ -12,7 +14,7 @@ pub(crate) struct LinkNameParser;
1214

1315
impl<S: Stage> SingleAttributeParser<S> for LinkNameParser {
1416
const PATH: &[Symbol] = &[sym::link_name];
15-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepFirst;
17+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
1618
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
1719
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
1820

@@ -34,7 +36,7 @@ pub(crate) struct LinkSectionParser;
3436

3537
impl<S: Stage> SingleAttributeParser<S> for LinkSectionParser {
3638
const PATH: &[Symbol] = &[sym::link_section];
37-
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepFirst;
39+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
3840
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
3941
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "name");
4042

@@ -57,3 +59,31 @@ impl<S: Stage> SingleAttributeParser<S> for LinkSectionParser {
5759
Some(LinkSection { name, span: cx.attr_span })
5860
}
5961
}
62+
63+
pub(crate) struct ExportStableParser;
64+
impl<S: Stage> NoArgsAttributeParser<S> for ExportStableParser {
65+
const PATH: &[Symbol] = &[sym::export_stable];
66+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
67+
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::ExportStable;
68+
}
69+
70+
pub(crate) struct FfiConstParser;
71+
impl<S: Stage> NoArgsAttributeParser<S> for FfiConstParser {
72+
const PATH: &[Symbol] = &[sym::ffi_const];
73+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
74+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::FfiConst;
75+
}
76+
77+
pub(crate) struct FfiPureParser;
78+
impl<S: Stage> NoArgsAttributeParser<S> for FfiPureParser {
79+
const PATH: &[Symbol] = &[sym::ffi_pure];
80+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
81+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::FfiPure;
82+
}
83+
84+
pub(crate) struct StdInternalSymbolParser;
85+
impl<S: Stage> NoArgsAttributeParser<S> for StdInternalSymbolParser {
86+
const PATH: &[Symbol] = &[sym::rustc_std_internal_symbol];
87+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
88+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::StdInternalSymbol;
89+
}

0 commit comments

Comments
 (0)