mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
 | |
|   --> $DIR/rpitit.rs:11:19
 | |
|    |
 | |
| LL | trait TraitLt<'a: 'a> {
 | |
|    |               -- all lifetime parameters originating from a trait are captured implicitly
 | |
| LL |     fn hello() -> impl Sized + use<Self>;
 | |
|    |                   ^^^^^^^^^^^^^^^^^^^^^^
 | |
| 
 | |
| error: lifetime may not live long enough
 | |
|   --> $DIR/rpitit.rs:15:5
 | |
|    |
 | |
| LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
 | |
|    |               --  -- lifetime `'b` defined here
 | |
|    |               |
 | |
|    |               lifetime `'a` defined here
 | |
| LL | /     eq_types(
 | |
| LL | |
 | |
| LL | |
 | |
| LL | |         <T as TraitLt<'a>>::hello(),
 | |
| LL | |         <T as TraitLt<'b>>::hello(),
 | |
| LL | |     );
 | |
|    | |_____^ argument requires that `'a` must outlive `'b`
 | |
|    |
 | |
|    = help: consider adding the following bound: `'a: 'b`
 | |
| 
 | |
| error: lifetime may not live long enough
 | |
|   --> $DIR/rpitit.rs:15:5
 | |
|    |
 | |
| LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
 | |
|    |               --  -- lifetime `'b` defined here
 | |
|    |               |
 | |
|    |               lifetime `'a` defined here
 | |
| LL | /     eq_types(
 | |
| LL | |
 | |
| LL | |
 | |
| LL | |         <T as TraitLt<'a>>::hello(),
 | |
| LL | |         <T as TraitLt<'b>>::hello(),
 | |
| LL | |     );
 | |
|    | |_____^ argument requires that `'b` must outlive `'a`
 | |
|    |
 | |
|    = help: consider adding the following bound: `'b: 'a`
 | |
| 
 | |
| help: `'a` and `'b` must be the same: replace one with the other
 | |
| 
 | |
| error: aborting due to 3 previous errors
 | |
| 
 | 
