mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
16 lines
273 B
Rust
16 lines
273 B
Rust
//! 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();
|
|
}
|