rust/src/test/ui/hrtb
Yuki Okushi a7f789b502
Rollup merge of #98022 - compiler-errors:erroneous-borrowck-span, r=oli-obk
Fix erroneous span for borrowck error

I am not confident that this is the correct fix, but it does the job. Open to suggestions for a real fix instead.

Fixes #97997

The issue is that we pass a [dummy location](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/mir/visit.rs.html#302) when type-checking the ["required consts"](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Body.html#structfield.required_consts) that are needed by the MIR body during borrowck. This means that when we fail to evaluate the constant, we use the span of `bb0[0]`, instead of the actual span of the constant.

There are quite a few other places that use `START_BLOCK.start_location()`, `Location::START`, etc. when calling for a random/unspecified `Location` value. This is because, unlike (for example) `Span`, we don't have a dummy/miscellaneous value to use instead. I would appreciate guidance (either in this PR, or a follow-up) on what needs to be done to clean this up in general.
2022-06-21 20:08:10 +09:00
..
complex.rs
due-to-where-clause.rs
due-to-where-clause.stderr
hrtb-cache-issue-54302.rs
hrtb-cache-issue-54302.stderr
hrtb-conflate-regions.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-conflate-regions.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-debruijn-in-receiver.rs
hrtb-debruijn-in-receiver.stderr
hrtb-exists-forall-fn.rs
hrtb-exists-forall-fn.stderr
hrtb-exists-forall-trait-contravariant.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-exists-forall-trait-contravariant.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-exists-forall-trait-covariant.rs
hrtb-exists-forall-trait-invariant.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-exists-forall-trait-invariant.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-higher-ranker-supertraits-transitive.rs
hrtb-higher-ranker-supertraits-transitive.stderr
hrtb-higher-ranker-supertraits.rs
hrtb-higher-ranker-supertraits.stderr
hrtb-identity-fn-borrows.rs
hrtb-identity-fn-borrows.stderr
hrtb-just-for-static.rs Rollup merge of #97937 - TaKO8Ki:fix-typo-in-hrtb-just-for-static, r=Dylan-DPC 2022-06-10 17:22:33 +09:00
hrtb-just-for-static.stderr Fix erroneous span for borrowck error 2022-06-12 02:40:54 -07:00
hrtb-perfect-forwarding.polonius.stderr
hrtb-perfect-forwarding.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
hrtb-perfect-forwarding.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
issue-30786.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
issue-30786.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
issue-46989.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
issue-46989.stderr Fully stabilize NLL 2022-06-03 17:16:41 -04:00
issue-57639.rs
issue-58451.rs
issue-58451.stderr Make missing argument placeholder more obvious that it's a placeholder 2022-06-19 15:10:42 -07:00
issue-62203-hrtb-ice.rs
issue-62203-hrtb-ice.stderr
issue-88446.rs
issue-90177.rs
issue-95034.rs Link to correct issue in issue-95034 test 2022-05-06 20:35:06 +03:00
issue-95034.stderr Link to correct issue in issue-95034 test 2022-05-06 20:35:06 +03:00