Skip to content

regression: error: path separator must be a double colon (in where clause) #140227

Closed

Description

@cuviper
[INFO] [stdout] error: path separator must be a double colon
[INFO] [stdout]   --> src/lib.rs:68:12
[INFO] [stdout]    |
[INFO] [stdout] 68 |     where a:AsRef<str>{
[INFO] [stdout]    |            ^
[INFO] [stdout]    |
[INFO] [stdout] help: use a double colon instead
[INFO] [stdout]    |
[INFO] [stdout] 68 |     where a::AsRef<str>{
[INFO] [stdout]    |             +

Version it worked on

It most recently worked on: 1.86.0

Version with regression

rustc 1.87.0-beta.5 (386abeb93 2025-04-19) in crater #139827.

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

Activity

  1. added
    C-bugCategory: This is a bug.
    regression-untriagedUntriaged performance or correctness regression.
    on Apr 23, 2025
  2. added this to the 1.87.0 milestone on Apr 23, 2025
  3. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    and removed
    regression-untriagedUntriaged performance or correctness regression.
    on Apr 23, 2025
  4. cuviper commented on Apr 23, 2025

    @cuviper
    MemberAuthor

    I minimized it to this example:

    pub fn upper<T>() where T:Copy {}
    pub fn lower<t>() where t:Copy {}

    The upper is fine, but lower gives the error. It's also fine if you add a space, where t: Copy.

    On nightly, it also mentions type ascription:

    error: path separator must be a double colon
     --> src/lib.rs:2:26
      |
    2 | pub fn lower<t>() where t:Copy {}
      |                          ^
      |
      = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
    help: use a double colon instead
      |
    2 | pub fn lower<t>() where t::Copy {}
      |                           +
    

    edit: that was with rustc 1.88.0-nightly (78f2104e3 2025-04-16), but not after I updated to 6bc57c6bf 2025-04-22.

  5. added
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    A-parserArea: The lexing & parsing of Rust source code to an AST
    on Apr 23, 2025
  6. self-assigned this
    on Apr 23, 2025
  7. added
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 23, 2025
  8. changed the title [-]regression: error: path separator must be a double colon (in `where` clause[/-] [+]regression: error: path separator must be a double colon (in `where` clause)[/+] on Apr 23, 2025
  9. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Apr 23, 2025
  10. fmease commented on Apr 23, 2025

    @fmease
    Member

    Regressed in commit 500a686 (PR #136808)

  11. added
    S-has-bisectionStatus: A bisection has been found for this issue
    and removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on Apr 23, 2025
  12. fmease commented on Apr 23, 2025

    @fmease
    Member

    Also regressed:

    fn f<t>(_: impl a<t:u>) {}
    
    trait a { type t; }
    trait u {}
  13. cuviper commented on Apr 23, 2025

    @cuviper
    MemberAuthor

    To be clear, all of those also warn that you should use CamelCase, but that's a style lint, not a language requirement.

  14. apiraino commented on Apr 24, 2025

    @apiraino
    Contributor

    Assigning priority (discussion on Zulip).

    @rustbot label -I-prioritize +P-critical

  15. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 24, 2025
  16. added 2 commits that reference this issue on Apr 24, 2025
  17. added a commit that references this issue on Apr 24, 2025
  18. fmease commented on Apr 28, 2025

    @fmease
    Member

    Fixed in #140228.
    Backported in #140269.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.P-criticalCritical priorityS-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions