-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of type paramerter decleration effects type checking #18240
Labels
A-typesystem
Area: The type system
Comments
ghost
added
the
I-wrong
label
Oct 22, 2014
Trait matching got rewritten in-between - I'll close this. |
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Oct 22, 2024
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Oct 22, 2024
…Veykril Clamp Position::character to line length LSP says about Position::character > If the character value is greater than the line length it defaults back to the line length. but from_proto::offset() doesn't implement this. A client might for example request code actions for a whole line by sending Position::character=99999. I don't think there is ever a reason (besides laziness) why the client can't specify the line length instead but I guess we should not crash but follow protocol. Not sure how to update Cargo.lock (lib/README.md doesn't say how). Fixes rust-lang#18240
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Oct 22, 2024
LSP says about Position::character > If the character value is greater than the line length it defaults back to the line length. but from_proto::offset() doesn't implement this. A client might for example request code actions for a whole line by sending Position::character=99999. I don't think there is ever a reason (besides laziness) why the client can't specify the line length instead but I guess we should not crash but follow protocol. Technically it should be a warning, not an error but warning is not shown by default so keep it at error I guess. Fixes rust-lang#18240
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
init_hack
type checks, butinit_hack2
doesn't, and the type error referes to a type parameter not bound in this module. I think there is some larger problem involving associated functions, as I really shouldn't needinit_hack
at all.Unfortunately for the time being I cannot release my whole program because it is used in a school assignment. Reducing the program (e.g. making a new trait with just
init
, unused by other code) make the problem go away, so this code sample is the best I can do.The text was updated successfully, but these errors were encountered: