Skip to content
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

type_limits warning should fire for initialization #16390

Closed
bfops opened this issue Aug 9, 2014 · 1 comment
Closed

type_limits warning should fire for initialization #16390

bfops opened this issue Aug 9, 2014 · 1 comment

Comments

@bfops
Copy link
Contributor

bfops commented Aug 9, 2014

This should generate at least a warning. warn(type_limits) might be appropriate.

pub fn main() {
    let x: u64 = -1;
    println!("x = {}", x);
}
@Gankra
Copy link
Contributor

Gankra commented Aug 9, 2014

Duplicate of #5477

@sfackler sfackler closed this as completed Aug 9, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Feb 11, 2024
…ist, r=Veykril

implement convert to guarded return assist for `let` statement with type that implements `std::ops::Try`

I've tried to implement the assist that rust-lang#16390 talked about

If there are any improvements that I can make in implementation, please suggest them.

![Peek 2024-02-05 19-01](https://github.com/rust-lang/rust-analyzer/assets/40687700/d6af3222-4f23-4ade-a930-8a78cc75e821)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants