File tree 2 files changed +6
-18
lines changed
2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 1
1
// issue-119209
2
2
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 number Diff line number Diff line change 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
-
10
1
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
12
3
|
13
- LL | fn main<'a>(_: &'a i32) -> Foo<'a> { }
14
- | ^^^^^^^
4
+ LL | fn main<'a>(_: &'a i32) -> &'a () { &() }
5
+ | ^^^^^^
15
6
16
- error: aborting due to 2 previous errors
7
+ error: aborting due to 1 previous error
17
8
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`.
You can’t perform that action at this time.
0 commit comments