Skip to content

Commit e51196d

Browse files
authored
Unrolled build for rust-lang#116244
Rollup merge of rust-lang#116244 - estebank:issue-73497, r=b-naber Apply structured suggestion that allows test to work since 1.64 Close rust-lang#73497.
2 parents dd430bc + aae391c commit e51196d

4 files changed

+14
-2
lines changed

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::path::{Path, PathBuf};
1010

1111
const ENTRY_LIMIT: usize = 900;
1212
// FIXME: The following limits should be reduced eventually.
13-
const ISSUES_ENTRY_LIMIT: usize = 1854;
13+
const ISSUES_ENTRY_LIMIT: usize = 1852;
1414
const ROOT_ENTRY_LIMIT: usize = 867;
1515

1616
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// run-rustfix
2+
use std::any::Any;
3+
4+
fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> {
5+
Box::new(value) as Box<dyn Any>
6+
//~^ ERROR lifetime may not live long enough
7+
}
8+
9+
fn main() {
10+
let _ = foo(&5);
11+
}

tests/ui/issues/issue-16922.rs tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// run-rustfix
12
use std::any::Any;
23

34
fn foo<T: Any>(value: &T) -> Box<dyn Any> {

tests/ui/issues/issue-16922.stderr tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime may not live long enough
2-
--> $DIR/issue-16922.rs:4:5
2+
--> $DIR/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs:5:5
33
|
44
LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
55
| - let's call the lifetime of this reference `'1`

0 commit comments

Comments
 (0)