1 // aux-build:rbmtp_cross_crate_lib.rs
3 // ignore-compare-mode-nll
4 //[nll] compile-flags: -Z borrowck=mir
6 // Check explicit region bounds on methods in the cross crate case.
8 extern crate rbmtp_cross_crate_lib as lib;
12 use lib::IntoMaybeOwned;
14 fn call_into_maybe_owned<'x,F:IntoMaybeOwned<'x>>(f: F) {
15 // Exercise a code path I found to be buggy. We were not encoding
16 // the region parameters from the receiver correctly on trait
21 fn call_bigger_region<'x, 'y>(a: Inv<'x>, b: Inv<'y>) {
22 // Here the value provided for 'y is 'y, and hence 'y:'x does not hold.
24 //[base]~^ ERROR lifetime mismatch [E0623]
25 //[nll]~^^ ERROR lifetime may not live long enough