@@ -314,14 +314,14 @@ pub(crate) struct InteriorMutableBorrowEscaping {
314314 "this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
315315 If your compilation actually takes a long time, you can safely allow the lint"
316316) ]
317- pub struct LongRunning {
317+ pub ( crate ) struct LongRunning {
318318 #[ help( "the constant being evaluated" ) ]
319319 pub item_span : Span ,
320320}
321321
322322#[ derive( Diagnostic ) ]
323323#[ diag( "constant evaluation is taking a long time" ) ]
324- pub struct LongRunningWarn {
324+ pub ( crate ) struct LongRunningWarn {
325325 #[ primary_span]
326326 #[ label( "the const evaluator is currently interpreting this expression" ) ]
327327 pub span : Span ,
@@ -339,7 +339,7 @@ pub(crate) struct NonConstImplNote {
339339}
340340
341341#[ derive( Clone ) ]
342- pub struct FrameNote {
342+ pub ( crate ) struct FrameNote {
343343 pub span : Span ,
344344 pub times : i32 ,
345345 pub where_ : & ' static str ,
@@ -377,7 +377,7 @@ impl Subdiagnostic for FrameNote {
377377
378378#[ derive( Subdiagnostic ) ]
379379#[ note( r#"the raw bytes of the constant (size: {$size}, align: {$align}) {"{"}{$bytes}{"}"}"# ) ]
380- pub struct RawBytesNote {
380+ pub ( crate ) struct RawBytesNote {
381381 pub size : u64 ,
382382 pub align : u64 ,
383383 pub bytes : String ,
@@ -393,7 +393,7 @@ pub struct RawBytesNote {
393393}s"#
394394) ]
395395#[ note( "`{$ty}` cannot be compared in compile-time, and therefore cannot be used in `match`es" ) ]
396- pub struct NonConstMatchEq < ' tcx > {
396+ pub ( crate ) struct NonConstMatchEq < ' tcx > {
397397 #[ primary_span]
398398 pub span : Span ,
399399 pub ty : Ty < ' tcx > ,
@@ -408,7 +408,7 @@ pub struct NonConstMatchEq<'tcx> {
408408 [const_fn] constant function
409409 *[other] {""}
410410}s"# , code = E0015 ) ]
411- pub struct NonConstForLoopIntoIter < ' tcx > {
411+ pub ( crate ) struct NonConstForLoopIntoIter < ' tcx > {
412412 #[ primary_span]
413413 pub span : Span ,
414414 pub ty : Ty < ' tcx > ,
@@ -423,7 +423,7 @@ pub struct NonConstForLoopIntoIter<'tcx> {
423423 [const_fn] constant function
424424 *[other] {""}
425425}s"# , code = E0015 ) ]
426- pub struct NonConstQuestionBranch < ' tcx > {
426+ pub ( crate ) struct NonConstQuestionBranch < ' tcx > {
427427 #[ primary_span]
428428 pub span : Span ,
429429 pub ty : Ty < ' tcx > ,
@@ -438,7 +438,7 @@ pub struct NonConstQuestionBranch<'tcx> {
438438 [const_fn] constant function
439439 *[other] {""}
440440}s"# , code = E0015 ) ]
441- pub struct NonConstQuestionFromResidual < ' tcx > {
441+ pub ( crate ) struct NonConstQuestionFromResidual < ' tcx > {
442442 #[ primary_span]
443443 pub span : Span ,
444444 pub ty : Ty < ' tcx > ,
@@ -453,7 +453,7 @@ pub struct NonConstQuestionFromResidual<'tcx> {
453453 [const_fn] constant function
454454 *[other] {""}
455455}s"# , code = E0015 ) ]
456- pub struct NonConstTryBlockFromOutput < ' tcx > {
456+ pub ( crate ) struct NonConstTryBlockFromOutput < ' tcx > {
457457 #[ primary_span]
458458 pub span : Span ,
459459 pub ty : Ty < ' tcx > ,
@@ -468,7 +468,7 @@ pub struct NonConstTryBlockFromOutput<'tcx> {
468468 [const_fn] constant function
469469 *[other] {""}
470470}s"# , code = E0015 ) ]
471- pub struct NonConstAwait < ' tcx > {
471+ pub ( crate ) struct NonConstAwait < ' tcx > {
472472 #[ primary_span]
473473 pub span : Span ,
474474 pub ty : Ty < ' tcx > ,
@@ -483,7 +483,7 @@ pub struct NonConstAwait<'tcx> {
483483 [const_fn] constant function
484484 *[other] {""}
485485}s"# , code = E0015 ) ]
486- pub struct NonConstClosure {
486+ pub ( crate ) struct NonConstClosure {
487487 #[ primary_span]
488488 pub span : Span ,
489489 pub kind : ConstContext ,
@@ -499,14 +499,14 @@ pub struct NonConstClosure {
499499 [const_fn] constant function
500500 *[other] {""}
501501}s"# , code = E0015 ) ]
502- pub struct NonConstCVariadicCall {
502+ pub ( crate ) struct NonConstCVariadicCall {
503503 #[ primary_span]
504504 pub span : Span ,
505505 pub kind : ConstContext ,
506506}
507507
508508#[ derive( Subdiagnostic ) ]
509- pub enum NonConstClosureNote {
509+ pub ( crate ) enum NonConstClosureNote {
510510 #[ note( "function defined here, but it is not `const`" ) ]
511511 FnDef {
512512 #[ primary_span]
@@ -534,7 +534,7 @@ pub enum NonConstClosureNote {
534534
535535#[ derive( Subdiagnostic ) ]
536536#[ multipart_suggestion( "consider dereferencing here" , applicability = "machine-applicable" ) ]
537- pub struct ConsiderDereferencing {
537+ pub ( crate ) struct ConsiderDereferencing {
538538 pub deref : String ,
539539 #[ suggestion_part( code = "{deref}" ) ]
540540 pub span : Span ,
@@ -549,7 +549,7 @@ pub struct ConsiderDereferencing {
549549 [const_fn] constant function
550550 *[other] {""}
551551}s"# , code = E0015 ) ]
552- pub struct NonConstOperator {
552+ pub ( crate ) struct NonConstOperator {
553553 #[ primary_span]
554554 pub span : Span ,
555555 pub kind : ConstContext ,
@@ -566,7 +566,7 @@ pub struct NonConstOperator {
566566 *[other] {""}
567567}s"# , code = E0015 ) ]
568568#[ note( "attempting to deref into `{$target_ty}`" ) ]
569- pub struct NonConstDerefCoercion < ' tcx > {
569+ pub ( crate ) struct NonConstDerefCoercion < ' tcx > {
570570 #[ primary_span]
571571 pub span : Span ,
572572 pub ty : Ty < ' tcx > ,
@@ -579,7 +579,7 @@ pub struct NonConstDerefCoercion<'tcx> {
579579
580580#[ derive( Diagnostic ) ]
581581#[ diag( "destructor of `{$dropped_ty}` cannot be evaluated at compile-time" , code = E0493 ) ]
582- pub struct LiveDrop < ' tcx > {
582+ pub ( crate ) struct LiveDrop < ' tcx > {
583583 #[ primary_span]
584584 #[ label(
585585 r#"the destructor for this type cannot be evaluated in {$kind ->
0 commit comments