diff options
| author | bors <bors@rust-lang.org> | 2022-04-27 01:01:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-27 01:01:58 +0000 |
| commit | 99b70ee230a363220d97148d567f07366d7ea4e0 (patch) | |
| tree | 5c9df8d245757383f2ee1c52162320d91dc98d09 /src/test/ui/issues | |
| parent | a7197189cd0e3a86d1b661d1dceb8bdff021d0b8 (diff) | |
| parent | c0ed53c0dab14b9000abe4e6c9e86918d8c48224 (diff) | |
| download | rust-99b70ee230a363220d97148d567f07366d7ea4e0.tar.gz rust-99b70ee230a363220d97148d567f07366d7ea4e0.zip | |
Auto merge of #96459 - Dylan-DPC:rollup-de6ud9d, r=Dylan-DPC
Rollup of 6 pull requests
Successful merges:
- #92569 (Improve Error Messaging for Unconstructed Structs and Enum Variants in Generic Contexts)
- #96370 (Cleanup `report_method_error` a bit)
- #96383 (Fix erased region escaping into wfcheck due to #95395)
- #96385 (Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL)
- #96410 (rustdoc: do not write `{{root}}` in `pub use ::foo` docs)
- #96430 (Fix handling of `!` in rustdoc search)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-16922.nll.stderr | 5 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-29124.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-57362-1.stderr | 5 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/test/ui/issues/issue-16922.nll.stderr b/src/test/ui/issues/issue-16922.nll.stderr index 7f4f5b22eb3..9d9f32a97c0 100644 --- a/src/test/ui/issues/issue-16922.nll.stderr +++ b/src/test/ui/issues/issue-16922.nll.stderr @@ -5,6 +5,11 @@ LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> { | - let's call the lifetime of this reference `'1` LL | Box::new(value) as Box<dyn Any> | ^^^^^^^^^^^^^^^ cast requires that `'1` must outlive `'static` + | +help: to declare that the trait object captures data from argument `value`, you can add an explicit `'_` lifetime bound + | +LL | fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> { + | ++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-29124.stderr b/src/test/ui/issues/issue-29124.stderr index 42d89cd01a4..c5d2ec08409 100644 --- a/src/test/ui/issues/issue-29124.stderr +++ b/src/test/ui/issues/issue-29124.stderr @@ -2,17 +2,17 @@ error[E0599]: no method named `x` found for fn item `fn() -> Ret {Obj::func}` in --> $DIR/issue-29124.rs:15:15 | LL | Obj::func.x(); - | ^ method not found in `fn() -> Ret {Obj::func}` - | - = note: `Obj::func` is a function, perhaps you wish to call it + | --------- ^ method not found in `fn() -> Ret {Obj::func}` + | | + | this is a function, perhaps you wish to call it error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the current scope --> $DIR/issue-29124.rs:17:10 | LL | func.x(); - | ^ method not found in `fn() -> Ret {func}` - | - = note: `func` is a function, perhaps you wish to call it + | ---- ^ method not found in `fn() -> Ret {func}` + | | + | this is a function, perhaps you wish to call it error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-57362-1.stderr b/src/test/ui/issues/issue-57362-1.stderr index 5c611cd43d3..8e19f14009a 100644 --- a/src/test/ui/issues/issue-57362-1.stderr +++ b/src/test/ui/issues/issue-57362-1.stderr @@ -2,9 +2,10 @@ error[E0599]: no method named `f` found for fn pointer `fn(&u8)` in the current --> $DIR/issue-57362-1.rs:20:7 | LL | a.f(); - | ^ method not found in `fn(&u8)` + | - ^ method not found in `fn(&u8)` + | | + | this is a function, perhaps you wish to call it | - = note: `a` is a function, perhaps you wish to call it = help: items from traits can only be used if the trait is implemented and in scope note: `Trait` defines an item `f`, perhaps you need to implement it --> $DIR/issue-57362-1.rs:8:1 |
