Added flag to disable user type assertion.
This commit is contained in:
parent
04aeef8d45
commit
447ae7612a
3 changed files with 5 additions and 0 deletions
|
|
@ -1251,6 +1251,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
|||
"choose which RELRO level to use"),
|
||||
nll: bool = (false, parse_bool, [UNTRACKED],
|
||||
"run the non-lexical lifetimes MIR pass"),
|
||||
disable_nll_user_type_assert: bool = (false, parse_bool, [UNTRACKED],
|
||||
"disable user provided type assertion in NLL"),
|
||||
trans_time_graph: bool = (false, parse_bool, [UNTRACKED],
|
||||
"generate a graphical HTML report of time spent in trans and LLVM"),
|
||||
thinlto: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||
|
||||
pub fn user_assert_ty(&mut self, block: BasicBlock, hir_id: hir::HirId,
|
||||
var: NodeId, span: Span) {
|
||||
if self.hir.tcx().sess.opts.debugging_opts.disable_nll_user_type_assert { return; }
|
||||
|
||||
let local_id = self.var_indices[&var];
|
||||
let source_info = self.source_info(span);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// revisions:lexical nll
|
||||
//[nll]compile-flags: -Z disable-nll-user-type-assert
|
||||
#![cfg_attr(nll, feature(nll))]
|
||||
|
||||
#![feature(generators)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue