Skip to content

Commit

Permalink
[Do not merge] Enable NLL by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Sep 13, 2018
1 parent 994cdd9 commit bed1453
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ impl Default for Options {
incremental: None,
debugging_opts: basic_debugging_options(),
prints: Vec::new(),
borrowck_mode: BorrowckMode::Ast,
borrowck_mode: BorrowckMode::Mir,
cg: basic_codegen_options(),
error_format: ErrorOutputType::default(),
externs: Externs(BTreeMap::new()),
Expand Down Expand Up @@ -1125,7 +1125,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"emit EndRegion as part of MIR; enable transforms that solely process EndRegion"),
borrowck: Option<String> = (None, parse_opt_string, [UNTRACKED],
"select which borrowck is used (`ast`, `mir`, `migrate`, or `compare`)"),
two_phase_borrows: bool = (false, parse_bool, [UNTRACKED],
two_phase_borrows: bool = (true, parse_bool, [UNTRACKED],
"use two-phase reserved/active distinction for `&mut` borrows in MIR borrowck"),
two_phase_beyond_autoref: bool = (false, parse_bool, [UNTRACKED],
"when using two-phase-borrows, allow two phases even for non-autoref `&mut` borrows"),
Expand Down Expand Up @@ -2170,8 +2170,8 @@ pub fn build_session_options_and_crate_config(
}));

let borrowck_mode = match debugging_opts.borrowck.as_ref().map(|s| &s[..]) {
None | Some("ast") => BorrowckMode::Ast,
Some("mir") => BorrowckMode::Mir,
Some("ast") => BorrowckMode::Ast,
None | Some("mir") => BorrowckMode::Mir,
Some("compare") => BorrowckMode::Compare,
Some("migrate") => BorrowckMode::Migrate,
Some(m) => early_error(error_format, &format!("unknown borrowck mode `{}`", m)),
Expand Down

0 comments on commit bed1453

Please sign in to comment.