Santiago Pastorino
1dae309ca1
Run rustfmt
2018-06-22 18:24:02 -03:00
Santiago Pastorino
ad612d660c
Fix erroneous error note when using field after move
2018-06-22 18:23:33 -03:00
Felix S. Klock II
fbe7d5bce8
When NLL has illegal move due to borrowed content, provide feedback about why the move wasn't a copy.
...
This should address #51190 .
2018-06-06 22:42:27 +02:00
gaurikholkar
e5a96a4b95
modify the error message- CR Comments
2018-04-07 13:17:16 +05:30
gaurikholkar
1fb25fbbe3
reduce nested loops in the code
2018-04-06 20:00:21 +05:30
Gauri Kholkar
c1192065ea
Update borrowck_errors.rs
2018-04-05 22:04:20 +05:30
gaurikholkar
1b06fe1ef5
Merge branch 'master' of https://github.com/rust-lang/rust into e0389
2018-04-05 21:52:40 +05:30
csmoe
55116243e7
remove unneeded where clause
2018-03-18 20:18:21 +08:00
csmoe
c62d9eb729
fix formatting
2018-03-16 14:52:16 +08:00
csmoe
0b111e677c
change &self to self and fix lifetime annotations
2018-03-16 14:52:15 +08:00
gaurikholkar
0c7fc046d3
code refactor, modify compile-fail tests
2018-03-10 20:55:02 +05:30
Michael Woerister
542bc75dea
Turn features() into a query.
2018-03-05 11:05:01 +01:00
Esteban Küber
90bc98c5d1
Modify message to match label
2018-01-10 11:41:12 -08:00
Santiago Pastorino
e980fb8bef
feature nll implies borrowck=mir
2017-12-20 14:38:13 -05:00
Niko Matsakis
0e64a756f8
integrate -Znll-dump-cause into borrowck
2017-12-20 14:04:51 -05:00
est31
c9af68e90c
Replace -Zborrowck-mir with -Zborrowck=mode
...
where mode is one of {ast,mir,compare}.
This commit only implements the functionality.
The tests will be updated in a follow up commit.
2017-11-26 16:36:52 +01:00
Oliver Schneider
6ae440e048
Make the difference between lint codes and error codes explicit
2017-11-02 10:19:41 +01:00
Niko Matsakis
b2c248efea
reorder 'gcx and 'tcx in BorrowckErrors
impl
2017-10-31 12:41:40 -04:00
Niko Matsakis
f700728a3b
make end-point optional in the borrow check
2017-10-31 12:41:39 -04:00
Carol (Nichols || Goulding)
0e46cf4db4
Reword to avoid using either re-assignment or reassignment in errors
2017-10-25 11:29:52 -04:00
Felix S. Klock II
5b68e1f8da
Add Origin::Ast
arguments to all of the migrated AST-borrowck diagnostics.
2017-10-10 13:12:00 +02:00
Felix S. Klock II
cf11ef436b
Fixed client code for diagnostics migration, adding new methods to trait BorrowckErrors
as necessary.
2017-10-10 13:12:00 +02:00
bors
650b1b1f3a
Auto merge of #45016 - pnkfelix:mir-borrowck-gather-and-signal-move-errors, r=nikomatsakis
...
MIR-borrowck: gather and signal any move errors
When building up the `MoveData` structure for a given MIR, also accumulate any erroneous actions, and then report all of those errors when the construction is complete.
This PR adds a host of move-related error constructor methods to `trait BorrowckErrors`. I think I got the notes right; but we should plan to audit all of the notes before turning MIR-borrowck on by default.
Fix #44830
2017-10-08 18:12:26 +00:00
Felix S. Klock II
fdd7d13c24
Move E0509 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck.
2017-10-04 12:47:53 +02:00
Felix S. Klock II
a995b56a5e
Move E0508 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck.
2017-10-04 12:47:46 +02:00
Felix S. Klock II
a12cefb497
Move E0507 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck.
...
(Had to modify signature of `report_cannot_move_out_of` slightly to
satisfy requirements of newly added `fn cannot_move_out_of` method.)
2017-10-04 12:47:40 +02:00
Mikhail Modin
c68b10f5ee
add notes to report_conflicting_borrow MIR borrowck
2017-10-04 10:35:42 +03:00
Basile Desloges
d328d264aa
mir-borrowck: Factorize error message for cannot_assign_static()
between AST and MIR borrowck
2017-09-29 15:41:26 +02:00
Basile Desloges
5c8066b4a7
mir-borrowck: Move span_label calls for cannot_use_when_mutably_borrowed()
inside borrowck_errors.rs
2017-09-29 15:41:26 +02:00
Basile Desloges
bcda695720
mir-borrowck: Move span_label calls for cannot_assign_to_borrowed()
inside borrowck_errors.rs
2017-09-29 15:41:26 +02:00
Felix S. Klock II
8e79fc72cb
Move borrowck error msg construction to module in rustc_mir
(for later reuse by mir borrowck).
...
post-rebase: Do not put "(Ast)" suffix in error msg unless passed `-Z borrowck-mir`.
(But unconditionally include "(Mir)" suffix for mir-borrowck errors.)
2017-08-16 15:52:45 +02:00