Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
54abe4c
link to ownership for now
steveklabnik Apr 14, 2015
e5631f9
TRPL: move semantics
steveklabnik Apr 15, 2015
dd5eed4
Validate format of extended error descriptions.
michaelsproul Apr 10, 2015
c54f43a
Update/add messages for E0{267,268,296,303}.
michaelsproul Apr 15, 2015
6d2b6d5
Enforce 80 char lines in extended errors.
michaelsproul Apr 15, 2015
cc267ce
Clarify comment
tamird Apr 17, 2015
1dee7b0
Run valgrind with fair scheduling when available
tamird Apr 17, 2015
a5e5347
Bump prerelease to .3
brson Apr 17, 2015
22ce069
Add long diagnostics for E0020
Apr 16, 2015
017bc44
Add long diagnostics for E0015
Apr 16, 2015
50f75f3
Add long diagnostics for "bind by-ref and by-move"
GuillaumeGomez Apr 15, 2015
ca14b81
Trim malformed sentence.
graydon Apr 18, 2015
806d024
Trim florid language.
graydon Apr 18, 2015
21e2e6e
Clean up section on Type aliases.
graydon Apr 18, 2015
7f2f09f
Eliminate the obsolete term 'slot'.
graydon Apr 18, 2015
f5b2963
Improve special-traits section very slightly.
graydon Apr 18, 2015
744085e
Improve memory-model section very slightly.
graydon Apr 18, 2015
a99a8b0
Remove obsolete discusison of runtime, promote `Linkage` to chapter.
graydon Apr 18, 2015
a81ce5f
Auto merge of #24528 - tamird:valgrind-sched, r=alexcrichton
bors Apr 18, 2015
514e06d
Rollup merge of #24466 - steveklabnik:more_more_more, r=alexcrichton
Manishearth Apr 18, 2015
4afd45e
Rollup merge of #24472 - dotdash:23431, r=nikomatsakis
Manishearth Apr 18, 2015
93d8ba2
Rollup merge of #24532 - brson:beta, r=pnkfelix
Manishearth Apr 18, 2015
cb7a127
Rollup merge of #24542 - michaelsproul:rollup, r=alexcrichton
Manishearth Apr 18, 2015
695efb5
Rollup merge of #24548 - graydon:reference-tidying, r=steveklabnik
Manishearth Apr 18, 2015
88601f8
fix doctest (fixup #24466)
Manishearth Apr 18, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Validate format of extended error descriptions.
  • Loading branch information
michaelsproul committed Apr 17, 2015
commit dd5eed4b8136849537d1b2c8655bd29dc976d89a
12 changes: 12 additions & 0 deletions src/libsyntax/diagnostics/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
}
_ => unreachable!()
};
// Check that the description starts and ends with a newline.
description.map(|raw_msg| {
let msg = raw_msg.as_str();
let last = msg.len() - 1;
if &msg[0..1] != "\n" || &msg[last..] != "\n" {
ecx.span_err(span, &format!(
"description for error code {} doesn't start and end with a newline",
token::get_ident(*code)
));
}
raw_msg
});
with_registered_diagnostics(|diagnostics| {
if diagnostics.insert(code.name, description).is_some() {
ecx.span_err(span, &format!(
Expand Down