summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/auxiliary/issue-2631-a.rs
blob: 1e8211bfaa783e9a28f607bd766eb832add7f333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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();
}