summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/cast/cast-rfc0401.rs6
-rw-r--r--src/test/ui/cast/issue-88621.rs2
-rw-r--r--src/test/ui/cast/issue-88621.stderr2
3 files changed, 2 insertions, 8 deletions
diff --git a/src/test/ui/cast/cast-rfc0401.rs b/src/test/ui/cast/cast-rfc0401.rs
index 996fa013f..9a9875416 100644
--- a/src/test/ui/cast/cast-rfc0401.rs
+++ b/src/test/ui/cast/cast-rfc0401.rs
@@ -159,11 +159,7 @@ fn main()
assert!(foo as usize != bar as usize);
// Taking a few bits of a function's address is totally pointless and we detect that
- // Disabling the lint to ensure that the assertion can still be run
- #[allow(const_err)]
- {
- assert_eq!(foo as i16, foo as usize as i16);
- }
+ assert_eq!(foo as i16, foo as usize as i16);
// fptr-ptr-cast
diff --git a/src/test/ui/cast/issue-88621.rs b/src/test/ui/cast/issue-88621.rs
index 9242b80e2..1679793ee 100644
--- a/src/test/ui/cast/issue-88621.rs
+++ b/src/test/ui/cast/issue-88621.rs
@@ -1,5 +1,3 @@
-#![feature(arbitrary_enum_discriminant)]
-
#[repr(u8)]
enum Kind2 {
Foo() = 1,
diff --git a/src/test/ui/cast/issue-88621.stderr b/src/test/ui/cast/issue-88621.stderr
index e96d86651..886145c1b 100644
--- a/src/test/ui/cast/issue-88621.stderr
+++ b/src/test/ui/cast/issue-88621.stderr
@@ -1,5 +1,5 @@
error[E0605]: non-primitive cast: `Kind2` as `u8`
- --> $DIR/issue-88621.rs:11:13
+ --> $DIR/issue-88621.rs:9:13
|
LL | let _ = Kind2::Foo() as u8;
| ^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object