about summary refs log tree commit diff
diff options
context:
space:
mode:
authorr0cky <mu001999@outlook.com>2023-12-23 00:09:37 +0800
committerr0cky <mu001999@outlook.com>2023-12-23 00:09:37 +0800
commitd3f466a3a77d6d32e8e31ab9ccb61435938928a8 (patch)
tree21c323c5c9a6fda39b64091140af96ebd2075240
parent4830325a142952b69cf31c128d755e87ad5817d8 (diff)
downloadrust-d3f466a3a77d6d32e8e31ab9ccb61435938928a8.tar.gz
rust-d3f466a3a77d6d32e8e31ab9ccb61435938928a8.zip
Update test
-rw-r--r--tests/ui/entry-point/return-ty-has-bound-vars.rs4
-rw-r--r--tests/ui/entry-point/return-ty-has-bound-vars.stderr20
2 files changed, 6 insertions, 18 deletions
diff --git a/tests/ui/entry-point/return-ty-has-bound-vars.rs b/tests/ui/entry-point/return-ty-has-bound-vars.rs
index 2c621e78851..0995ce06160 100644
--- a/tests/ui/entry-point/return-ty-has-bound-vars.rs
+++ b/tests/ui/entry-point/return-ty-has-bound-vars.rs
@@ -1,5 +1,3 @@
 // issue-119209
 
-type Foo<'a> = impl PartialEq; //~ERROR `impl Trait` in type aliases is unstable
-
-fn main<'a>(_: &'a i32) -> Foo<'a> {} //~ERROR `main` function return type is not allowed to have generic parameters
+fn main<'a>(_: &'a i32) -> &'a () { &() } //~ERROR `main` function return type is not allowed to have generic parameters
diff --git a/tests/ui/entry-point/return-ty-has-bound-vars.stderr b/tests/ui/entry-point/return-ty-has-bound-vars.stderr
index a7aa69f9017..e7aab839f31 100644
--- a/tests/ui/entry-point/return-ty-has-bound-vars.stderr
+++ b/tests/ui/entry-point/return-ty-has-bound-vars.stderr
@@ -1,19 +1,9 @@
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/return-ty-has-bound-vars.rs:3:16
-   |
-LL | type Foo<'a> = impl PartialEq;
-   |                ^^^^^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
-
 error[E0131]: `main` function return type is not allowed to have generic parameters
-  --> $DIR/return-ty-has-bound-vars.rs:5:28
+  --> $DIR/return-ty-has-bound-vars.rs:3:28
    |
-LL | fn main<'a>(_: &'a i32) -> Foo<'a> {}
-   |                            ^^^^^^^
+LL | fn main<'a>(_: &'a i32) -> &'a () { &() }
+   |                            ^^^^^^
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0131, E0658.
-For more information about an error, try `rustc --explain E0131`.
+For more information about this error, try `rustc --explain E0131`.