rust/tests/ui/async-await/pin-sugar-ambiguity.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
281 B
Rust
Raw Normal View History

2024-09-20 14:09:18 -05:00
//@ check-pass
#![feature(pin_ergonomics)]
#![allow(dead_code, incomplete_features)]
// Handle the case where there's ambiguity between pin as a contextual keyword and pin as a path.
struct Foo;
mod pin {
pub struct Foo;
}
fn main() {
let _x: &pin ::Foo = &pin::Foo;
}