]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
1 // Regression test for #82126. Checks that mismatched lifetimes and types are
8 struct MarketMultiplier {}
10 impl MarketMultiplier
{
11 fn buy(&mut self) -> &mut usize {
16 async
fn buy_lock(generator
: &Mutex
<MarketMultiplier
>) -> LockedMarket
<'_
> {
17 //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
18 //~^^ ERROR this struct takes 1 generic argument but 0 generic arguments were supplied
19 LockedMarket(generator
.lock().unwrap().buy())
20 //~^ ERROR cannot return value referencing temporary
23 struct LockedMarket
<T
>(T
);