]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #88650 - sapessi:issue-77175-fix, r=estebank
authorbors <bors@rust-lang.org>
Sat, 18 Sep 2021 11:56:23 +0000 (11:56 +0000)
committerbors <bors@rust-lang.org>
Sat, 18 Sep 2021 11:56:23 +0000 (11:56 +0000)
commit23afad6e7f0ff17320411a274f3a3beb92452235
treecd2cac52ee6592c97eda72179a91a21c2427fba7
parent6cdd42f9f8dd4e5e5ba0aa816bc4c99ab8b102f9
parent0696c28430c58508e40e027f565f48ff8e0c0b34
Auto merge of #88650 - sapessi:issue-77175-fix, r=estebank

Skip single use lifetime lint for generated opaque types

Fix: #77175

The opaque type generated by the desugaring process of an async function uses the lifetimes defined by the originating function. The DefId for the lifetimes in the opaque type are different from the ones in the originating async function - as they should be, as far as I understand, and could therefore be considered a single use lifetimes, this causes the single_use_lifetimes lint to fail compilation if explicitly denied. This fix skips the lint for lifetimes used only once in generated opaque types for an async function that are declared in the parent async function definition.

More info in the comments on the original issue: 1 and 2