@@ -229,8 +229,7 @@ The offset returned for a nested path is relative to the root carrier type,
229229
230230On BPF targets with BTF-capable backend support and debug info enabled, these
231231queries lower to CO-RE relocations. On targets or backends without BTF
232- relocation support, they fall back to the current compilation unit's ordinary
233- layout information.
232+ relocation support, they emit a compile error.
234233
235234## Reference-level explanation
236235[ reference-level-explanation ] : #reference-level-explanation
@@ -258,9 +257,7 @@ kinds.
258257
259258A ` #[repr(Btf)] ` type uses C-compatible field layout. In compiler terms,
260259` repr(Btf) ` implies the layout constraints of ` repr(C) ` and also marks the type
261- as BTF-relocatable. This gives the backend stable field ordering and offsets for
262- the compile-time fallback while preserving a distinct marker for type checking
263- and codegen.
260+ as BTF-relocatable.
264261
265262Direct field projection from a ` #[repr(Btf)] ` ADT is rejected. This includes
266263projections reached through autoderef:
@@ -334,18 +331,10 @@ The result of the LLVM intrinsic is an integer value. Offset and size queries
334331are zero-extended to ` usize ` . Existence queries are compared against zero and
335332return ` bool ` .
336333
337- If the target, backend, or codegen mode cannot emit BTF field relocations, the
338- field-info queries fall back to ordinary layout-computed values:
339-
340- * ` field_byte_offset! ` returns the complete field-path offset from the
341- current compilation layout.
342- * ` field_byte_size! ` returns the field size from the current compilation
343- layout.
344- * ` field_exists! ` returns ` true ` for a field path present in the current
345- compilation layout.
346-
347334BTF CO-RE relocation emission is only meaningful for BPF targets, and it
348- requires the debug metadata used to describe the relevant types.
335+ requires the debug metadata used to describe the relevant types. If the target,
336+ backend, or codegen mode cannot emit BTF field relocations, a compile error
337+ should be emitted.
349338
350339## Drawbacks
351340[ drawbacks ] : #drawbacks
0 commit comments