]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/ice-6256.rs
Rollup merge of #86263 - fee1-dead:rustdoc-layout-variants, r=camelid
[rust.git] / src / tools / clippy / tests / ui / crashes / ice-6256.rs
1 // originally from rustc ./src/test/ui/regions/issue-78262.rs
2 // ICE: to get the signature of a closure, use substs.as_closure().sig() not fn_sig()
3 #![allow(clippy::upper_case_acronyms)]
4
5 trait TT {}
6
7 impl dyn TT {
8     fn func(&self) {}
9 }
10
11 #[rustfmt::skip]
12 fn main() {
13     let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
14                                    //[nll]~^ ERROR: borrowed data escapes outside of closure
15 }