Skip to content

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

@cuviper

Description

@cuviper
Member
[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

added
C-bugCategory: This is a bug.
regression-untriagedUntriaged performance or correctness regression.
on Apr 23, 2025
added this to the 1.87.0 milestone on Apr 23, 2025
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
and removed
regression-untriagedUntriaged performance or correctness regression.
on Apr 23, 2025
cuviper

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.

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
self-assigned this
on Apr 23, 2025
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 it if it has been sufficiently triaged.
on Apr 23, 2025
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

16 remaining items

Loading
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

Development

No branches or pull requests

    Participants

    @cuviper@apiraino@fmease@rustbot

    Issue actions

      regression: error: path separator must be a double colon (in `where` clause) · Issue #140227 · rust-lang/rust