Skip to content

some ui tests print traits differently on big-endian #74886

Closed
@infinity0

Description

@infinity0

version 1.44.1 s390x ppc64 powerpc

I will be adding an ignore-endian-big feature as part of #74829, just wanted to confirm these failures are OK to ignore:

---- [ui] ui/consts/const-eval/ub-enum.rs stdout ----
[ .. omitted for brevity .. ]
------------------------------------------
diff of stderr:

90	  --> $DIR/ub-enum.rs:90:1
91	   |
92	LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(1u64) };
-	   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at .<enum-variant(Err)>.0.1
+	   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at .<enum-variant(Ok)>.0.1
94	   |
95	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
96	

98	  --> $DIR/ub-enum.rs:92:1
99	   |
100	LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(1u64) };
-	   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at .<enum-variant(Err)>.0.1
+	   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at .<enum-variant(Ok)>.0.1
102	   |
103	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
104	
---- [ui] ui/suggestions/missing-trait-bounds-for-method-call.rs stdout ----
[ .. omitted for brevity .. ]
------------------------------------------
diff of stderr:

14	           which is required by `Foo<T>: Bar`
15	help: consider restricting the type parameters to satisfy the trait bounds
16	   |
-	LL | struct Foo<T> where T: Bar, T: std::default::Default {
+	LL | struct Foo<T> where T: std::default::Default, T: Bar {
18	   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19	
20	error[E0599]: no method named `foo` found for reference `&Fin<T>` in the current scope

CC @estebank and @RalfJung who wrote the tests, but I guess you may not be responsible for the underlying behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions