Skip to content

Misleading error message on typo "Type ascription" #34255

Closed
@danielpclark

Description

This had me googling for answers. But I had entered a colon instead of a semi-colon at the end of a line. Nothing in my search results pointed that out.

src/chop_basename.rs:26:3: 29:29 error: type ascription is experimental (see issue #23416)
src/chop_basename.rs:26   parts.push(CString::new(basename).unwrap().into_raw()):
src/chop_basename.rs:27   // END BASENAME
src/chop_basename.rs:28   
src/chop_basename.rs:29   RubyArray::from_vec(parts)
src/lib.rs:23:1: 23:30 note: in this expansion of include!
src/chop_basename.rs:26:3: 29:29 help: add #![feature(type_ascription)] to the crate attributes to enable
error: aborting due to previous error

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.P-lowLow priorityT-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