Skip to content

Commit

Permalink
Update never_type feature gate ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 1, 2024
1 parent a06ebec commit e450f16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/ui/feature-gates/feature-gate-never_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ impl Foo for Meeshka {
type Wub = !; //~ ERROR type is experimental
}

pub fn look_ma_no_feature_gate<F: FnOnce() -> !>() {} //~ ERROR type is experimental

fn main() {
}
12 changes: 11 additions & 1 deletion tests/ui/feature-gates/feature-gate-never_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ LL | type Wub = !;
= help: add `#![feature(never_type)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 5 previous errors
error[E0658]: the `!` type is experimental
--> $DIR/feature-gate-never_type.rs:16:47
|
LL | pub fn look_ma_no_feature_gate<F: FnOnce() -> !>() {}
| ^
|
= note: see issue #35121 <https://github.com/rust-lang/rust/issues/35121> for more information
= help: add `#![feature(never_type)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0658`.

0 comments on commit e450f16

Please sign in to comment.