diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-2631-a.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-2631-a.rs b/src/test/ui/issues/auxiliary/issue-2631-a.rs new file mode 100644 index 000000000..1e8211bfa --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-2631-a.rs @@ -0,0 +1,14 @@ +#![crate_name="req"] +#![crate_type = "lib"] + +use std::cell::RefCell; +use std::collections::HashMap; +use std::rc::Rc; + +pub type header_map = HashMap<String, Rc<RefCell<Vec<Rc<String>>>>>; + +// the unused ty param is necessary so this gets monomorphized +pub fn request<T>(req: &header_map) { + let data = req[&"METHOD".to_string()].clone(); + let _x = data.borrow().clone()[0].clone(); +} |