Rollup merge of #116244 - estebank:issue-73497, r=b-naber
Apply structured suggestion that allows test to work since 1.64 Close #73497.
This commit is contained in:
commit
00ba7fc007
@ -10,7 +10,7 @@
|
||||
|
||||
const ENTRY_LIMIT: usize = 900;
|
||||
// FIXME: The following limits should be reduced eventually.
|
||||
const ISSUES_ENTRY_LIMIT: usize = 1854;
|
||||
const ISSUES_ENTRY_LIMIT: usize = 1852;
|
||||
const ROOT_ENTRY_LIMIT: usize = 867;
|
||||
|
||||
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
|
||||
|
@ -0,0 +1,11 @@
|
||||
// run-rustfix
|
||||
use std::any::Any;
|
||||
|
||||
fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> {
|
||||
Box::new(value) as Box<dyn Any>
|
||||
//~^ ERROR lifetime may not live long enough
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _ = foo(&5);
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
// run-rustfix
|
||||
use std::any::Any;
|
||||
|
||||
fn foo<T: Any>(value: &T) -> Box<dyn Any> {
|
@ -1,5 +1,5 @@
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/issue-16922.rs:4:5
|
||||
--> $DIR/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs:5:5
|
||||
|
|
||||
LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
|
||||
| - let's call the lifetime of this reference `'1`
|
Loading…
Reference in New Issue
Block a user