rust/src/test/ui/nll
bors ec4a752202 Auto merge of #53493 - matthewjasper:hair-spans, r=nikomatsakis
Use smaller span for adjustments on block expressions

When returning a mutable reference don't use the entire body of the function as the span for the adjustments at the end.

The error [in this case](https://github.com/rust-lang/rust/compare/master...matthewjasper:hair-spans?expand=1#diff-ecef8b1f15622fb48a803c9b61605c78) is worse, but neither error message is really what we want. I have some ideas on how to get a better error message that will have to wait for a future PR.
2018-08-28 13:12:16 +00:00
..
closure-requirements Update tests 2018-08-14 20:35:47 +01:00
relate_tys fix reference file 2018-07-26 06:21:44 +03:00
ty-outlives #52413: addressed @estebank's Nit 2018-08-06 17:56:24 +00:00
user-annotations address pnkfelix nits 2018-08-24 13:27:38 -04:00
borrow-use-issue-46875.rs Make killing of out-of-scope borrows a pre-statement effect 2017-12-24 14:56:52 +02:00
borrowed-local-error.rs Remove nll-dump-cause flag and always track causes 2018-03-06 10:34:46 -03:00
borrowed-local-error.stderr Don't match on region kinds when reporting NLL errors 2018-07-23 20:54:09 +01:00
borrowed-match-issue-45045.rs rustc_mir: insert a dummy access to places being matched on, when building MIR. 2018-02-09 23:25:10 +02:00
borrowed-match-issue-45045.stderr Use better spans for dummy accesses used in matches 2018-07-26 22:06:12 +01:00
borrowed-referent-issue-38899.rs remove unnecessary compile-flags comments 2018-01-12 10:38:28 -05:00
borrowed-referent-issue-38899.stderr update tests 2018-03-14 00:53:24 +01:00
borrowed-temporary-error.rs Remove nll-dump-cause flag and always track causes 2018-03-06 10:34:46 -03:00
borrowed-temporary-error.stderr update tests 2018-03-14 00:53:24 +01:00
borrowed-universal-error-2.rs Remove nll-dump-cause flag and always track causes 2018-03-06 10:34:46 -03:00
borrowed-universal-error-2.stderr Don't match on region kinds when reporting NLL errors 2018-07-23 20:54:09 +01:00
borrowed-universal-error.rs Remove nll-dump-cause flag and always track causes 2018-03-06 10:34:46 -03:00
borrowed-universal-error.stderr Also point to free named region on lifetime errors 2018-06-28 11:12:44 -07:00
cannot-move-block-spans.nll.stderr Bless UI tests 2018-08-15 15:14:21 -07:00
cannot-move-block-spans.rs Use better spans for cannot-move errors 2018-07-26 22:06:12 +01:00
cannot-move-block-spans.stderr Use better spans for cannot-move errors 2018-07-26 22:06:12 +01:00
capture-mut-ref.rs Fix various nll unused mut errors 2018-07-03 20:12:09 +01:00
capture-mut-ref.stderr Fix various nll unused mut errors 2018-07-03 20:12:09 +01:00
capture-ref-in-struct.rs Remove nll-dump-cause flag and always track causes 2018-03-06 10:34:46 -03:00
capture-ref-in-struct.stderr Don't match on region kinds when reporting NLL errors 2018-07-23 20:54:09 +01:00
closure-access-spans.rs Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-access-spans.stderr Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-borrow-spans.rs Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-borrow-spans.stderr Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-captures.rs Update tests for new spans for nll errors involving closures 2018-08-03 23:00:27 +01:00
closure-captures.stderr Update tests for new NLL mutability errors 2018-07-20 20:01:15 +01:00
closure-move-spans.rs Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-move-spans.stderr Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-use-spans.rs Tests for closure spans 2018-08-03 23:00:27 +01:00
closure-use-spans.stderr Tests for closure spans 2018-08-03 23:00:27 +01:00
closures-in-loops.rs Tests for closure spans 2018-08-03 23:00:27 +01:00
closures-in-loops.stderr Tests for closure spans 2018-08-03 23:00:27 +01:00
constant-thread-locals-issue-47053.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
constant-thread-locals-issue-47053.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
constant.rs For some reason, on my linux box, using -Zverbose here is causing a linker failure. 2018-07-20 14:26:44 +02:00
decl-macro-illegal-copy.rs Regression test for #46314 2018-04-04 11:36:38 +03:00
decl-macro-illegal-copy.stderr Regression test for #46314 2018-04-04 11:36:38 +03:00
do-not-ignore-lifetime-bounds-in-copy.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
do-not-ignore-lifetime-bounds-in-copy.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
drop-may-dangle.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
drop-no-may-dangle.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
drop-no-may-dangle.stderr Stabilize attributes on generic parameters 2018-04-05 02:19:56 +03:00
extra-unused-mut.rs Don't make "fake" match variables mutable 2018-07-28 21:18:34 +01:00
generator-distinct-lifetime.rs Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
generator-upvar-mutability.rs Fix various nll unused mut errors 2018-07-03 20:12:09 +01:00
generator-upvar-mutability.stderr Update tests for new NLL mutability errors 2018-07-20 20:01:15 +01:00
get_default.nll.stderr avoid computing liveness when a variable doesn't need it 2018-08-07 15:05:16 -04:00
get_default.rs ignore the point where the outlives requirement was added 2018-05-09 23:21:24 -03:00
get_default.stderr avoid computing liveness when a variable doesn't need it 2018-08-07 15:05:16 -04:00
guarantor-issue-46974.rs Updated other tests affected by change. 2018-01-10 19:12:57 +00:00
guarantor-issue-46974.stderr #52413: addressed @estebank's Nit 2018-08-06 17:56:24 +00:00
issue-16223.rs Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
issue-27868.rs [nll] add regression test for issue #27868 2018-08-13 22:45:02 -04:00
issue-27868.stderr [nll] add regression test for issue #27868 2018-08-13 22:45:02 -04:00
issue-30104.rs Add regression test for issue #30104 2018-08-14 10:26:47 -04:00
issue-31567.rs add regression tests for various MIR bugs that get fixed 2018-03-13 11:22:07 -04:00
issue-31567.stderr Don't match on region kinds when reporting NLL errors 2018-07-23 20:54:09 +01:00
issue-43058.rs Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
issue-47022.rs Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
issue-47388.rs fix ui test 2018-04-06 23:03:20 +05:30
issue-47388.stderr NLL: Updates to diagnostic output in test/ui. 2018-06-19 19:38:37 +02:00
issue-47470.rs add regression tests for various MIR bugs that get fixed 2018-03-13 11:22:07 -04:00
issue-47470.stderr Don't match on region kinds when reporting NLL errors 2018-07-23 20:54:09 +01:00
issue-48070.rs Move 48070 test to ui 2018-03-13 14:52:11 -04:00
issue-48238.rs write code to extract region names and emit new style message 2018-07-04 05:09:33 -04:00
issue-48238.stderr Update tests 2018-08-14 20:35:47 +01:00
issue-48697.rs Add regression test for issue #48697 2018-08-14 10:25:54 -04:00
issue-50716-1.rs Fix the error of selecting obligation by not running the borrow checker. 2018-06-27 18:14:00 +02:00
issue-50716.rs write code to extract region names and emit new style message 2018-07-04 05:09:33 -04:00
issue-50716.stderr Change label from closure to function where appropriate. 2018-07-27 12:48:47 +02:00
issue-51244.rs Bless tests and update ERROR 2018-07-12 22:51:30 -07:00
issue-51244.stderr Bless tests and update ERROR 2018-07-12 22:51:30 -07:00
issue-51268.rs Fix variable name in E0502 double borrow error 2018-06-20 09:04:52 -03:00
issue-51268.stderr Update tests for new spans for nll errors involving closures 2018-08-03 23:00:27 +01:00
issue-51351.rs fix issues #51351 and #52133 2018-07-29 11:42:50 +01:00
issue-51512.rs Fix erroneous error note when using field after move 2018-06-22 18:23:33 -03:00
issue-51512.stderr Fix erroneous error note when using field after move 2018-06-22 18:23:33 -03:00
issue-52078.rs add regression test for #52078 2018-07-21 15:56:47 +03:00
issue-52113.rs Disable some nice region errors in NLL mode. 2018-08-06 20:43:16 +02:00
issue-52113.stderr Disable some nice region errors in NLL mode. 2018-08-06 20:43:16 +02:00
issue-52663-span-decl-captured-variable.rs Improved how upvars are detected when presenting errors using prefixes. 2018-08-14 18:38:57 +02:00
issue-52663-span-decl-captured-variable.stderr Improved how upvars are detected when presenting errors using prefixes. 2018-08-14 18:38:57 +02:00
issue-52742.rs Updated tests after rebase. 2018-08-09 12:03:20 +02:00
issue-52742.stderr Updated tests after rebase. 2018-08-09 12:03:20 +02:00
issue-53119.rs Fixes #53119. 2018-08-08 08:02:47 +01:00
loan_ends_mid_block_pair.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
loan_ends_mid_block_pair.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
loan_ends_mid_block_vec.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
loan_ends_mid_block_vec.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
match-guards-always-borrow.ast.nll.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
match-guards-always-borrow.ast.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
match-guards-always-borrow.mir.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
match-guards-always-borrow.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
maybe-initialized-drop-implicit-fragment-drop.rs implement liveness tracing, remove old liveness system 2018-08-27 13:57:55 -04:00
maybe-initialized-drop-implicit-fragment-drop.stderr implement liveness tracing, remove old liveness system 2018-08-27 13:57:55 -04:00
maybe-initialized-drop-uninitialized.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
maybe-initialized-drop-with-fragment.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
maybe-initialized-drop-with-fragment.stderr update tests 2018-03-14 00:53:24 +01:00
maybe-initialized-drop-with-uninitialized-fragments.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
maybe-initialized-drop-with-uninitialized-fragments.stderr update tests 2018-03-14 00:53:24 +01:00
maybe-initialized-drop.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
maybe-initialized-drop.stderr update tests 2018-03-14 00:53:24 +01:00
mir_check_cast_closure.rs Update tests 2018-08-14 20:35:47 +01:00
mir_check_cast_closure.stderr Update tests 2018-08-14 20:35:47 +01:00
mir_check_cast_reify.rs move mir_check_* to ui tests, add adjusted references 2018-07-26 08:21:35 +03:00
mir_check_cast_reify.stderr Update tests 2018-08-14 20:35:47 +01:00
mir_check_cast_unsafe_fn.rs move mir_check_* to ui tests, add adjusted references 2018-07-26 08:21:35 +03:00
mir_check_cast_unsafe_fn.stderr Update tests 2018-08-14 20:35:47 +01:00
mir_check_cast_unsize.rs Use smaller span for adjustments on block expressions 2018-08-25 12:13:28 +01:00
mir_check_cast_unsize.stderr Use smaller span for adjustments on block expressions 2018-08-25 12:13:28 +01:00
move-errors.rs Update tests for grouped nll move errors 2018-06-27 22:46:58 +01:00
move-errors.stderr Bless UI tests 2018-08-15 15:14:21 -07:00
normalization-bounds-error.rs Register outlives predicates from queries the right way around. 2018-05-31 20:40:25 +01:00
normalization-bounds-error.stderr Point to lifetime in fn definition on lifetime error note 2018-06-28 11:12:42 -07:00
normalization-bounds.rs Register outlives predicates from queries the right way around. 2018-05-31 20:40:25 +01:00
projection-return.rs remove -Znll -- borrowck=mir implies nll now 2018-04-15 07:13:42 -04:00
promotable-mutable-zst-doesnt-conflict.rs Allow borrow conflicts for promoted length 0 arrays 2018-07-31 21:35:22 +01:00
reference-carried-through-struct-field.ast.nll.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
reference-carried-through-struct-field.ast.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
reference-carried-through-struct-field.mir.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
reference-carried-through-struct-field.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
region-ends-after-if-condition.nll.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
region-ends-after-if-condition.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
region-ends-after-if-condition.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
return-ref-mut-issue-46557.rs remove unnecessary compile-flags comments 2018-01-12 10:38:28 -05:00
return-ref-mut-issue-46557.stderr avoid computing liveness when a variable doesn't need it 2018-08-07 15:05:16 -04:00
return_from_loop.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
return_from_loop.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
trait-associated-constant.rs mir: Fix DefiningTy::Const 2018-02-06 23:42:05 -05:00
trait-associated-constant.stderr Extend support to get_generics for all NodeItems 2018-06-28 11:12:43 -07:00
unused-mut-issue-50343.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
unused-mut-issue-50343.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
where_clauses_in_functions.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
where_clauses_in_functions.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
where_clauses_in_structs.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
where_clauses_in_structs.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00