Files
rust/tests/ui/resolve/reference-clone-nonclone-11820.rs

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

16 lines
273 B
Rust
Raw Normal View History

2025-07-24 17:22:54 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/11820
//@ run-pass
#![allow(noop_method_call)]
struct NoClone;
fn main() {
let rnc = &NoClone;
let rsnc = &Some(NoClone);
let _: &NoClone = rnc.clone();
let _: &Option<NoClone> = rsnc.clone();
}