Skip to content

Commit d3f466a

Browse files
committed
Update test
1 parent 4830325 commit d3f466a

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
// issue-119209
22

3-
type Foo<'a> = impl PartialEq; //~ERROR `impl Trait` in type aliases is unstable
4-
5-
fn main<'a>(_: &'a i32) -> Foo<'a> {} //~ERROR `main` function return type is not allowed to have generic parameters
3+
fn main<'a>(_: &'a i32) -> &'a () { &() } //~ERROR `main` function return type is not allowed to have generic parameters
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
error[E0658]: `impl Trait` in type aliases is unstable
2-
--> $DIR/return-ty-has-bound-vars.rs:3:16
3-
|
4-
LL | type Foo<'a> = impl PartialEq;
5-
| ^^^^^^^^^^^^^^
6-
|
7-
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
8-
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
9-
101
error[E0131]: `main` function return type is not allowed to have generic parameters
11-
--> $DIR/return-ty-has-bound-vars.rs:5:28
2+
--> $DIR/return-ty-has-bound-vars.rs:3:28
123
|
13-
LL | fn main<'a>(_: &'a i32) -> Foo<'a> {}
14-
| ^^^^^^^
4+
LL | fn main<'a>(_: &'a i32) -> &'a () { &() }
5+
| ^^^^^^
156

16-
error: aborting due to 2 previous errors
7+
error: aborting due to 1 previous error
178

18-
Some errors have detailed explanations: E0131, E0658.
19-
For more information about an error, try `rustc --explain E0131`.
9+
For more information about this error, try `rustc --explain E0131`.

0 commit comments

Comments
 (0)