Fix f16 and f128 feature gates in editions other than 2015
Fixes https://github.com/rust-lang/rust/issues/123282 Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
This commit is contained in:
parent
9a7b176227
commit
5afe072ead
@ -605,6 +605,7 @@ struct Flags: u8 {
|
||||
&& !this.tcx.features().f16
|
||||
&& !ident.span.allows_unstable(sym::f16)
|
||||
&& finalize.is_some()
|
||||
&& innermost_result.is_none()
|
||||
{
|
||||
feature_err(
|
||||
this.tcx.sess,
|
||||
@ -618,6 +619,7 @@ struct Flags: u8 {
|
||||
&& !this.tcx.features().f128
|
||||
&& !ident.span.allows_unstable(sym::f128)
|
||||
&& finalize.is_some()
|
||||
&& innermost_result.is_none()
|
||||
{
|
||||
feature_err(
|
||||
this.tcx.sess,
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:11:10
|
||||
--> $DIR/feature-gate-f128.rs:7:10
|
||||
|
|
||||
LL | const A: f128 = 10.0;
|
||||
| ^^^^
|
||||
@ -9,7 +9,7 @@ LL | const A: f128 = 10.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:14:12
|
||||
--> $DIR/feature-gate-f128.rs:10:12
|
||||
|
|
||||
LL | let a: f128 = 100.0;
|
||||
| ^^^^
|
||||
@ -19,7 +19,7 @@ LL | let a: f128 = 100.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:19:11
|
||||
--> $DIR/feature-gate-f128.rs:15:11
|
||||
|
|
||||
LL | fn foo(a: f128) {}
|
||||
| ^^^^
|
||||
@ -29,7 +29,7 @@ LL | fn foo(a: f128) {}
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:22:8
|
||||
--> $DIR/feature-gate-f128.rs:18:8
|
||||
|
|
||||
LL | a: f128,
|
||||
| ^^^^
|
||||
@ -39,7 +39,7 @@ LL | a: f128,
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:15:13
|
||||
--> $DIR/feature-gate-f128.rs:11:13
|
||||
|
|
||||
LL | let b = 0.0f128;
|
||||
| ^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:11:10
|
||||
--> $DIR/feature-gate-f128.rs:7:10
|
||||
|
|
||||
LL | const A: f128 = 10.0;
|
||||
| ^^^^
|
||||
@ -9,7 +9,7 @@ LL | const A: f128 = 10.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:14:12
|
||||
--> $DIR/feature-gate-f128.rs:10:12
|
||||
|
|
||||
LL | let a: f128 = 100.0;
|
||||
| ^^^^
|
||||
@ -19,7 +19,7 @@ LL | let a: f128 = 100.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:19:11
|
||||
--> $DIR/feature-gate-f128.rs:15:11
|
||||
|
|
||||
LL | fn foo(a: f128) {}
|
||||
| ^^^^
|
||||
@ -29,7 +29,7 @@ LL | fn foo(a: f128) {}
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:22:8
|
||||
--> $DIR/feature-gate-f128.rs:18:8
|
||||
|
|
||||
LL | a: f128,
|
||||
| ^^^^
|
||||
@ -39,7 +39,7 @@ LL | a: f128,
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f128` is unstable
|
||||
--> $DIR/feature-gate-f128.rs:15:13
|
||||
--> $DIR/feature-gate-f128.rs:11:13
|
||||
|
|
||||
LL | let b = 0.0f128;
|
||||
| ^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:11:10
|
||||
--> $DIR/feature-gate-f16.rs:7:10
|
||||
|
|
||||
LL | const A: f16 = 10.0;
|
||||
| ^^^
|
||||
@ -9,7 +9,7 @@ LL | const A: f16 = 10.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:14:12
|
||||
--> $DIR/feature-gate-f16.rs:10:12
|
||||
|
|
||||
LL | let a: f16 = 100.0;
|
||||
| ^^^
|
||||
@ -19,7 +19,7 @@ LL | let a: f16 = 100.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:19:11
|
||||
--> $DIR/feature-gate-f16.rs:15:11
|
||||
|
|
||||
LL | fn foo(a: f16) {}
|
||||
| ^^^
|
||||
@ -29,7 +29,7 @@ LL | fn foo(a: f16) {}
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:22:8
|
||||
--> $DIR/feature-gate-f16.rs:18:8
|
||||
|
|
||||
LL | a: f16,
|
||||
| ^^^
|
||||
@ -39,7 +39,7 @@ LL | a: f16,
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:15:13
|
||||
--> $DIR/feature-gate-f16.rs:11:13
|
||||
|
|
||||
LL | let b = 0.0f16;
|
||||
| ^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:11:10
|
||||
--> $DIR/feature-gate-f16.rs:7:10
|
||||
|
|
||||
LL | const A: f16 = 10.0;
|
||||
| ^^^
|
||||
@ -9,7 +9,7 @@ LL | const A: f16 = 10.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:14:12
|
||||
--> $DIR/feature-gate-f16.rs:10:12
|
||||
|
|
||||
LL | let a: f16 = 100.0;
|
||||
| ^^^
|
||||
@ -19,7 +19,7 @@ LL | let a: f16 = 100.0;
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:19:11
|
||||
--> $DIR/feature-gate-f16.rs:15:11
|
||||
|
|
||||
LL | fn foo(a: f16) {}
|
||||
| ^^^
|
||||
@ -29,7 +29,7 @@ LL | fn foo(a: f16) {}
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:22:8
|
||||
--> $DIR/feature-gate-f16.rs:18:8
|
||||
|
|
||||
LL | a: f16,
|
||||
| ^^^
|
||||
@ -39,7 +39,7 @@ LL | a: f16,
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: the type `f16` is unstable
|
||||
--> $DIR/feature-gate-f16.rs:15:13
|
||||
--> $DIR/feature-gate-f16.rs:11:13
|
||||
|
|
||||
LL | let b = 0.0f16;
|
||||
| ^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user