Skip to content

Commit 842bd5b

Browse files
committed
Auto merge of #151835 - JonathanBrouwer:rollup-ayQY8NW, r=JonathanBrouwer
Rollup of 8 pull requests Successful merges: - #147387 (hir_owner_parent optimized to inlined call for non-incremental build) - #150271 (Move struct placeholder pt2) - #151283 (Suggest ignore returning value inside macro for unused_must_use lint) - #151565 (Rename, clarify, and document code for "erasing" query values) - #149482 (thread::scope: document how join interacts with TLS destructors) - #151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - #151833 (Treat unions as 'data types' in attr parsing diagnostics) - #151834 (Update `askama` version to `0.15.4`)
2 parents 370143f + 0f318f9 commit 842bd5b

104 files changed

Lines changed: 1190 additions & 992 deletions

File tree

Some content is hidden

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

Cargo.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
184184

185185
[[package]]
186186
name = "askama"
187-
version = "0.15.3"
187+
version = "0.15.4"
188188
source = "registry+https://github.com/rust-lang/crates.io-index"
189-
checksum = "10a800c6f7c005e5bcb76ff0b9e61c9e54ad379ce4e83a88ed14ff487a73776d"
189+
checksum = "08e1676b346cadfec169374f949d7490fd80a24193d37d2afce0c047cf695e57"
190190
dependencies = [
191191
"askama_macros",
192192
"itoa",
@@ -197,9 +197,9 @@ dependencies = [
197197

198198
[[package]]
199199
name = "askama_derive"
200-
version = "0.15.3"
200+
version = "0.15.4"
201201
source = "registry+https://github.com/rust-lang/crates.io-index"
202-
checksum = "0cb7657165bac49b5c533850e7cd67c1c60059aefc31088f89aa431c8a90d5d9"
202+
checksum = "7661ff56517787343f376f75db037426facd7c8d3049cef8911f1e75016f3a37"
203203
dependencies = [
204204
"askama_parser",
205205
"basic-toml",
@@ -214,18 +214,18 @@ dependencies = [
214214

215215
[[package]]
216216
name = "askama_macros"
217-
version = "0.15.3"
217+
version = "0.15.4"
218218
source = "registry+https://github.com/rust-lang/crates.io-index"
219-
checksum = "e55eacd3e54d32483cd10d0a881a0f28a40f3a763704ac9b8693edc39d7321c7"
219+
checksum = "713ee4dbfd1eb719c2dab859465b01fa1d21cb566684614a713a6b7a99a4e47b"
220220
dependencies = [
221221
"askama_derive",
222222
]
223223

224224
[[package]]
225225
name = "askama_parser"
226-
version = "0.15.3"
226+
version = "0.15.4"
227227
source = "registry+https://github.com/rust-lang/crates.io-index"
228-
checksum = "20c3df8886ab5acdcd76eee93b3e2df1ef734251438b5b942b5fea22c50d2a0f"
228+
checksum = "1d62d674238a526418b30c0def480d5beadb9d8964e7f38d635b03bf639c704c"
229229
dependencies = [
230230
"rustc-hash 2.1.1",
231231
"serde",

compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<S: Stage> CombineAttributeParser<S> for AllowConstFnUnstableParser {
5757
const PATH: &[Symbol] = &[sym::rustc_allow_const_fn_unstable];
5858
type Item = Symbol;
5959
const CONVERT: ConvertFn<Self::Item> =
60-
|items, first_span| AttributeKind::AllowConstFnUnstable(items, first_span);
60+
|items, first_span| AttributeKind::RustcAllowConstFnUnstable(items, first_span);
6161
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
6262
Allow(Target::Fn),
6363
Allow(Target::Method(MethodKind::Inherent)),

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
181181
cx.emit_err(NullOnObjcClass { span: nv.value_span });
182182
return None;
183183
}
184-
Some(AttributeKind::ObjcClass { classname, span: cx.attr_span })
184+
Some(AttributeKind::RustcObjcClass { classname, span: cx.attr_span })
185185
}
186186
}
187187

@@ -213,7 +213,7 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcSelectorParser {
213213
cx.emit_err(NullOnObjcSelector { span: nv.value_span });
214214
return None;
215215
}
216-
Some(AttributeKind::ObjcSelector { methname, span: cx.attr_span })
216+
Some(AttributeKind::RustcObjcSelector { methname, span: cx.attr_span })
217217
}
218218
}
219219

compiler/rustc_attr_parsing/src/attributes/confusables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<S: Stage> AttributeParser<S> for ConfusablesParser {
4343
return None;
4444
}
4545

46-
Some(AttributeKind::Confusables {
46+
Some(AttributeKind::RustcConfusables {
4747
symbols: self.confusables,
4848
first_span: self.first_span.unwrap(),
4949
})

compiler/rustc_attr_parsing/src/attributes/dummy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ impl<S: Stage> SingleAttributeParser<S> for DummyParser {
1616
const TEMPLATE: AttributeTemplate = template!(Word); // Anything, really
1717

1818
fn convert(_: &mut AcceptContext<'_, '_, S>, _: &ArgParser) -> Option<AttributeKind> {
19-
Some(AttributeKind::Dummy)
19+
Some(AttributeKind::RustcDummy)
2020
}
2121
}

compiler/rustc_attr_parsing/src/attributes/link_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for StdInternalSymbolParser {
529529
Allow(Target::Static),
530530
Allow(Target::ForeignStatic),
531531
]);
532-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::StdInternalSymbol;
532+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcStdInternalSymbol;
533533
}
534534

535535
pub(crate) struct LinkOrdinalParser;

compiler/rustc_attr_parsing/src/attributes/lint_helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser {
1111
Allow(Target::Method(MethodKind::Trait { body: true })),
1212
Allow(Target::Method(MethodKind::TraitImpl)),
1313
]);
14-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::AsPtr;
14+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcAsPtr;
1515
}
1616

1717
pub(crate) struct PubTransparentParser;
@@ -23,7 +23,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for PubTransparentParser {
2323
Allow(Target::Enum),
2424
Allow(Target::Union),
2525
]);
26-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::PubTransparent;
26+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPubTransparent;
2727
}
2828

2929
pub(crate) struct PassByValueParser;
@@ -35,7 +35,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for PassByValueParser {
3535
Allow(Target::Enum),
3636
Allow(Target::TyAlias),
3737
]);
38-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::PassByValue;
38+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcPassByValue;
3939
}
4040

4141
pub(crate) struct RustcShouldNotBeCalledOnConstItems;

compiler/rustc_attr_parsing/src/attributes/stability.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl<S: Stage> AttributeParser<S> for BodyStabilityParser {
173173
fn finalize(self, _cx: &FinalizeContext<'_, '_, S>) -> Option<AttributeKind> {
174174
let (stability, span) = self.stability?;
175175

176-
Some(AttributeKind::BodyStability { stability, span })
176+
Some(AttributeKind::RustcBodyStability { stability, span })
177177
}
178178
}
179179

@@ -185,7 +185,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for ConstStabilityIndirectParser {
185185
Allow(Target::Fn),
186186
Allow(Target::Method(MethodKind::Inherent)),
187187
]);
188-
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::ConstStabilityIndirect;
188+
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcConstStabilityIndirect;
189189
}
190190

191191
#[derive(Default)]
@@ -258,7 +258,7 @@ impl<S: Stage> AttributeParser<S> for ConstStabilityParser {
258258

259259
let (stability, span) = self.stability?;
260260

261-
Some(AttributeKind::ConstStability { stability, span })
261+
Some(AttributeKind::RustcConstStability { stability, span })
262262
}
263263
}
264264

compiler/rustc_attr_parsing/src/attributes/traits.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ impl<S: Stage> SingleAttributeParser<S> for SkipDuringMethodDispatchParser {
5050
cx.duplicate_key(arg.span(), key);
5151
}
5252
}
53-
Some(AttributeKind::SkipDuringMethodDispatch { array, boxed_slice, span: cx.attr_span })
53+
Some(AttributeKind::RustcSkipDuringMethodDispatch {
54+
array,
55+
boxed_slice,
56+
span: cx.attr_span,
57+
})
5458
}
5559
}
5660

@@ -59,7 +63,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for ParenSugarParser {
5963
const PATH: &[Symbol] = &[sym::rustc_paren_sugar];
6064
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
6165
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
62-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::ParenSugar;
66+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcParenSugar;
6367
}
6468

6569
pub(crate) struct TypeConstParser;
@@ -91,15 +95,15 @@ impl<S: Stage> NoArgsAttributeParser<S> for DenyExplicitImplParser {
9195
const PATH: &[Symbol] = &[sym::rustc_deny_explicit_impl];
9296
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
9397
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
94-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::DenyExplicitImpl;
98+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcDenyExplicitImpl;
9599
}
96100

97101
pub(crate) struct DynIncompatibleTraitParser;
98102
impl<S: Stage> NoArgsAttributeParser<S> for DynIncompatibleTraitParser {
99103
const PATH: &[Symbol] = &[sym::rustc_dyn_incompatible_trait];
100104
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
101105
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
102-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::DynIncompatibleTrait;
106+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcDynIncompatibleTrait;
103107
}
104108

105109
// Specialization
@@ -109,15 +113,15 @@ impl<S: Stage> NoArgsAttributeParser<S> for SpecializationTraitParser {
109113
const PATH: &[Symbol] = &[sym::rustc_specialization_trait];
110114
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
111115
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
112-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::SpecializationTrait;
116+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcSpecializationTrait;
113117
}
114118

115119
pub(crate) struct UnsafeSpecializationMarkerParser;
116120
impl<S: Stage> NoArgsAttributeParser<S> for UnsafeSpecializationMarkerParser {
117121
const PATH: &[Symbol] = &[sym::rustc_unsafe_specialization_marker];
118122
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
119123
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
120-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::UnsafeSpecializationMarker;
124+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcUnsafeSpecializationMarker;
121125
}
122126

123127
// Coherence
@@ -127,7 +131,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for CoinductiveParser {
127131
const PATH: &[Symbol] = &[sym::rustc_coinductive];
128132
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
129133
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
130-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Coinductive;
134+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcCoinductive;
131135
}
132136

133137
pub(crate) struct AllowIncoherentImplParser;
@@ -136,7 +140,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for AllowIncoherentImplParser {
136140
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
137141
const ALLOWED_TARGETS: AllowedTargets =
138142
AllowedTargets::AllowList(&[Allow(Target::Method(MethodKind::Inherent))]);
139-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::AllowIncoherentImpl;
143+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcAllowIncoherentImpl;
140144
}
141145

142146
pub(crate) struct FundamentalParser;

compiler/rustc_attr_parsing/src/attributes/transparency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ impl<S: Stage> SingleAttributeParser<S> for TransparencyParser {
3232
}
3333
None => None,
3434
}
35-
.map(AttributeKind::MacroTransparency)
35+
.map(AttributeKind::RustcMacroTransparency)
3636
}
3737
}

0 commit comments

Comments
 (0)