@@ -521,14 +521,18 @@ impl Handler {
521
521
}
522
522
523
523
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
524
- /// Cancel the builder if warnings cannot be emitted
524
+ ///
525
+ /// The builder will be canceled if warnings cannot be emitted.
525
526
pub fn struct_span_warn ( & self , span : impl Into < MultiSpan > , msg : & str ) -> DiagnosticBuilder < ' _ > {
526
527
let mut result = self . struct_warn ( msg) ;
527
528
result. set_span ( span) ;
528
529
result
529
530
}
530
531
531
532
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
533
+ ///
534
+ /// This will "force" the warning meaning it will not be canceled even
535
+ /// if warnings cannot be emitted.
532
536
pub fn struct_span_force_warn (
533
537
& self ,
534
538
span : impl Into < MultiSpan > ,
@@ -564,7 +568,8 @@ impl Handler {
564
568
}
565
569
566
570
/// Construct a builder at the `Warning` level with the `msg`.
567
- /// Cancel the builder if warnings cannot be emitted
571
+ ///
572
+ /// The builder will be canceled if warnings cannot be emitted.
568
573
pub fn struct_warn ( & self , msg : & str ) -> DiagnosticBuilder < ' _ > {
569
574
let mut result = DiagnosticBuilder :: new ( self , Level :: Warning , msg) ;
570
575
if !self . flags . can_emit_warnings {
@@ -574,6 +579,9 @@ impl Handler {
574
579
}
575
580
576
581
/// Construct a builder at the `Warning` level with the `msg`.
582
+ ///
583
+ /// This will "force" a warning meaning it will not be canceled even
584
+ /// if warnings cannot be emitted.
577
585
pub fn struct_force_warn ( & self , msg : & str ) -> DiagnosticBuilder < ' _ > {
578
586
DiagnosticBuilder :: new ( self , Level :: Warning , msg)
579
587
}
0 commit comments