Skip to content

Commit 751e9ff

Browse files
committed
Auto merge of rust-lang#129591 - matthiaskrgr:rollup-t1y17qs, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#129207 (Lint that warns when an elided lifetime ends up being a named lifetime) - rust-lang#129288 (Use subtyping for `UnsafeFnPointer` coercion, too) - rust-lang#129405 (Fixing span manipulation and indentation of the suggestion introduced by rust-lang#126187) - rust-lang#129518 (gitignore: ignore ICE reports regardless of directory) - rust-lang#129519 (Remove redundant flags from `lower_ty_common` that can be inferred from the HIR) - rust-lang#129544 (Removes dead code from the compiler) - rust-lang#129553 (add back test for stable-const-can-only-call-stable-const) - rust-lang#129590 (Avoid taking reference of &TyKind) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c6db1ca + 1bac9b2 commit 751e9ff

File tree

94 files changed

+774
-188
lines changed

Some content is hidden

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

94 files changed

+774
-188
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ build/
5656
/src/tools/x/target
5757
# Created by default with `src/ci/docker/run.sh`
5858
/obj/
59-
/rustc-ice*
59+
60+
## ICE reports
61+
rustc-ice-*.txt
6062

6163
## Temporary files
6264
*~

compiler/rustc_ast_lowering/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
838838

839839
(hir::ParamName::Fresh, hir::LifetimeParamKind::Elided(kind))
840840
}
841-
LifetimeRes::Static | LifetimeRes::Error => return None,
841+
LifetimeRes::Static { .. } | LifetimeRes::Error => return None,
842842
res => panic!(
843843
"Unexpected lifetime resolution {:?} for {:?} at {:?}",
844844
res, ident, ident.span
@@ -1657,7 +1657,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16571657
}
16581658

