replace fileline_{help,note} with {help,note}
The extra filename and line was mainly there to keep the indentation relative to the main snippet; now that this doesn't include filename/line-number as a prefix, it is distracted.
This commit is contained in:
parent
1ff1887cc9
commit
489a6c95bf
25 changed files with 172 additions and 260 deletions
|
@ -445,11 +445,11 @@ fn filtered_float_lit(data: token::InternedString, suffix: Option<&str>,
|
|||
if suf.len() >= 2 && looks_like_width_suffix(&['f'], suf) {
|
||||
// if it looks like a width, lets try to be helpful.
|
||||
sd.struct_span_err(sp, &format!("invalid width `{}` for float literal", &suf[1..]))
|
||||
.fileline_help(sp, "valid widths are 32 and 64")
|
||||
.help("valid widths are 32 and 64")
|
||||
.emit();
|
||||
} else {
|
||||
sd.struct_span_err(sp, &format!("invalid suffix `{}` for float literal", suf))
|
||||
.fileline_help(sp, "valid suffixes are `f32` and `f64`")
|
||||
.help("valid suffixes are `f32` and `f64`")
|
||||
.emit();
|
||||
}
|
||||
|
||||
|
@ -621,12 +621,12 @@ pub fn integer_lit(s: &str,
|
|||
if looks_like_width_suffix(&['i', 'u'], suf) {
|
||||
sd.struct_span_err(sp, &format!("invalid width `{}` for integer literal",
|
||||
&suf[1..]))
|
||||
.fileline_help(sp, "valid widths are 8, 16, 32 and 64")
|
||||
.help("valid widths are 8, 16, 32 and 64")
|
||||
.emit();
|
||||
} else {
|
||||
sd.struct_span_err(sp, &format!("invalid suffix `{}` for numeric literal", suf))
|
||||
.fileline_help(sp, "the suffix must be one of the integral types \
|
||||
(`u32`, `isize`, etc)")
|
||||
.help("the suffix must be one of the integral types \
|
||||
(`u32`, `isize`, etc)")
|
||||
.emit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue