Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/ui/async-await/nested-in-impl.rs

16 lines
231 B
Rust
Raw Permalink Normal View History

clear in-scope lifetimes for nested items in HIR lowering This was causing us to incorrectly think the lifetimes were already declared on the scope for the nested item, when in fact they are not inherited.
2019-08-12 21:08:32 -04:00
// Test that async fn works when nested inside of
// impls with lifetime parameters.
//
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ check-pass
//@ edition:2018
clear in-scope lifetimes for nested items in HIR lowering This was causing us to incorrectly think the lifetimes were already declared on the scope for the nested item, when in fact they are not inherited.
2019-08-12 21:08:32 -04:00
struct Foo<'a>(&'a ());
impl<'a> Foo<'a> {
fn test() {
async fn test() {}
}
}
fn main() { }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1398ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API