Skip to content

The compiler gets hopelessly confused on enum S(usize); #80043

Open
@jyn514

Description

@jyn514

I think the error speaks for itself.

Here is the change I made, applied to 025f0e649e3a9869e42148ee8cf3041e24a13e8c.

diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 26b630440a1..4c2f3b5ce43 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -1163,33 +1163,7 @@ fn def_id(&self) -> Option<DefId> {
 }
 
 #[derive(Clone, PartialEq, Eq, Hash, Copy, Debug)]
-crate enum PrimitiveType {
-    Isize,
-    I8,
-    I16,
-    I32,
-    I64,
-    I128,
-    Usize,
-    U8,
-    U16,
-    U32,
-    U64,
-    U128,
-    F32,
-    F64,
-    Char,
-    Bool,
-    Str,
-    Slice,
-    Array,
-    Tuple,
-    Unit,
-    RawPointer,
-    Reference,
-    Fn,
-    Never,
-}
+crate enum PrimitiveType(Symbol);
 
 #[derive(Clone, PartialEq, Eq, Hash, Copy, Debug)]
 crate enum TypeKind {

errors.log edit: this is the wrong logfile, see below

I think the main thing making this so awful (1429 errors) is that it continues to try and do name resolution afterwards. I would not expect any errors other than further syntax errors to be reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.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