16591659
// Opaques do not capture `'static`
1660-
LifetimeRes::Static | LifetimeRes::Error => {
1660+
LifetimeRes::Static { .. } | LifetimeRes::Error => {
16611661
continue;
16621662
}
16631663

@@ -2070,7 +2070,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
20702070
hir::LifetimeName::Param(param)
20712071
}
20722072
LifetimeRes::Infer => hir::LifetimeName::Infer,
2073-
LifetimeRes::Static => hir::LifetimeName::Static,
2073+
LifetimeRes::Static { .. } => hir::LifetimeName::Static,
20742074
LifetimeRes::Error => hir::LifetimeName::Error,
20752075
res => panic!(
20762076
"Unexpected lifetime resolution {:?} for {:?} at {:?}",

compiler/rustc_ast_lowering/src/lifetime_collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl<'ast> LifetimeCollectVisitor<'ast> {
2727
self.collected_lifetimes.insert(lifetime);
2828
}
2929
}
30-
LifetimeRes::Static | LifetimeRes::Error => {
30+
LifetimeRes::Static { .. } | LifetimeRes::Error => {
3131
self.collected_lifetimes.insert(lifetime);
3232
}
3333
LifetimeRes::Infer => {}

compiler/rustc_borrowck/src/borrowck_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl<'infcx, 'tcx> crate::MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
290290
ty: Ty<'_>,
291291
is_index: Option<bool>,
292292
) -> Diag<'infcx> {
293-
let type_name = match (&ty.kind(), is_index) {
293+
let type_name = match (ty.kind(), is_index) {
294294
(&ty::Array(_, _), Some(true)) | (&ty::Array(_, _), None) => "array",
295295
(&ty::Slice(_), _) => "slice",
296296
_ => span_bug!(move_from_span, "this path should not cause illegal move"),

compiler/rustc_borrowck/src/places_conflict.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fn place_components_conflict<'tcx>(
201201

202202
let base_ty = base.ty(body, tcx).ty;
203203

204-
match (elem, &base_ty.kind(), access) {
204+
match (elem, base_ty.kind(), access) {
205205
(_, _, Shallow(Some(ArtificialField::ArrayLength)))
206206
| (_, _, Shallow(Some(ArtificialField::FakeBorrow))) => {
207207
// The array length is like additional fields on the

compiler/rustc_borrowck/src/type_check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2043,9 +2043,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
20432043

20442044
let ty_fn_ptr_from = tcx.safe_to_unsafe_fn_ty(fn_sig);
20452045

2046-
if let Err(terr) = self.eq_types(
2047-
*ty,
2046+
if let Err(terr) = self.sub_types(
20482047
ty_fn_ptr_from,
2048+
*ty,
20492049
location.to_locations(),
20502050
ConstraintCategory::Cast { unsize_to: None },
20512051
) {

compiler/rustc_const_eval/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
419419
const_eval_unstable_in_stable =
420420
const-stable function cannot use `#[feature({$gate})]`
421421
.unstable_sugg = if it is not part of the public API, make this function unstably const
422-
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
422+
.bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (but requires team approval)
423423
424424
const_eval_unterminated_c_string =
425425
reading a null-terminated string starting at {$pointer} with no null found before end of allocation

compiler/rustc_const_eval/src/interpret/cast.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
388388
let (src_pointee_ty, dest_pointee_ty) =
389389
self.tcx.struct_lockstep_tails_for_codegen(source_ty, cast_ty, self.param_env);
390390

391-
match (&src_pointee_ty.kind(), &dest_pointee_ty.kind()) {
391+
match (src_pointee_ty.kind(), dest_pointee_ty.kind()) {
392392
(&ty::Array(_, length), &ty::Slice(_)) => {
393393
let ptr = self.read_pointer(src)?;
394394
let val = Immediate::new_slice(
@@ -478,9 +478,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
478478
dest: &PlaceTy<'tcx, M::Provenance>,
479479
) -> InterpResult<'tcx> {
480480
trace!("Unsizing {:?} of type {} into {}", *src, src.layout.ty, cast_ty.ty);
481-
match (&src.layout.ty.kind(), &cast_ty.ty.kind()) {
481+
match (src.layout.ty.kind(), cast_ty.ty.kind()) {
482482
(&ty::Ref(_, s, _), &ty::Ref(_, c, _) | &ty::RawPtr(c, _))
483-
| (&ty::RawPtr(s, _), &ty::RawPtr(c, _)) => self.unsize_into_ptr(src, dest, *s, *c),
483+
| (&ty::RawPtr(s, _), &ty::RawPtr(c, _)) => self.unsize_into_ptr(src, dest, s, c),
484484
(&ty::Adt(def_a, _), &ty::Adt(def_b, _)) => {
485485
assert_eq!(def_a, def_b); // implies same number of fields
486486

compiler/rustc_hir/src/def.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,13 @@ pub enum LifetimeRes {
821821
/// This variant is used for anonymous lifetimes that we did not resolve during
822822
/// late resolution. Those lifetimes will be inferred by typechecking.
823823
Infer,
824-
/// Explicit `'static` lifetime.
825-
Static,
824+
/// `'static` lifetime.
825+
Static {
826+
/// We do not want to emit `elided_named_lifetimes`
827+
/// when we are inside of a const item or a static,
828+
/// because it would get too annoying.
829+
suppress_elision_warning: bool,
830+
},
826831
/// Resolution failure.
827832
Error,
828833
/// HACK: This is used to recover the NodeId of an elided lifetime.

compiler/rustc_hir_analysis/src/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
392392
}
393393

394394
fn re_infer(&self, span: Span, reason: RegionInferReason<'_>) -> ty::Region<'tcx> {
395-
if let RegionInferReason::BorrowedObjectLifetimeDefault = reason {
395+
if let RegionInferReason::ObjectLifetimeDefault = reason {
396396
let e = struct_span_code_err!(
397397
self.dcx(),
398398
span,

compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
608608

609609
let mut bound_span_label = |self_ty: Ty<'_>, obligation: &str, quiet: &str| {
610610
let msg = format!("`{}`", if obligation.len() > 50 { quiet } else { obligation });
611-
match &self_ty.kind() {
611+
match self_ty.kind() {
612612
// Point at the type that couldn't satisfy the bound.
613613
ty::Adt(def, _) => {
614614
bound_spans.get_mut_or_insert_default(tcx.def_span(def.did())).push(msg)

compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs

+16-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
1515
///
1616
/// *Bare* trait object types are ones that aren't preceded by the keyword `dyn`.
1717
/// In edition 2021 and onward we emit a hard error for them.
18-
pub(super) fn prohibit_or_lint_bare_trait_object_ty(
19-
&self,
20-
self_ty: &hir::Ty<'_>,
21-
in_path: bool,
22-
) {
18+
pub(super) fn prohibit_or_lint_bare_trait_object_ty(&self, self_ty: &hir::Ty<'_>) {
2319
let tcx = self.tcx();
2420

2521
let hir::TyKind::TraitObject([poly_trait_ref, ..], _, TraitObjectSyntax::None) =
@@ -28,6 +24,21 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2824
return;
2925
};
3026

27+
let in_path = match tcx.parent_hir_node(self_ty.hir_id) {
28+
hir::Node::Ty(hir::Ty {
29+
kind: hir::TyKind::Path(hir::QPath::TypeRelative(qself, _)),
30+
..
31+
})
32+
| hir::Node::Expr(hir::Expr {
33+
kind: hir::ExprKind::Path(hir::QPath::TypeRelative(qself, _)),
34+
..
35+
})
36+
| hir::Node::Pat(hir::Pat {
37+
kind: hir::PatKind::Path(hir::QPath::TypeRelative(qself, _)),
38+
..
39+
}) if qself.hir_id == self_ty.hir_id => true,
40+
_ => false,
41+
};
3142
let needs_bracket = in_path
3243
&& !tcx
3344
.sess

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

+9-27
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,9 @@ pub enum PredicateFilter {
8585

8686
#[derive(Debug)]
8787
pub enum RegionInferReason<'a> {
88-
/// Lifetime on a trait object behind a reference.
89-
/// This allows inferring information from the reference.
90-
BorrowedObjectLifetimeDefault,
91-
/// A trait object's lifetime.
88+
/// Lifetime on a trait object that is spelled explicitly, e.g. `+ 'a` or `+ '_`.
89+
ExplicitObjectLifetime,
90+
/// A trait object's lifetime when it is elided, e.g. `dyn Any`.
9291
ObjectLifetimeDefault,
9392
/// Generic lifetime parameter
9493
Param(&'a ty::GenericParamDef),
@@ -1057,7 +1056,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
10571056

10581057
// Find the type of the associated item, and the trait where the associated
10591058
// item is declared.
1060-
let bound = match (&qself_ty.kind(), qself_res) {
1059+
let bound = match (qself_ty.kind(), qself_res) {
10611060
(_, Res::SelfTyAlias { alias_to: impl_def_id, is_trait_impl: true, .. }) => {
10621061
// `Self` in an impl of a trait -- we have a concrete self type and a
10631062
// trait reference.
@@ -1999,16 +1998,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
19991998
}
20001999
}
20012000

2002-
/// Lower a type from the HIR to our internal notion of a type.
2003-
pub fn lower_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
2004-
self.lower_ty_common(hir_ty, false, false)
2005-
}
2006-
2007-
/// Lower a type inside of a path from the HIR to our internal notion of a type.
2008-
pub fn lower_ty_in_path(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
2009-
self.lower_ty_common(hir_ty, false, true)
2010-
}
2011-
20122001
fn lower_delegation_ty(&self, idx: hir::InferDelegationKind) -> Ty<'tcx> {
20132002
let delegation_sig = self.tcx().inherit_sig_for_delegation_item(self.item_def_id());
20142003
match idx {
@@ -2026,7 +2015,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
20262015
/// 2. `in_path`: Whether the type appears inside of a path.
20272016
/// Used to provide correct diagnostics for bare trait object types.
20282017
#[instrument(level = "debug", skip(self), ret)]
2029-
fn lower_ty_common(&self, hir_ty: &hir::Ty<'tcx>, borrowed: bool, in_path: bool) -> Ty<'tcx> {
2018+
pub fn lower_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
20302019
let tcx = self.tcx();
20312020

20322021
let result_ty = match &hir_ty.kind {
@@ -2036,7 +2025,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
20362025
hir::TyKind::Ref(region, mt) => {
20372026
let r = self.lower_lifetime(region, RegionInferReason::Reference);
20382027
debug!(?r);
2039-
let t = self.lower_ty_common(mt.ty, true, false);
2028+
let t = self.lower_ty(mt.ty);
20402029
Ty::new_ref(tcx, r, t, mt.mutbl)
20412030
}
20422031
hir::TyKind::Never => tcx.types.never,
@@ -2065,20 +2054,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
20652054
)
20662055
}
20672056
hir::TyKind::TraitObject(bounds, lifetime, repr) => {
2068-
self.prohibit_or_lint_bare_trait_object_ty(hir_ty, in_path);
2057+
self.prohibit_or_lint_bare_trait_object_ty(hir_ty);
20692058

20702059
let repr = match repr {
20712060
TraitObjectSyntax::Dyn | TraitObjectSyntax::None => ty::Dyn,
20722061
TraitObjectSyntax::DynStar => ty::DynStar,
20732062
};
2074-
self.lower_trait_object_ty(
2075-
hir_ty.span,
2076-
hir_ty.hir_id,
2077-
bounds,
2078-
lifetime,
2079-
borrowed,
2080-
repr,
2081-
)
2063+
self.lower_trait_object_ty(hir_ty.span, hir_ty.hir_id, bounds, lifetime, repr)
20822064
}
20832065
hir::TyKind::Path(hir::QPath::Resolved(maybe_qself, path)) => {
20842066
debug!(?maybe_qself, ?path);
@@ -2106,7 +2088,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
21062088
}
21072089
hir::TyKind::Path(hir::QPath::TypeRelative(qself, segment)) => {
21082090
debug!(?qself, ?segment);
2109-
let ty = self.lower_ty_common(qself, false, true);
2091+
let ty = self.lower_ty(qself);
21102092
self.lower_assoc_path(hir_ty.hir_id, hir_ty.span, ty, qself, segment, false)
21112093
.map(|(ty, _, _)| ty)
21122094
.unwrap_or_else(|guar| Ty::new_error(tcx, guar))

compiler/rustc_hir_analysis/src/hir_ty_lowering/object_safety.rs

+20-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
3030
hir_id: hir::HirId,
3131
hir_trait_bounds: &[(hir::PolyTraitRef<'tcx>, hir::TraitBoundModifier)],
3232
lifetime: &hir::Lifetime,
33-
borrowed: bool,
3433
representation: DynKind,
3534
) -> Ty<'tcx> {
3635
let tcx = self.tcx();
@@ -325,22 +324,32 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
325324
v.dedup();
326325
let existential_predicates = tcx.mk_poly_existential_predicates(&v);
327326

328-
// Use explicitly-specified region bound.
327+
// Use explicitly-specified region bound, unless the bound is missing.
329328
let region_bound = if !lifetime.is_elided() {
330-
self.lower_lifetime(lifetime, RegionInferReason::ObjectLifetimeDefault)
329+
self.lower_lifetime(lifetime, RegionInferReason::ExplicitObjectLifetime)
331330
} else {
332331
self.compute_object_lifetime_bound(span, existential_predicates).unwrap_or_else(|| {
332+
// Curiously, we prefer object lifetime default for `+ '_`...
333333
if tcx.named_bound_var(lifetime.hir_id).is_some() {
334-
self.lower_lifetime(lifetime, RegionInferReason::ObjectLifetimeDefault)
334+
self.lower_lifetime(lifetime, RegionInferReason::ExplicitObjectLifetime)
335335
} else {
336-
self.re_infer(
337-
span,
338-
if borrowed {
339-
RegionInferReason::ObjectLifetimeDefault
336+
let reason =
337+
if let hir::LifetimeName::ImplicitObjectLifetimeDefault = lifetime.res {
338+
if let hir::Node::Ty(hir::Ty {
339+
kind: hir::TyKind::Ref(parent_lifetime, _),
340+
..
341+
}) = tcx.parent_hir_node(hir_id)
342+
&& tcx.named_bound_var(parent_lifetime.hir_id).is_none()
343+
{
344+
// Parent lifetime must have failed to resolve. Don't emit a redundant error.
345+
RegionInferReason::ExplicitObjectLifetime
346+
} else {
347+
RegionInferReason::ObjectLifetimeDefault
348+
}
340349
} else {
341-
RegionInferReason::BorrowedObjectLifetimeDefault
342-
},
343-
)
350+
RegionInferReason::ExplicitObjectLifetime
351+
};
352+
self.re_infer(span, reason)
344353
}
345354
})
346355
};

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
798798
// to be object-safe.
799799
// We manually call `register_wf_obligation` in the success path
800800
// below.
801-
let ty = self.lowerer().lower_ty_in_path(qself);
801+
let ty = self.lowerer().lower_ty(qself);
802802
(LoweredTy::from_raw(self, span, ty), qself, segment)
803803
}
804804
QPath::LangItem(..) => {

compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2975,7 +2975,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
29752975
let mut suffix_suggestion = sugg.clone();
29762976
suffix_suggestion.push((
29772977
if matches!(
2978-
(&expected_ty.kind(), &checked_ty.kind()),
2978+
(expected_ty.kind(), checked_ty.kind()),
29792979
(ty::Int(_) | ty::Uint(_), ty::Float(_))
29802980
) {
29812981
// Remove fractional part from literal, for example `42.0f32` into `42`
@@ -3077,7 +3077,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
30773077
err.multipart_suggestion_verbose(msg, suggestion, Applicability::MachineApplicable);
30783078
};
30793079

3080-
match (&expected_ty.kind(), &checked_ty.kind()) {
3080+
match (expected_ty.kind(), checked_ty.kind()) {
30813081
(ty::Int(exp), ty::Int(found)) => {
30823082
let (f2e_is_fallible, e2f_is_fallible) = match (exp.bit_width(), found.bit_width())
30833083
{

compiler/rustc_hir_typeck/src/method/suggest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10121012
};
10131013
let mut bound_span_label = |self_ty: Ty<'_>, obligation: &str, quiet: &str| {
10141014
let msg = format!("`{}`", if obligation.len() > 50 { quiet } else { obligation });
1015-
match &self_ty.kind() {
1015+
match self_ty.kind() {
10161016
// Point at the type that couldn't satisfy the bound.
10171017
ty::Adt(def, _) => {
10181018
bound_spans.get_mut_or_insert_default(tcx.def_span(def.did())).push(msg)

compiler/rustc_hir_typeck/src/pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13361336
// More generally, the expected type wants a tuple variant with one field of an
13371337
// N-arity-tuple, e.g., `V_i((p_0, .., p_N))`. Meanwhile, the user supplied a pattern
13381338
// with the subpatterns directly in the tuple variant pattern, e.g., `V_i(p_0, .., p_N)`.
1339-
let missing_parentheses = match (&expected.kind(), fields, had_err) {
1339+
let missing_parentheses = match (expected.kind(), fields, had_err) {
13401340
// #67037: only do this if we could successfully type-check the expected type against
13411341
// the tuple struct pattern. Otherwise the args could get out of range on e.g.,
13421342
// `let P() = U;` where `P != U` with `struct P<T>(T);`.

compiler/rustc_incremental/messages.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,4 @@ incremental_unrecognized_depnode = unrecognized `DepNode` variant: {$name}
9999
100100
incremental_unrecognized_depnode_label = dep-node label `{$label}` not recognized
101101
102-
incremental_write_dep_graph = failed to write dependency graph to `{$path}`: {$err}
103-
104102
incremental_write_new = failed to write {$name} to `{$path}`: {$err}

compiler/rustc_incremental/src/errors.rs

-7
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,6 @@ pub struct LoadDepGraph {
272272
pub err: std::io::Error,
273273
}
274274

275-
#[derive(Diagnostic)]
276-
#[diag(incremental_write_dep_graph)]
277-
pub struct WriteDepGraph<'a> {
278-
pub path: &'a Path,
279-
pub err: std::io::Error,
280-
}
281-
282275
#[derive(Diagnostic)]
283276
#[diag(incremental_move_dep_graph)]
284277
pub struct MoveDepGraph<'a> {

compiler/rustc_lint/messages.ftl

+4
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ lint_duplicate_macro_attribute =
252252
253253
lint_duplicate_matcher_binding = duplicate matcher binding
254254
255+
lint_elided_named_lifetime = elided lifetime has a name
256+
.label_elided = this elided lifetime gets resolved as `{$name}`
257+
.label_named = lifetime `{$name}` declared here
258+
255259
lint_enum_intrinsics_mem_discriminant =
256260
the return value of `mem::discriminant` is unspecified when called with a non-enum type
257261
.note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum

0 commit comments

Comments
 (0)