diff options
| author | bors <bors@rust-lang.org> | 2016-05-18 21:19:07 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-18 21:19:07 -0700 |
| commit | 0c5d651d0bb9e0471795bd743c8ecfd8f9a89844 (patch) | |
| tree | 21cd95b19248dbff4d36634c6922fcb40463e765 /src/libsyntax/errors/mod.rs | |
| parent | 9c6904ca1e4ab95f6c48973dea718326735ad564 (diff) | |
| parent | b0a317dc6f8f9ecc973645f2d00f304f96eaf8b8 (diff) | |
| download | rust-0c5d651d0bb9e0471795bd743c8ecfd8f9a89844.tar.gz rust-0c5d651d0bb9e0471795bd743c8ecfd8f9a89844.zip | |
Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakis
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
Diffstat (limited to 'src/libsyntax/errors/mod.rs')
| -rw-r--r-- | src/libsyntax/errors/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs index 2ca61ba76d4..f06672fe111 100644 --- a/src/libsyntax/errors/mod.rs +++ b/src/libsyntax/errors/mod.rs @@ -699,13 +699,13 @@ pub fn expect<T, M>(diag: &Handler, opt: Option<T>, msg: M) -> T where /// /// FIXME(#33240) #[cfg(not(test))] -fn check_old_skool() -> bool { +pub fn check_old_skool() -> bool { use std::env; env::var("RUST_NEW_ERROR_FORMAT").is_err() } /// For unit tests, use the new format. #[cfg(test)] -fn check_old_skool() -> bool { +pub fn check_old_skool() -> bool { false } |
