Skip to content

Commit 8d4d82a

Browse files
committed
---
yaml --- r: 208815 b: refs/heads/snap-stage3 c: e90959e h: refs/heads/master i: 208813: 81d39ce 208811: 8b7c943 208807: ee085bc 208799: 9f78df1 v: v3
1 parent a32adc4 commit 8d4d82a

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
4+
refs/heads/snap-stage3: e90959e58bdf1a3685836987f85baf206b93fcf9
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/dist.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
123123
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
124124
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
125125
dist-install-dir-$(1): PREPARE_CLEAN=true
126-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
126+
dist-install-dir-$(1): prepare-base-dir-$(1) docs
127127
$$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust
128128
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust
129129
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
@@ -163,7 +163,7 @@ endif
163163
--legacy-manifest-dirs=rustlib,cargo
164164
$$(Q)rm -R tmp/dist/$$(PKG_NAME)-$(1)-image
165165

166-
dist-doc-install-dir-$(1): docs compiler-docs
166+
dist-doc-install-dir-$(1): docs
167167
$$(Q)mkdir -p tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust
168168
$$(Q)cp -r doc tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust/html
169169

@@ -251,7 +251,7 @@ distcheck-tar-bins: dist-tar-bins
251251

252252
# Just copy the docs to a folder under dist with the appropriate name
253253
# for uploading to S3
254-
dist-docs: docs compiler-docs
254+
dist-docs: docs
255255
$(Q) rm -Rf dist/doc
256256
$(Q) mkdir -p dist/doc/
257257
$(Q) cp -r doc dist/doc/$(CFG_PACKAGE_VERS)

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
7777

7878
D := $(S)src/doc
7979

80-
# FIXME (#25705) eventually may want to put error-index target back here.
81-
DOC_TARGETS := trpl style
80+
DOC_TARGETS := trpl style error-index
8281
COMPILER_DOC_TARGETS :=
8382
DOC_L10N_TARGETS :=
8483

branches/snap-stage3/src/libsyntax/diagnostics/plugin.rs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::collections::BTreeMap;
1414
use ast;
1515
use ast::{Ident, Name, TokenTree};
1616
use codemap::Span;
17+
use diagnostics::metadata::{check_uniqueness, output_metadata, Duplicate};
1718
use ext::base::{ExtCtxt, MacEager, MacResult};
1819
use ext::build::AstBuilder;
1920
use parse::token;
@@ -147,7 +148,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
147148
token_tree: &[TokenTree])
148149
-> Box<MacResult+'cx> {
149150
assert_eq!(token_tree.len(), 3);
150-
let (_crate_name, name) = match (&token_tree[0], &token_tree[2]) {
151+
let (crate_name, name) = match (&token_tree[0], &token_tree[2]) {
151152
(
152153
// Crate name.
153154
&ast::TtToken(_, token::Ident(ref crate_name, _)),
@@ -157,9 +158,21 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
157158
_ => unreachable!()
158159
};
159160

160-
// FIXME (#25705): we used to ensure error code uniqueness and
161-
// output error description JSON metadata here, but the approach
162-
// employed was too brittle.
161+
// Check uniqueness of errors and output metadata.
162+
with_registered_diagnostics(|diagnostics| {
163+
match check_uniqueness(crate_name, &*diagnostics) {
164+
Ok(Duplicate(err, location)) => {
165+
ecx.span_err(span, &format!(
166+
"error {} from `{}' also found in `{}'",
167+
err, crate_name, location
168+
));
169+
},
170+
Ok(_) => (),
171+
Err(e) => panic!("{}", e.description())
172+
}
173+
174+
output_metadata(&*ecx, crate_name, &*diagnostics).ok().expect("metadata output error");
175+
});
163176

164177
// Construct the output expression.
165178
let (count, expr) =

0 commit comments

Comments
 (0)