Skip to content
Discussion options

You must be logged in to vote

This appears to be what I would consider a somewhat odd Rust compiler behavior in which in-scope lowercased struct names can't be reused as function parameters?

Here's an example in plain, no-dependency, non-Leptos Rust, which also does not compile

struct something;

fn max(something: usize) {}

I'd say I consider this fairly odd on the compiler's part, as lowercased struct names get a lint but not a compile error.

I have not encountered it before, otherwise. But I also think it's fairly rare to need to import event names from ev like this? Maybe I'm wrong.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@timon-schelling
Comment options

@timon-schelling
Comment options

@timon-schelling
Comment options

@gbj
Comment options

gbj Mar 20, 2025
Maintainer

Answer selected by timon-schelling
@timon-schelling
Comment options

@timon-schelling
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants