Skip to content

Commit 7a4bc5d

Browse files
committed
Update Debug repr of ObjectLifetimeDefault::Empty
to align with its actual name
1 parent cb043b9 commit 7a4bc5d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/rustc_passes/src/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
695695
let hir::GenericParamKind::Type { .. } = p.kind else { continue };
696696
let default = tcx.object_lifetime_default(p.def_id);
697697
let repr = match default {
698-
ObjectLifetimeDefault::Empty => "BaseDefault".to_owned(),
698+
ObjectLifetimeDefault::Empty => "Empty".to_owned(),
699699
ObjectLifetimeDefault::Static => "'static".to_owned(),
700700
ObjectLifetimeDefault::Param(def_id) => tcx.item_name(def_id).to_string(),
701701
ObjectLifetimeDefault::Ambiguous => "Ambiguous".to_owned(),

tests/ui/object-lifetime/object-lifetime-default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
#[rustc_object_lifetime_default]
44
struct A<
5-
T, //~ ERROR BaseDefault
5+
T, //~ ERROR Empty
66
>(T);
77

88
#[rustc_object_lifetime_default]
99
struct B<
1010
'a,
11-
T, //~ ERROR BaseDefault
11+
T, //~ ERROR Empty
1212
>(&'a (), T);
1313

1414
#[rustc_object_lifetime_default]

tests/ui/object-lifetime/object-lifetime-default.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: BaseDefault
1+
error: Empty
22
--> $DIR/object-lifetime-default.rs:5:5
33
|
44
LL | T,
55
| ^
66

7-
error: BaseDefault
7+
error: Empty
88
--> $DIR/object-lifetime-default.rs:11:5
99
|
1010
LL | T,

0 commit comments

Comments
 (0)