about summary refs log tree commit diff
path: root/tests/ui/unsafe-binders/unused-lifetimes-2.fixed
blob: 714a5fdaf03115cc483b67ff618e8179ebdb483c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// regression test for #141758
//@ run-rustfix
//@ check-pass

#![warn(unused_lifetimes)]
#![allow(incomplete_features, unused_imports, dead_code)]
#![feature(unsafe_binders)]

use std::unsafe_binder::unwrap_binder;

#[derive(Copy, Clone)]
pub struct S([usize; 8]);

// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
pub fn by_value(_x: unsafe<'a> &'a S) -> usize {
    //~^ WARN lifetime parameter `'b` never used
    0
}

fn main() {}