Skip to main content

charon_lib/ast/
from_rustc.rs

1// This file is automatically generated by `cargo run --bin generate-asts`.
2// Do not edit it by hand.
3
4#![allow(
5    clippy::doc_lazy_continuation,
6    clippy::enum_variant_names,
7    clippy::large_enum_variant
8)]
9
10use crate::ast::meta::Span;
11use derive_generic_visitor::{Drive, DriveMut};
12use serde::{Deserialize, Serialize};
13use ustr::Ustr;
14
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16pub struct FromRustcError;
17
18/// Represents parsed *built-in* inert attributes.
19///
20/// ## Overview
21/// These attributes are markers that guide the compilation process and are never expanded into other code.
22/// They persist throughout the compilation phases, from AST to HIR and beyond.
23///
24/// ## Attribute Processing
25/// While attributes are initially parsed by [`rustc_parse`] into [`ast::Attribute`], they still contain raw token streams
26/// because different attributes have different internal structures. This enum represents the final,
27/// fully parsed form of these attributes, where each variant contains all the information and
28/// structure relevant for the specific attribute.
29///
30/// Some attributes can be applied multiple times to the same item, and they are "collapsed" into a single
31/// semantic attribute. For example:
32/// ```rust
33/// #[repr(C)]
34/// #[repr(packed)]
35/// struct S { }
36/// ```
37/// This is equivalent to `#[repr(C, packed)]` and results in a single [`AttributeKind::Repr`] containing
38/// both `C` and `packed` annotations. This collapsing happens during parsing and is reflected in the
39/// data structures defined in this enum.
40///
41/// ## Usage
42/// These parsed attributes are used throughout the compiler to:
43/// - Control code generation (e.g., `#[repr]`)
44/// - Mark API stability (`#[stable]`, `#[unstable]`)
45/// - Provide documentation (`#[doc]`)
46/// - Guide compiler behavior (e.g., `#[allow_internal_unstable]`)
47///
48/// ## Note on Attribute Organization
49/// Some attributes like `InlineAttr`, `OptimizeAttr`, and `InstructionSetAttr` are defined separately
50/// from this enum because they are used in specific compiler phases (like code generation) and don't
51/// need to persist throughout the entire compilation process. They are typically processed and
52/// converted into their final form earlier in the compilation pipeline.
53///
54/// For example:
55/// - `InlineAttr` is used during code generation to control function inlining
56/// - `OptimizeAttr` is used to control optimization levels
57/// - `InstructionSetAttr` is used for target-specific code generation
58///
59/// These attributes are handled by their respective compiler passes in the [`rustc_codegen_ssa`] crate
60/// and don't need to be preserved in the same way as the attributes in this enum.
61///
62/// For more details on attribute parsing, see the [`rustc_attr_parsing`] crate.
63///
64/// [`rustc_parse`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html
65/// [`rustc_codegen_ssa`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/index.html
66/// [`rustc_attr_parsing`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_attr_parsing/index.html
67#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
68#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcAttributeKind"))]
69#[cfg_attr(
70    feature = "charon_on_charon",
71    charon::variants_prefix("RustcAttributeKind")
72)]
73pub enum AttributeKind {
74    /// Represents `#[automatically_derived]`
75    AutomaticallyDerived,
76    /// Represents `#[cold]`.
77    Cold,
78    /// Represents [`#[deprecated]`](https://doc.rust-lang.org/stable/reference/attributes/diagnostics.html#the-deprecated-attribute).
79    Deprecated {
80        deprecation: Deprecation,
81        span: Span,
82    },
83    /// Represents `#[fundamental]`.
84    Fundamental,
85    /// Represents `#[ignore]`
86    Ignore {
87        span: Span,
88        /// ignore can optionally have a reason: `#[ignore = "reason this is ignored"]`
89        reason: Option<Ustr>,
90    },
91    /// Represents `#[inline]` and `#[rustc_force_inline]`.
92    Inline(InlineAttr, Span),
93    /// Represents [`#[may_dangle]`](https://std-dev-guide.rust-lang.org/tricky/may-dangle.html).
94    MayDangle(Span),
95    /// Represents `#[naked]`
96    Naked(Span),
97    /// Represents `#[no_link]`
98    NoLink,
99    /// Represents `#[no_mangle]`
100    NoMangle(Span),
101    /// Represents `#[non_exhaustive]`
102    NonExhaustive(Span),
103    /// Represents `#[optimize(size|speed)]`
104    Optimize(OptimizeAttr, Span),
105    /// Represents `#[align(N)]`.
106    RustcAlign { align: u64, span: Span },
107    /// Represents `#[rustc_diagnostic_item]`
108    RustcDiagnosticItem(Ustr),
109    /// Represents `#[rustc_intrinsic]`
110    RustcIntrinsic,
111    /// Represents `#[should_panic]`
112    ShouldPanic { reason: Option<Ustr> },
113    /// Represents `#[target_feature(enable = "...")]` and
114    /// `#[unsafe(force_target_feature(enable = "...")]`.
115    TargetFeature {
116        features: Vec<(Ustr, Span)>,
117        attr_span: Span,
118        was_forced: bool,
119    },
120    /// Represents `#[track_caller]`
121    TrackCaller(Span),
122}
123
124/// A representation of all the valid lang items in Rust.
125#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
126#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcLangItem"))]
127#[cfg_attr(feature = "charon_on_charon", charon::variants_prefix("RustcLangItem"))]
128pub enum LangItem {
129    ///The `sized` lang item.
130    Sized,
131    ///The `meta_sized` lang item.
132    MetaSized,
133    ///The `pointee_sized` lang item.
134    PointeeSized,
135    ///The `unsize` lang item.
136    Unsize,
137    ///The `mem_align_const` lang item.
138    AlignOf,
139    ///The `mem_size_const` lang item.
140    SizeOf,
141    ///The `offset_of` lang item.
142    OffsetOf,
143    ///The `structural_peq` lang item.
144    /// Trait injected by `#[derive(PartialEq)]`, (i.e. "Partial EQ").
145    StructuralPeq,
146    ///The `copy` lang item.
147    Copy,
148    ///The `clone` lang item.
149    Clone,
150    ///The `clone_fn` lang item.
151    CloneFn,
152    ///The `use_cloned` lang item.
153    UseCloned,
154    ///The `trivial_clone` lang item.
155    TrivialClone,
156    ///The `sync` lang item.
157    Sync,
158    ///The `discriminant_kind` lang item.
159    DiscriminantKind,
160    ///The `discriminant_type` lang item.
161    /// The associated item of the `DiscriminantKind` trait.
162    Discriminant,
163    ///The `pointee_trait` lang item.
164    PointeeTrait,
165    ///The `metadata_type` lang item.
166    Metadata,
167    ///The `dyn_metadata` lang item.
168    DynMetadata,
169    ///The `freeze` lang item.
170    Freeze,
171    ///The `unsafe_unpin` lang item.
172    UnsafeUnpin,
173    ///The `fn_ptr_trait` lang item.
174    FnPtrTrait,
175    ///The `fn_ptr_addr` lang item.
176    FnPtrAddr,
177    ///The `drop` lang item.
178    Drop,
179    ///The `destruct` lang item.
180    Destruct,
181    ///The `async_drop` lang item.
182    AsyncDrop,
183    ///The `async_drop_in_place` lang item.
184    AsyncDropInPlace,
185    ///The `coerce_unsized` lang item.
186    CoerceUnsized,
187    ///The `dispatch_from_dyn` lang item.
188    DispatchFromDyn,
189    ///The `transmute_opts` lang item.
190    TransmuteOpts,
191    ///The `transmute_trait` lang item.
192    TransmuteTrait,
193    ///The `add` lang item.
194    Add,
195    ///The `sub` lang item.
196    Sub,
197    ///The `mul` lang item.
198    Mul,
199    ///The `div` lang item.
200    Div,
201    ///The `rem` lang item.
202    Rem,
203    ///The `neg` lang item.
204    Neg,
205    ///The `not` lang item.
206    Not,
207    ///The `bitxor` lang item.
208    BitXor,
209    ///The `bitand` lang item.
210    BitAnd,
211    ///The `bitor` lang item.
212    BitOr,
213    ///The `shl` lang item.
214    Shl,
215    ///The `shr` lang item.
216    Shr,
217    ///The `add_assign` lang item.
218    AddAssign,
219    ///The `sub_assign` lang item.
220    SubAssign,
221    ///The `mul_assign` lang item.
222    MulAssign,
223    ///The `div_assign` lang item.
224    DivAssign,
225    ///The `rem_assign` lang item.
226    RemAssign,
227    ///The `bitxor_assign` lang item.
228    BitXorAssign,
229    ///The `bitand_assign` lang item.
230    BitAndAssign,
231    ///The `bitor_assign` lang item.
232    BitOrAssign,
233    ///The `shl_assign` lang item.
234    ShlAssign,
235    ///The `shr_assign` lang item.
236    ShrAssign,
237    ///The `index` lang item.
238    Index,
239    ///The `index_mut` lang item.
240    IndexMut,
241    ///The `unsafe_cell` lang item.
242    UnsafeCell,
243    ///The `unsafe_pinned` lang item.
244    UnsafePinned,
245    ///The `va_arg_safe` lang item.
246    VaArgSafe,
247    ///The `va_list` lang item.
248    VaList,
249    ///The `deref` lang item.
250    Deref,
251    ///The `deref_mut` lang item.
252    DerefMut,
253    ///The `deref_pure` lang item.
254    DerefPure,
255    ///The `deref_target` lang item.
256    DerefTarget,
257    ///The `receiver` lang item.
258    Receiver,
259    ///The `receiver_target` lang item.
260    ReceiverTarget,
261    ///The `legacy_receiver` lang item.
262    LegacyReceiver,
263    ///The `Fn` lang item.
264    Fn,
265    ///The `fn_mut` lang item.
266    FnMut,
267    ///The `fn_once` lang item.
268    FnOnce,
269    ///The `async_fn` lang item.
270    AsyncFn,
271    ///The `async_fn_mut` lang item.
272    AsyncFnMut,
273    ///The `async_fn_once` lang item.
274    AsyncFnOnce,
275    ///The `async_fn_once_output` lang item.
276    AsyncFnOnceOutput,
277    ///The `call_once_future` lang item.
278    CallOnceFuture,
279    ///The `call_ref_future` lang item.
280    CallRefFuture,
281    ///The `async_fn_kind_helper` lang item.
282    AsyncFnKindHelper,
283    ///The `async_fn_kind_upvars` lang item.
284    AsyncFnKindUpvars,
285    ///The `fn_once_output` lang item.
286    FnOnceOutput,
287    ///The `iterator` lang item.
288    Iterator,
289    ///The `fused_iterator` lang item.
290    FusedIterator,
291    ///The `future_trait` lang item.
292    Future,
293    ///The `future_output` lang item.
294    FutureOutput,
295    ///The `async_iterator` lang item.
296    AsyncIterator,
297    ///The `coroutine_state` lang item.
298    CoroutineState,
299    ///The `coroutine` lang item.
300    Coroutine,
301    ///The `coroutine_return` lang item.
302    CoroutineReturn,
303    ///The `coroutine_yield` lang item.
304    CoroutineYield,
305    ///The `coroutine_resume` lang item.
306    CoroutineResume,
307    ///The `unpin` lang item.
308    Unpin,
309    ///The `pin` lang item.
310    Pin,
311    ///The `Ordering` lang item.
312    OrderingEnum,
313    ///The `eq` lang item.
314    PartialEq,
315    ///The `partial_ord` lang item.
316    PartialOrd,
317    ///The `c_void` lang item.
318    CVoid,
319    ///The `type_info` lang item.
320    Type,
321    ///The `type_id` lang item.
322    TypeId,
323    ///The `panic` lang item.
324    Panic,
325    ///The `panic_nounwind` lang item.
326    PanicNounwind,
327    ///The `panic_fmt` lang item.
328    PanicFmt,
329    ///The `panic_display` lang item.
330    PanicDisplay,
331    ///The `const_panic_fmt` lang item.
332    ConstPanicFmt,
333    ///The `panic_bounds_check` lang item.
334    PanicBoundsCheck,
335    ///The `panic_misaligned_pointer_dereference` lang item.
336    PanicMisalignedPointerDereference,
337    ///The `panic_info` lang item.
338    PanicInfo,
339    ///The `panic_location` lang item.
340    PanicLocation,
341    ///The `panic_impl` lang item.
342    PanicImpl,
343    ///The `panic_cannot_unwind` lang item.
344    PanicCannotUnwind,
345    ///The `panic_in_cleanup` lang item.
346    PanicInCleanup,
347    ///The `panic_const_add_overflow` lang item.
348    /// Constant panic messages, used for codegen of MIR asserts.
349    PanicAddOverflow,
350    ///The `panic_const_sub_overflow` lang item.
351    PanicSubOverflow,
352    ///The `panic_const_mul_overflow` lang item.
353    PanicMulOverflow,
354    ///The `panic_const_div_overflow` lang item.
355    PanicDivOverflow,
356    ///The `panic_const_rem_overflow` lang item.
357    PanicRemOverflow,
358    ///The `panic_const_neg_overflow` lang item.
359    PanicNegOverflow,
360    ///The `panic_const_shr_overflow` lang item.
361    PanicShrOverflow,
362    ///The `panic_const_shl_overflow` lang item.
363    PanicShlOverflow,
364    ///The `panic_const_div_by_zero` lang item.
365    PanicDivZero,
366    ///The `panic_const_rem_by_zero` lang item.
367    PanicRemZero,
368    ///The `panic_const_coroutine_resumed` lang item.
369    PanicCoroutineResumed,
370    ///The `panic_const_async_fn_resumed` lang item.
371    PanicAsyncFnResumed,
372    ///The `panic_const_async_gen_fn_resumed` lang item.
373    PanicAsyncGenFnResumed,
374    ///The `panic_const_gen_fn_none` lang item.
375    PanicGenFnNone,
376    ///The `panic_const_coroutine_resumed_panic` lang item.
377    PanicCoroutineResumedPanic,
378    ///The `panic_const_async_fn_resumed_panic` lang item.
379    PanicAsyncFnResumedPanic,
380    ///The `panic_const_async_gen_fn_resumed_panic` lang item.
381    PanicAsyncGenFnResumedPanic,
382    ///The `panic_const_gen_fn_none_panic` lang item.
383    PanicGenFnNonePanic,
384    ///The `panic_null_pointer_dereference` lang item.
385    PanicNullPointerDereference,
386    ///The `panic_invalid_enum_construction` lang item.
387    PanicInvalidEnumConstruction,
388    ///The `panic_const_coroutine_resumed_drop` lang item.
389    PanicCoroutineResumedDrop,
390    ///The `panic_const_async_fn_resumed_drop` lang item.
391    PanicAsyncFnResumedDrop,
392    ///The `panic_const_async_gen_fn_resumed_drop` lang item.
393    PanicAsyncGenFnResumedDrop,
394    ///The `panic_const_gen_fn_none_drop` lang item.
395    PanicGenFnNoneDrop,
396    ///The `begin_panic` lang item.
397    /// libstd panic entry point. Necessary for const eval to be able to catch it
398    BeginPanic,
399    ///The `format_argument` lang item.
400    FormatArgument,
401    ///The `format_arguments` lang item.
402    FormatArguments,
403    ///The `drop_glue` lang item.
404    DropGlue,
405    ///The `alloc_layout` lang item.
406    AllocLayout,
407    ///The `start` lang item.
408    /// For all binary crates without `#![no_main]`, Rust will generate a "main" function.
409    /// The exact name and signature are target-dependent. The "main" function will invoke
410    /// this lang item, passing it the `argc` and `argv` (or null, if those don't exist
411    /// on the current target) as well as the user-defined `fn main` from the binary crate.
412    Start,
413    ///The `eh_personality` lang item.
414    EhPersonality,
415    ///The `eh_catch_typeinfo` lang item.
416    EhCatchTypeinfo,
417    ///The `compiler_move` lang item.
418    CompilerMove,
419    ///The `compiler_copy` lang item.
420    CompilerCopy,
421    ///The `owned_box` lang item.
422    OwnedBox,
423    ///The `global_alloc_ty` lang item.
424    GlobalAlloc,
425    ///The `phantom_data` lang item.
426    PhantomData,
427    ///The `manually_drop` lang item.
428    ManuallyDrop,
429    ///The `maybe_dangling` lang item.
430    MaybeDangling,
431    ///The `bikeshed_guaranteed_no_drop` lang item.
432    BikeshedGuaranteedNoDrop,
433    ///The `maybe_uninit` lang item.
434    MaybeUninit,
435    ///The `termination` lang item.
436    Termination,
437    ///The `Try` lang item.
438    Try,
439    ///The `tuple_trait` lang item.
440    Tuple,
441    ///The `slice_len_fn` lang item.
442    SliceLen,
443    ///The `from_residual` lang item.
444    TryTraitFromResidual,
445    ///The `from_output` lang item.
446    TryTraitFromOutput,
447    ///The `branch` lang item.
448    TryTraitBranch,
449    ///The `from_yeet` lang item.
450    TryTraitFromYeet,
451    ///The `into_try_type` lang item.
452    ResidualIntoTryType,
453    ///The `coerce_pointee_validated` lang item.
454    CoercePointeeValidated,
455    ///The `const_param_ty` lang item.
456    ConstParamTy,
457    ///The `Poll` lang item.
458    Poll,
459    ///The `Ready` lang item.
460    PollReady,
461    ///The `Pending` lang item.
462    PollPending,
463    ///The `AsyncGenReady` lang item.
464    AsyncGenReady,
465    ///The `AsyncGenPending` lang item.
466    AsyncGenPending,
467    ///The `AsyncGenFinished` lang item.
468    AsyncGenFinished,
469    ///The `ResumeTy` lang item.
470    ResumeTy,
471    ///The `get_context` lang item.
472    GetContext,
473    ///The `Context` lang item.
474    Context,
475    ///The `poll` lang item.
476    FuturePoll,
477    ///The `async_iterator_poll_next` lang item.
478    AsyncIteratorPollNext,
479    ///The `into_async_iter_into_iter` lang item.
480    IntoAsyncIterIntoIter,
481    ///The `Option` lang item.
482    Option,
483    ///The `Some` lang item.
484    OptionSome,
485    ///The `None` lang item.
486    OptionNone,
487    ///The `Ok` lang item.
488    ResultOk,
489    ///The `Err` lang item.
490    ResultErr,
491    ///The `Continue` lang item.
492    ControlFlowContinue,
493    ///The `Break` lang item.
494    ControlFlowBreak,
495    ///The `into_future` lang item.
496    IntoFutureIntoFuture,
497    ///The `into_iter` lang item.
498    IntoIterIntoIter,
499    ///The `next` lang item.
500    IteratorNext,
501    ///The `new_unchecked` lang item.
502    PinNewUnchecked,
503    ///The `RangeFrom` lang item.
504    RangeFrom,
505    ///The `RangeFull` lang item.
506    RangeFull,
507    ///The `RangeInclusive` lang item.
508    RangeInclusiveStruct,
509    ///The `range_inclusive_new` lang item.
510    RangeInclusiveNew,
511    ///The `Range` lang item.
512    Range,
513    ///The `RangeToInclusive` lang item.
514    RangeToInclusive,
515    ///The `RangeTo` lang item.
516    RangeTo,
517    ///The `RangeMax` lang item.
518    RangeMax,
519    ///The `RangeMin` lang item.
520    RangeMin,
521    ///The `RangeSub` lang item.
522    RangeSub,
523    ///The `RangeFromCopy` lang item.
524    RangeFromCopy,
525    ///The `RangeCopy` lang item.
526    RangeCopy,
527    ///The `RangeInclusiveCopy` lang item.
528    RangeInclusiveCopy,
529    ///The `RangeToInclusiveCopy` lang item.
530    RangeToInclusiveCopy,
531    ///The `String` lang item.
532    String,
533    ///The `CStr` lang item.
534    CStr,
535    ///The `contract_build_check_ensures` lang item.
536    ContractBuildCheckEnsures,
537    ///The `contract_check_requires` lang item.
538    ContractCheckRequires,
539    ///The `default_trait4` lang item.
540    DefaultTrait4,
541    ///The `default_trait3` lang item.
542    DefaultTrait3,
543    ///The `default_trait2` lang item.
544    DefaultTrait2,
545    ///The `default_trait1` lang item.
546    DefaultTrait1,
547    ///The `contract_check_ensures` lang item.
548    ContractCheckEnsures,
549    ///The `reborrow` lang item.
550    Reborrow,
551    ///The `coerce_shared` lang item.
552    CoerceShared,
553    ///The `field_representing_type` lang item.
554    FieldRepresentingType,
555    ///The `field` lang item.
556    Field,
557    ///The `field_base` lang item.
558    FieldBase,
559    ///The `field_type` lang item.
560    FieldType,
561    ///The `field_offset` lang item.
562    FieldOffset,
563    ///The `From` lang item.
564    From,
565}
566
567#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
568#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcDeprecation"))]
569pub struct Deprecation {
570    pub since: DeprecatedSince,
571    /// The note to issue a reason.
572    pub note: Option<Ident>,
573    /// A text snippet used to completely replace any use of the deprecated item in an expression.
574    ///
575    /// This is currently unstable.
576    pub suggestion: Option<Ustr>,
577}
578
579#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
580#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcInlineAttr"))]
581#[cfg_attr(
582    feature = "charon_on_charon",
583    charon::variants_prefix("RustcInlineAttr")
584)]
585pub enum InlineAttr {
586    None,
587    Hint,
588    Always,
589    Never,
590    /// `#[rustc_force_inline]` forces inlining to happen in the MIR inliner - it reports an error
591    /// if the inlining cannot happen. It is limited to only free functions so that the calls
592    /// can always be resolved.
593    Force {
594        attr_span: Span,
595        reason: Option<Ustr>,
596    },
597}
598
599#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
600#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcOptimizeAttr"))]
601#[cfg_attr(
602    feature = "charon_on_charon",
603    charon::variants_prefix("RustcOptimizeAttr")
604)]
605pub enum OptimizeAttr {
606    /// No `#[optimize(..)]` attribute
607    Default,
608    /// `#[optimize(none)]`
609    DoNotOptimize,
610    /// `#[optimize(speed)]`
611    Speed,
612    /// `#[optimize(size)]`
613    Size,
614}
615
616/// Release in which an API is deprecated.
617#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
618#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcDeprecatedSince"))]
619#[cfg_attr(
620    feature = "charon_on_charon",
621    charon::variants_prefix("RustcDeprecatedSince")
622)]
623pub enum DeprecatedSince {
624    RustcVersion(RustcVersion),
625    /// Deprecated in the future ("to be determined").
626    Future,
627    /// `feature(staged_api)` is off. Deprecation versions outside the standard
628    /// library are allowed to be arbitrary strings, for better or worse.
629    NonStandard(Ustr),
630    /// Deprecation version is unspecified but optional.
631    Unspecified,
632    /// Failed to parse a deprecation version, or the deprecation version is
633    /// unspecified and required. An error has already been emitted.
634    Err,
635}
636
637#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
638#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcIdent"))]
639pub struct Ident {
640    /// `name` should never be the empty symbol. If you are considering that,
641    /// you are probably conflating "empty identifier with "no identifier" and
642    /// you should use `Option<Ident>` instead.
643    /// Trying to construct an `Ident` with an empty name will trigger debug assertions.
644    pub name: Ustr,
645    pub span: Span,
646}
647
648#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Drive, DriveMut)]
649#[cfg_attr(feature = "charon_on_charon", charon::rename("RustcRustcVersion"))]
650pub struct RustcVersion {
651    pub major: u16,
652    pub minor: u16,
653    pub patch: u16,
654}