diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-21 22:03:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-21 22:03:12 +0100 |
| commit | 10c9ec399ecce52c1d7a9c766f297fefe8cd9aed (patch) | |
| tree | 6387924b1e0d4f1cb79507d13dda9eedf2f88fe8 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | fc694064e8f2d9553738d4243c13c676327e9779 (diff) | |
| parent | e3a048c3c9da3ad6faa2b576de044cc52dee2c62 (diff) | |
| download | rust-10c9ec399ecce52c1d7a9c766f297fefe8cd9aed.tar.gz rust-10c9ec399ecce52c1d7a9c766f297fefe8cd9aed.zip | |
Rollup merge of #92467 - Aaron1011:extern-local-region, r=oli-obk
Ensure that early-bound function lifetimes are always 'local' During borrowchecking, we treat any free (early-bound) regions on the 'defining type' as `RegionClassification::External`. According to the doc comments, we should only have 'external' regions when checking a closure/generator. However, a plain function can also have some if its regions be considered 'early bound' - this occurs when the region is constrained by an argument, appears in a `where` clause, or in an opaque type. This was causing us to incorrectly mark these regions as 'external', which caused some diagnostic code to act as if we were referring to a 'parent' region from inside a closure. This PR marks all instantiated region variables as 'local' when we're borrow-checking something other than a closure/generator/inline-const.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
