Add nll_dump_cause helper to Session
This commit is contained in:
parent
508a831dca
commit
95b6148e31
2 changed files with 5 additions and 2 deletions
|
|
@ -437,6 +437,9 @@ impl Session {
|
|||
pub fn print_llvm_passes(&self) -> bool {
|
||||
self.opts.debugging_opts.print_llvm_passes
|
||||
}
|
||||
pub fn nll_dump_cause(&self) -> bool {
|
||||
self.opts.debugging_opts.nll_dump_cause
|
||||
}
|
||||
pub fn emit_end_regions(&self) -> bool {
|
||||
self.opts.debugging_opts.emit_end_regions ||
|
||||
(self.opts.debugging_opts.mir_emit_validate > 0) ||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
|||
.map(|origin| RegionDefinition::new(origin))
|
||||
.collect();
|
||||
|
||||
let nll_dump_cause = ty::tls::with(|tcx| tcx.sess.opts.debugging_opts.nll_dump_cause);
|
||||
let nll_dump_cause = ty::tls::with(|tcx| tcx.sess.nll_dump_cause());
|
||||
|
||||
let mut result = Self {
|
||||
definitions,
|
||||
|
|
@ -1259,7 +1259,7 @@ impl Cause {
|
|||
pub(crate) fn label_diagnostic(&self, mir: &Mir<'_>, diag: &mut DiagnosticBuilder<'_>) {
|
||||
// The cause information is pretty messy. Only dump it as an
|
||||
// internal debugging aid if -Znll-dump-cause is given.
|
||||
let nll_dump_cause = ty::tls::with(|tcx| tcx.sess.opts.debugging_opts.nll_dump_cause);
|
||||
let nll_dump_cause = ty::tls::with(|tcx| tcx.sess.nll_dump_cause());
|
||||
if !nll_dump_cause {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue