Ban ...X pats, harden tests, and improve diagnostics.

Also fix a bug with the span passed in `mk_range`.
This commit is contained in:
Mazdak Farrokhzad 2020-01-11 06:49:43 +01:00
parent e621797264
commit 883932c6ba
19 changed files with 263 additions and 124 deletions

View file

@ -1,10 +1,10 @@
error[E0586]: inclusive range with no end
--> $DIR/E0586.rs:3:22
--> $DIR/E0586.rs:3:19
|
LL | let x = &tmp[1..=];
| ^
| ^^^ help: use `..` instead
|
= help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
error: aborting due to previous error