about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-06 14:50:14 +0000
committerbors <bors@rust-lang.org>2018-01-06 14:50:14 +0000
commit72176cf96cb79a0ebf62972b76dbe68c933bef4d (patch)
tree700594b27355c4c9c7a708d9a1e16c9c0ff90293 /src/libsyntax
parenta9a03d9bfb0e82322439fe6c252ebd4ba6f23d98 (diff)
parentfcdca7f2da86111704e54e932f3e5ffa31d70366 (diff)
downloadrust-72176cf96cb79a0ebf62972b76dbe68c933bef4d.tar.gz
rust-72176cf96cb79a0ebf62972b76dbe68c933bef4d.zip
Auto merge of #47141 - alexcrichton:bump-bootstrap, r=alexcrichton
Bump to 1.25.0

* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
  the beta branch but needed to go to the master branch as well.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/diagnostics/metadata.rs11
-rw-r--r--src/libsyntax/lib.rs1
2 files changed, 7 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostics/metadata.rs b/src/libsyntax/diagnostics/metadata.rs
index 5f06475919f..dc01a79190b 100644
--- a/src/libsyntax/diagnostics/metadata.rs
+++ b/src/libsyntax/diagnostics/metadata.rs
@@ -14,9 +14,10 @@
 //! currently always a crate name.
 
 use std::collections::BTreeMap;
-use std::path::PathBuf;
+use std::env;
 use std::fs::{remove_file, create_dir_all, File};
 use std::io::Write;
+use std::path::PathBuf;
 use std::error::Error;
 use rustc_serialize::json::as_json;
 
@@ -24,9 +25,6 @@ use syntax_pos::{Span, FileName};
 use ext::base::ExtCtxt;
 use diagnostics::plugin::{ErrorMap, ErrorInfo};
 
-// Default metadata directory to use for extended error JSON.
-const ERROR_METADATA_PREFIX: &'static str = "tmp/extended-errors";
-
 /// JSON encodable/decodable version of `ErrorInfo`.
 #[derive(PartialEq, RustcDecodable, RustcEncodable)]
 pub struct ErrorMetadata {
@@ -59,7 +57,10 @@ impl ErrorLocation {
 ///
 /// See `output_metadata`.
 pub fn get_metadata_dir(prefix: &str) -> PathBuf {
-    PathBuf::from(ERROR_METADATA_PREFIX).join(prefix)
+    env::var_os("RUSTC_ERROR_METADATA_DST")
+        .map(PathBuf::from)
+        .expect("env var `RUSTC_ERROR_METADATA_DST` isn't set")
+        .join(prefix)
 }
 
 /// Map `name` to a path in the given directory: <directory>/<name>.json
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 0b51f2e9814..d7f7ff554db 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -151,4 +151,5 @@ pub mod ext {
 #[cfg(test)]
 mod test_snippet;
 
+#[cfg(not(stage0))] // remove after the next snapshot
 __build_diagnostic_array! { libsyntax, DIAGNOSTICS }