@@ -219,6 +219,29 @@ pub enum CoverageLevel {
219219 Condition ,
220220}
221221
222+ /// The different settings that the `-Z annotate-moves` flag can have.
223+ #[ derive( Clone , Copy , PartialEq , Hash , Debug ) ]
224+ pub enum AnnotateMoves {
225+ /// `-Z annotate-moves=no` (or `off`, `false` etc.)
226+ Disabled ,
227+ /// `-Z annotate-moves` or `-Z annotate-moves=yes` (use default size limit)
228+ /// `-Z annotate-moves=SIZE` (use specified size limit)
229+ Enabled ( Option < u64 > ) ,
230+ }
231+
232+ impl AnnotateMoves {
233+ pub fn is_enabled ( & self ) -> bool {
234+ matches ! ( self , AnnotateMoves :: Enabled ( _) )
235+ }
236+
237+ pub fn size_limit ( & self ) -> Option < u64 > {
238+ match self {
239+ AnnotateMoves :: Disabled => None ,
240+ AnnotateMoves :: Enabled ( limit) => * limit,
241+ }
242+ }
243+ }
244+
222245// The different settings that the `-Z offload` flag can have.
223246#[ derive( Clone , Copy , PartialEq , Hash , Debug ) ]
224247pub enum Offload {
@@ -3227,13 +3250,13 @@ pub(crate) mod dep_tracking {
32273250 } ;
32283251
32293252 use super :: {
3230- AutoDiff , BranchProtection , CFGuard , CFProtection , CollapseMacroDebuginfo , CoverageOptions ,
3231- CrateType , DebugInfo , DebugInfoCompression , ErrorOutputType , FmtDebug , FunctionReturn ,
3232- InliningThreshold , InstrumentCoverage , InstrumentXRay , LinkerPluginLto , LocationDetail ,
3233- LtoCli , MirStripDebugInfo , NextSolverConfig , Offload , OomStrategy , OptLevel , OutFileName ,
3234- OutputType , OutputTypes , PatchableFunctionEntry , Polonius , RemapPathScopeComponents ,
3235- ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind , SwitchWithOptPath ,
3236- SymbolManglingVersion , WasiExecModel ,
3253+ AnnotateMoves , AutoDiff , BranchProtection , CFGuard , CFProtection , CollapseMacroDebuginfo ,
3254+ CoverageOptions , CrateType , DebugInfo , DebugInfoCompression , ErrorOutputType , FmtDebug ,
3255+ FunctionReturn , InliningThreshold , InstrumentCoverage , InstrumentXRay , LinkerPluginLto ,
3256+ LocationDetail , LtoCli , MirStripDebugInfo , NextSolverConfig , Offload , OomStrategy ,
3257+ OptLevel , OutFileName , OutputType , OutputTypes , PatchableFunctionEntry , Polonius ,
3258+ RemapPathScopeComponents , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind ,
3259+ SwitchWithOptPath , SymbolManglingVersion , WasiExecModel ,
32373260 } ;
32383261 use crate :: lint;
32393262 use crate :: utils:: NativeLib ;
@@ -3276,6 +3299,7 @@ pub(crate) mod dep_tracking {
32763299
32773300 impl_dep_tracking_hash_via_hash ! (
32783301 ( ) ,
3302+ AnnotateMoves ,
32793303 AutoDiff ,
32803304 Offload ,
32813305 bool ,
0 commit comments