From 984c039e4e08ab28dca9bec2fa20baf4c0f4452a Mon Sep 17 00:00:00 2001 From: Andrew Lygin Date: Sat, 26 Nov 2016 21:19:30 +0300 Subject: [PATCH] Fix error explanation formatting --- src/librustc_metadata/diagnostics.rs | 7 ++++--- src/librustc_typeck/diagnostics.rs | 4 ++-- src/libsyntax/diagnostic_list.rs | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs index e327be3d5039..6cf1a9e8a390 100644 --- a/src/librustc_metadata/diagnostics.rs +++ b/src/librustc_metadata/diagnostics.rs @@ -57,9 +57,10 @@ An unknown "kind" was specified for a link attribute. Erroneous code example: Please specify a valid "kind" value, from one of the following: - - static - - dylib - - framework + * static + * dylib + * framework + "##, E0459: r##" diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index e64a312d8e16..04314045733e 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1378,8 +1378,8 @@ let x = |_| {}; // error: cannot determine a type for this expression You have two possibilities to solve this situation: - - Give an explicit definition of the expression - - Infer the expression + * Give an explicit definition of the expression + * Infer the expression Examples: diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index ace3af0f102b..9110e989a8a1 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -65,8 +65,8 @@ fn main() {} The `inline` attribute only supports two arguments: - - always - - never + * always + * never All other arguments given to the `inline` attribute will return this error. Example: @@ -121,9 +121,9 @@ pub fn main() {} The `cfg` attribute supports only three kinds of predicates: - - any - - all - - not + * any + * all + * not Example: