about summary refs log tree commit diff
path: root/tests/ui/issues
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-26 21:57:32 +0000
committerbors <bors@rust-lang.org>2024-11-26 21:57:32 +0000
commitdd2837ec5de4301a692e05a7c4475e980af57a57 (patch)
tree385aaedfc698a1f470138f38ace6b5d0abc9d0f0 /tests/ui/issues
parentdff3e7ccd4a18958c938136c4ccdc853fcc86194 (diff)
parentc4e2b0c60514736dbacc65908217197cf15d6b83 (diff)
downloadrust-dd2837ec5de4301a692e05a7c4475e980af57a57.tar.gz
rust-dd2837ec5de4301a692e05a7c4475e980af57a57.zip
Auto merge of #133505 - compiler-errors:rollup-xjp8hdi, r=compiler-errors
Rollup of 12 pull requests

Successful merges:

 - #133042 (btree: add `{Entry,VacantEntry}::insert_entry`)
 - #133070 (Lexer tweaks)
 - #133136 (Support ranges in `<[T]>::get_many_mut()`)
 - #133140 (Inline ExprPrecedence::order into Expr::precedence)
 - #133155 (Yet more `rustc_mir_dataflow` cleanups)
 - #133282 (Shorten the `MaybeUninit` `Debug` implementation)
 - #133326 (Remove the `DefinitelyInitializedPlaces` analysis.)
 - #133362 (No need to re-sort existential preds in relate impl)
 - #133367 (Simplify array length mismatch error reporting (to not try to turn consts into target usizes))
 - #133394 (Bail on more errors in dyn ty lowering)
 - #133410 (target check_consistency: ensure target feature string makes some basic sense)
 - #133435 (miri: disable test_downgrade_observe test on macOS)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-23024.rs1
-rw-r--r--tests/ui/issues/issue-23024.stderr10
-rw-r--r--tests/ui/issues/issue-34373.rs1
-rw-r--r--tests/ui/issues/issue-34373.stderr30
4 files changed, 6 insertions, 36 deletions
diff --git a/tests/ui/issues/issue-23024.rs b/tests/ui/issues/issue-23024.rs
index 25220dc3e61..1b072dd7b69 100644
--- a/tests/ui/issues/issue-23024.rs
+++ b/tests/ui/issues/issue-23024.rs
@@ -8,5 +8,4 @@ fn main()
     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
     //~^ ERROR the precise format of `Fn`-family traits'
     //~| ERROR missing generics for trait `Fn`
-    //~| ERROR the value of the associated type `Output` in `FnOnce`
 }
diff --git a/tests/ui/issues/issue-23024.stderr b/tests/ui/issues/issue-23024.stderr
index 62278a51be6..51db0414f3a 100644
--- a/tests/ui/issues/issue-23024.stderr
+++ b/tests/ui/issues/issue-23024.stderr
@@ -19,13 +19,7 @@ help: add missing generic argument
 LL |     println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
    |                                         ++++++
 
-error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
-  --> $DIR/issue-23024.rs:8:39
-   |
-LL |     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
-   |                                       ^^ help: specify the associated type: `Fn::<Output = Type>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0107, E0191, E0658.
+Some errors have detailed explanations: E0107, E0658.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/issues/issue-34373.rs b/tests/ui/issues/issue-34373.rs
index dc20c5589b3..707aa8cf338 100644
--- a/tests/ui/issues/issue-34373.rs
+++ b/tests/ui/issues/issue-34373.rs
@@ -6,7 +6,6 @@ trait Trait<T> {
 
 pub struct Foo<T = Box<Trait<DefaultFoo>>>;  //~ ERROR cycle detected
 //~^ ERROR `T` is never used
-//~| ERROR `Trait` cannot be made into an object
 type DefaultFoo = Foo;
 
 fn main() {
diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr
index 4e8e7c61fee..06365558217 100644
--- a/tests/ui/issues/issue-34373.stderr
+++ b/tests/ui/issues/issue-34373.stderr
@@ -5,7 +5,7 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    |                              ^^^^^^^^^^
    |
 note: ...which requires expanding type alias `DefaultFoo`...
-  --> $DIR/issue-34373.rs:10:19
+  --> $DIR/issue-34373.rs:9:19
    |
 LL | type DefaultFoo = Foo;
    |                   ^^^
@@ -17,28 +17,6 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/issue-34373.rs:7:24
-   |
-LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
-   |                        ^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-34373.rs:4:8
-   |
-LL | trait Trait<T> {
-   |       ----- this trait cannot be made into an object...
-LL |     fn foo(_: T) {}
-   |        ^^^ ...because associated function `foo` has no `self` parameter
-help: consider turning `foo` into a method by giving it a `&self` argument
-   |
-LL |     fn foo(&self, _: T) {}
-   |            ++++++
-help: alternatively, consider constraining `foo` so it does not apply to trait objects
-   |
-LL |     fn foo(_: T) where Self: Sized {}
-   |                  +++++++++++++++++
-
 error[E0392]: type parameter `T` is never used
   --> $DIR/issue-34373.rs:7:16
    |
@@ -48,7 +26,7 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
    = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0038, E0391, E0392.
-For more information about an error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0391, E0392.
+For more information about an error, try `rustc --explain E0391`.