Skip to content

Commit 867fb8d

Browse files
committed
FRTs & symbol names
1 parent 3ce340a commit 867fb8d

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,10 @@ pub(crate) fn encode_ty<'tcx>(
504504
typeid.push_str(&s);
505505
}
506506

507+
ty::Field(..) => todo!(
508+
"FIXME(field_projections): no idea what to do here, probably not supported in ABI?"
509+
),
510+
507511
ty::Foreign(def_id) => {
508512
// <length><name>, where <name> is <unscoped-name>
509513
let mut s = String::new();

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for TransformTy<'tcx> {
183183
}
184184
}
185185

186+
ty::Field(..) => todo!(
187+
"FIXME(field_projections): no idea what to do here, probably don't need to handle field types here?"
188+
),
189+
186190
ty::Ref(..) => {
187191
if self.options.contains(TransformTyOptions::GENERALIZE_POINTERS) {
188192
if t.is_mutable_ptr() {

compiler/rustc_symbol_mangling/src/export.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ impl<'tcx> AbiHashStable<'tcx> for Ty<'tcx> {
6262
ty::Uint(uint_ty) => uint_ty.name_str().abi_hash(tcx, hasher),
6363
ty::Float(float_ty) => float_ty.name_str().abi_hash(tcx, hasher),
6464

65+
ty::Field(..) => todo!("FIXME(field_projections): no idea what to do here"),
66+
6567
ty::Adt(adt_def, args) => {
6668
adt_def.is_struct().abi_hash(tcx, hasher);
6769
adt_def.is_enum().abi_hash(tcx, hasher);

compiler/rustc_symbol_mangling/src/v0.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ impl<'tcx> Printer<'tcx> for V0SymbolMangler<'tcx> {
521521
self.push("E");
522522
}
523523

524+
ty::Field(..) => todo!("FIXME(field_projections): no idea what to do here"),
524525
// Mangle all nominal types as paths.
525526
ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), args)
526527
| ty::FnDef(def_id, args)

tests/ui/symbol-names/basic.legacy.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: symbol-name(_ZN5basic4main17h1dddcfd03744167fE)
1+
error: symbol-name(_ZN5basic4main17h9dcd691dfd66f09dE)
22
--> $DIR/basic.rs:8:1
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: demangling(basic::main::h1dddcfd03744167f)
7+
error: demangling(basic::main::h9dcd691dfd66f09d)
88
--> $DIR/basic.rs:8:1
99
|
1010
LL | #[rustc_symbol_name]

tests/ui/symbol-names/issue-60925.legacy.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h4b3099ec5dc5d306E)
1+
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h0c5a913a7866cf0eE)
22
--> $DIR/issue-60925.rs:21:9
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h4b3099ec5dc5d306)
7+
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h0c5a913a7866cf0e)
88
--> $DIR/issue-60925.rs:21:9
99
|
1010
LL | #[rustc_symbol_name]

0 commit comments

Comments
 (0)