Esteban Kuber

Results 157 comments of Esteban Kuber

[With nll enabled, the output is](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f73d98a6b703bef4f32221e75e8346ea): ``` error: lifetime may not live long enough --> src/main.rs:14:11 | 13 | fn f(v: &mut V) { | - - let's call the...

@Aaron1011 [with nll enabled](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d8bca70c41ab656e50ca298aa6441f54): ``` error: lifetime may not live long enough --> src/lib.rs:4:14 | 3 | fn mut_ref(val: &'a mut &'b mut Foo) { | -- -- lifetime `'b`...

We need to stop suggesting adding a type argument when the requirement comes from a `const`, as they can't be generic, and replace it with a note stating that.

From #48427, the same behavior is seen for `static`s ``` fn x() { static a: T = T::default(); } ``` https://github.com/rust-lang/rust/issues/48427#issuecomment-367676264: > I think the big problem would be crate...

There has been no movement in supporting this at the lang level, and the diagnostic could do with some love to be clearer.

Random question: are these flags meant to affect the output of diagnostics as well? One could argue that they should.

@ytmimi that's a reasonable approach, although a safer action would be to create a *new* file with the new contents, verify that there were no errors when writing to that...

@ytmimi sadly, I do not have the spare cycles at the moment to look at this, but it seems like a good ticket for first-time contributors. @calebcartwright I don't disagree...

The discussion at https://internals.rust-lang.org/t/pre-pre-rfc-match-ergonomics-for-container-types-restricted-method-calls-in-patterns/13371 was fairly extensive as well.

I see a few solutions to this, none of them exactly nice: 1) ``` error[E0506]: cannot write to `x` while borrowed --> :4:5 | 3 | x.push(x.pop().unwrap()); | ^^^^^^^^^^^^^^^^ write...